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

# Schedule an answer to a question

> Schedule an answer to a question using the required selections as research context. The agent may consult other authorized sources; cited versions are pinned at submission. Poll GET /api/v2/answers/{id}. Requests are limited to 64 KiB. Repeating POST creates a new answer; poll the returned ID to follow the accepted request.



## OpenAPI

````yaml /openapi.json post /answers
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /answers:
    post:
      tags:
        - Answers
      summary: Schedule an answer to a question
      description: >-
        Schedule an answer to a question using the required selections as
        research context. The agent may consult other authorized sources; cited
        versions are pinned at submission. Poll GET /api/v2/answers/{id}.
        Requests are limited to 64 KiB. Repeating POST creates a new answer;
        poll the returned ID to follow the accepted request.
      operationId: createAnswer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2CreateAnswerRequest'
      responses:
        '202':
          description: Initial message accepted by the session runtime.
          headers:
            Location:
              required: true
              schema:
                type: string
              description: 'Same-origin polling path: /api/v2/answers/{id}.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CreateAnswerResponse'
        '400':
          description: 'invalid_request: invalid input or unusable scope.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: 'unauthenticated: valid credentials are required.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: 'forbidden: the credential does not permit this operation.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: 'not_found: a selected resource does not exist or is inaccessible.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '409':
          description: version_unavailable or text_unavailable for a selected source file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '413':
          description: 'request_too_large: the request exceeds 64 KiB.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '415':
          description: 'unsupported_media_type: use application/json.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '500':
          description: 'internal_error: unexpected server error.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: 'temporarily_unavailable: the agent cannot run; respect Retry-After.'
          headers:
            Retry-After:
              required: true
              schema:
                type: integer
                minimum: 0
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2CreateAnswerRequest:
      type: object
      properties:
        question:
          type: string
          minLength: 1
          maxLength: 2000
          description: >-
            Question to answer. 1–2,000 characters after trimming surrounding
            whitespace.
        scope:
          type: object
          properties:
            products:
              type: array
              items:
                $ref: '#/components/schemas/V2AnswerProductScope'
              description: >-
                Product selections supplied as research context; the agent
                discovers member filings and files as needed.
            trackingNumbers:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 500
                description: >-
                  SERFF tracking number, e.g. NXUS-G134874599. 1–500 characters
                  after trimming; normalized to uppercase.
                example: NXUS-G134874599
              description: >-
                SERFF catalog filings to include; each tracking number selects
                the filing and its stored files.
            fileIds:
              type: array
              items:
                type: string
                format: uuid
                description: >-
                  File UUID, e.g. 00000000-0000-4000-8000-000000000001;
                  normalized to lowercase.
                example: 00000000-0000-4000-8000-000000000001
              description: >-
                Persistent file UUIDs supplied as research context. Cited
                versions are pinned when the answer is submitted.
          additionalProperties: false
          description: >-
            Required research context: the union of these selections. The agent
            may consult other authorized sources; at least one list must be
            nonempty.
          anyOf:
            - required:
                - products
              properties:
                products:
                  type: array
                  minItems: 1
            - required:
                - trackingNumbers
              properties:
                trackingNumbers:
                  type: array
                  minItems: 1
            - required:
                - fileIds
              properties:
                fileIds:
                  type: array
                  minItems: 1
      required:
        - question
        - scope
      additionalProperties: false
    V2CreateAnswerResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: Opaque answer ID, e.g. answer_7KQ2M9A. Preserve exactly for polling.
          example: answer_7KQ2M9A
        status:
          type: string
          enum:
            - queued
          description: >-
            Initial acceptance state. Poll GET for current status; execution may
            already have started.
      required:
        - id
        - status
      additionalProperties: false
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
              description: Dataset needed for dataset_not_enabled.
            upgradeUrl:
              type: string
              nullable: true
              format: uri
              description: Where to upgrade for plan_required, when available.
          required:
            - code
    V2AnswerProductScope:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: >-
            Catalog product ID, e.g. product_00001AB or bare code 00001AB.
            Aliases normalize to the full ID.
          example: product_00001AB
        state:
          type: string
          pattern: ^[A-Z]{2}$
          description: >-
            Two-letter uppercase state code, e.g. CA for California. Omit to
            include all states for this product.
          example: CA
      required:
        - id
      additionalProperties: false
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.