> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beta.adapter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Ask Job

> Ask a question asynchronously: returns a job id immediately; poll
GET /knowledge/ask/jobs/{job_id} until `status` leaves "running". Same
grounding and citations as /knowledge/ask, without the long-poll timeout —
use for deep or broad questions that may exceed the sync window.

<Snippet file="api/knowledge/create-ask-job.mdx" />


## OpenAPI

````yaml POST /v1/knowledge/ask/jobs
openapi: 3.1.0
info:
  title: Adapter API
  description: Connect and sync data from any SaaS tool.
  version: 0.1.0
servers:
  - url: https://api.adapter.com
security:
  - ApiKeyAuth: []
tags:
  - name: connections
    description: Manage OAuth connections to data sources.
paths:
  /v1/knowledge/ask/jobs:
    post:
      tags:
        - knowledge
      summary: Create Ask Job
      description: >-
        Ask a question asynchronously: returns a job id immediately; poll

        GET /knowledge/ask/jobs/{job_id} until `status` leaves "running". Same

        grounding and citations as /knowledge/ask, without the long-poll timeout
        —

        use for deep or broad questions that may exceed the sync window.
      operationId: create_ask_job
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAskRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Create Ask Job
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorModel'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionDeniedErrorModel'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            Rate limit exceeded for the caller's tier. RFC 9457 problem+json
            body; IETF RateLimit-* headers and Retry-After are set.
          headers:
            Retry-After:
              description: Seconds to wait before retrying (RFC 9110).
              schema:
                type: integer
            RateLimit-Limit:
              description: Requests allowed per window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Delta-seconds until the window resets.
              schema:
                type: integer
            RateLimit-Policy:
              description: Active policy, e.g. '5;w=60'.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/RateLimitProblemDetail'
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitProblemDetail'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorModel'
          description: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableErrorModel'
components:
  schemas:
    PublicAskRequest:
      properties:
        query:
          type: string
          maxLength: 2000
          minLength: 1
          title: Query
          examples:
            - What are our top blockers for Q1?
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
          description: >-
            IANA timezone identifier (e.g. "America/New_York") for resolving
            relative

            time references like "today" or "last week". Defaults to UTC.
          examples:
            - America/New_York
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
              maxProperties: 20
            - type: 'null'
          title: Metadata
          description: >-
            Restrict the evidence the model can ground its answer in to rows
            whose `metadata` contains ALL the given key/value pairs
            (AND-of-exact-match). Max 20 keys; string values only.
          examples:
            - env: staging
      additionalProperties: false
      type: object
      required:
        - query
      title: PublicAskRequest
    AuthenticationErrorModel:
      properties:
        error_code:
          type: string
          const: authentication_error
          title: Error Code
          default: authentication_error
        message:
          type: string
          title: Message
          default: Invalid or missing credentials.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: AuthenticationErrorModel
    PermissionDeniedErrorModel:
      properties:
        error_code:
          type: string
          const: permission_denied
          title: Error Code
          default: permission_denied
        message:
          type: string
          title: Message
          default: You do not have permission to perform this action.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: PermissionDeniedErrorModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RateLimitProblemDetail:
      properties:
        type:
          type: string
          title: Type
          description: >-
            Stable problem-type URI, e.g.
            '{api_base_url}/errors/rate_limit_exceeded'.
        title:
          type: string
          const: Too Many Requests
          title: Title
          default: Too Many Requests
        status:
          type: integer
          const: 429
          title: Status
          default: 429
        detail:
          type: string
          title: Detail
          description: Human-readable explanation, including the retry hint.
        error_code:
          type: string
          const: rate_limit_exceeded
          title: Error Code
          default: rate_limit_exceeded
        endpoint:
          type: string
          title: Endpoint
          description: Logical endpoint the limit applies to (e.g. 'ask', 'search').
        tier:
          type: string
          title: Tier
          description: The caller's billing tier (e.g. 'free').
        limit:
          type: integer
          title: Limit
          description: Requests allowed per window for this tier + endpoint.
        remaining:
          type: integer
          title: Remaining
          description: Requests remaining in the current window (0 when blocked).
        window_seconds:
          type: integer
          title: Window Seconds
          description: Length of the fixed rate-limit window, in seconds.
        retry_after:
          type: integer
          title: Retry After
          description: Seconds to wait before retrying (mirrors the Retry-After header).
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: The request path that was limited.
      type: object
      required:
        - type
        - detail
        - endpoint
        - tier
        - limit
        - remaining
        - window_seconds
        - retry_after
      title: RateLimitProblemDetail
      description: >-
        The 429 response body, exactly as ``RateLimitError.problem_detail``
        renders it —

        RFC 9457 Problem Details, served as ``application/problem+json``
        alongside the IETF

        ``RateLimit-*`` headers and ``Retry-After``. (Distinct from the legacy

        ``RateLimitErrorModel`` shape, which does not match what the handler
        emits.)
    InternalServerErrorModel:
      properties:
        error_code:
          type: string
          const: internal_server_error
          title: Error Code
          default: internal_server_error
        message:
          type: string
          title: Message
          default: An unexpected error occurred.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: InternalServerErrorModel
    ServiceUnavailableErrorModel:
      properties:
        error_code:
          type: string
          const: service_unavailable
          title: Error Code
          default: service_unavailable
        message:
          type: string
          title: Message
          default: >-
            The service is currently experiencing issues. Please try again
            later.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: ServiceUnavailableErrorModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Pass your `pk_live_...` API key as a Bearer token.

````