> ## 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.

# Get answer status or completed result

> Poll the ID returned by createAnswer. HTTP 200 contains queued, running, succeeded or failed job state. Only succeeded includes billing. Polling does not add charges.



## OpenAPI

````yaml /openapi.json get /answers/{id}
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/{id}:
    get:
      tags:
        - Answers
      summary: Get answer status or completed result
      description: >-
        Poll the ID returned by createAnswer. HTTP 200 contains queued, running,
        succeeded or failed job state. Only succeeded includes billing. Polling
        does not add charges.
      operationId: getAnswer
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Opaque answer ID, e.g. answer_7KQ2M9A. Preserve exactly for
              polling.
            example: answer_7KQ2M9A
          required: true
          description: Opaque answer ID, e.g. answer_7KQ2M9A. Preserve exactly for polling.
          name: id
          in: path
      responses:
        '200':
          description: Current job state, including terminal failures.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ReadAnswerResponse'
        '400':
          description: 'invalid_request: invalid answer ID or unknown query parameter.'
          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: the answer does not exist or is inaccessible.'
          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: answer retrieval is unavailable; 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:
    V2ReadAnswerResponse:
      oneOf:
        - $ref: '#/components/schemas/V2CreateAnswerResponse'
        - $ref: '#/components/schemas/V2RunningAnswer'
        - $ref: '#/components/schemas/V2SucceededAnswer'
        - $ref: '#/components/schemas/V2FailedAnswer'
      discriminator:
        propertyName: status
        mapping:
          queued: '#/components/schemas/V2CreateAnswerResponse'
          running: '#/components/schemas/V2RunningAnswer'
          succeeded: '#/components/schemas/V2SucceededAnswer'
          failed: '#/components/schemas/V2FailedAnswer'
    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
    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
    V2RunningAnswer:
      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:
            - running
          description: >-
            Execution has been admitted; includes waiting for subagents or
            retries. Poll for the result.
      required:
        - id
        - status
      additionalProperties: false
    V2SucceededAnswer:
      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:
            - succeeded
          description: The answer is complete; this is a terminal state.
        answer:
          type: string
          minLength: 1
          description: >-
            Completed answer in Markdown. Factual claims are supported by the
            citations.
        citations:
          type: array
          items:
            $ref: '#/components/schemas/V2AnswerCitation'
          description: >-
            Source citations with explicit quote-verification status. Empty when
            the selected sources contain no answer; answer explains that
            outcome.
        usage:
          type: object
          properties:
            credits:
              type: number
              minimum: 0
              description: >-
                Recorded usage in Effective credits for the answer session and
                its subagents; nonnegative, with fractional values allowed, e.g.
                0.41. May increase as delayed charges are recorded.
              example: 0.41
          required:
            - credits
          additionalProperties: false
          description: Current recorded session usage; present only on succeeded answers.
      required:
        - id
        - status
        - answer
        - citations
        - usage
      additionalProperties: false
    V2FailedAnswer:
      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:
            - failed
          description: The answer job failed; this is a terminal state.
        failure:
          type: object
          properties:
            code:
              type: string
              minLength: 1
              description: >-
                run_failed: the session could not be launched. Automatic runtime
                failure detection and agent failure submission are deferred.
                Clients must tolerate future codes.
            error:
              type: string
              minLength: 1
              description: Human-readable explanation of the job failure.
          required:
            - code
            - error
          additionalProperties: false
          description: Job failure details; present only when status is failed.
      required:
        - id
        - status
        - failure
      additionalProperties: false
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
    V2AnswerCitation:
      type: object
      properties:
        fileId:
          type: string
          format: uuid
          description: Source file UUID, e.g. 00000000-0000-4000-8000-000000000001.
          example: 00000000-0000-4000-8000-000000000001
        versionId:
          anyOf:
            - type: string
              format: uuid
            - type: string
              maxLength: 8192
              pattern: ^lv1\.[A-Za-z0-9_.-]+$
          description: >-
            Pinned version selector: UUID or opaque lv1. token (up to 8,192
            characters), e.g. lv1.header.payload.signature. Preserve exactly for
            downloading.
          example: 00000000-0000-4000-8000-000000000002
        filingId:
          type: string
          nullable: true
          format: uuid
          description: >-
            Catalog filing UUID containing the cited file, e.g.
            940e776b-3cba-4d02-a988-736ae73f7ff1; null when none is associated.
          example: 940e776b-3cba-4d02-a988-736ae73f7ff1
        trackingNumber:
          type: string
          nullable: true
          minLength: 1
          description: >-
            SERFF tracking number of the source filing, e.g. NXUS-G134874599;
            null when unavailable.
          example: NXUS-G134874599
        page:
          type: integer
          nullable: true
          minimum: 1
          description: >-
            One-based extracted page, e.g. 47; page 1 when no page markers
            exist. Null is also accepted for unpaginated text.
          example: 47
        quote:
          type: string
          maxLength: 300
          description: >-
            Matched quote when verified; otherwise the opening excerpt of the
            cited page or unpaginated source, up to 300 characters. May be empty
            when no text could be extracted.
        verified:
          type: boolean
          description: >-
            True when the supplied quote matched the extracted text at the cited
            location; false when quote verification was unavailable or
            unsuccessful.
        downloadUrl:
          type: string
          pattern: >-
            ^\/api\/v2\/files\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/download\?versionId=[^&#?\/\s]+$
          description: >-
            Authenticated API-relative path:
            /api/v2/files/{fileId}/download?versionId={versionId}. versionId is
            URL-encoded; file and version match this citation.
          example: >-
            /api/v2/files/00000000-0000-4000-8000-000000000001/download?versionId=00000000-0000-4000-8000-000000000002
      required:
        - fileId
        - versionId
        - filingId
        - trackingNumber
        - page
        - quote
        - verified
        - downloadUrl
      additionalProperties: false
  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.