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

# Get One Document Row

> Read one row of a vault's document table by its `document_id`.

A document appears here once its first scan writes values, which is a few minutes after upload. Until then poll `GET /files/{id}` with the `id` that `POST /vaults/{id}/documents` returned.

The row is built by the same query that serves the list, so a document reads the same way whichever endpoint returns it. Soft-deleted documents answer `404` unless the request passes `include_deleted=true`.

Requires a user-scoped API key (`u:gcai_...`). A vault is shared with named people, so an organization-scoped key has no identity to resolve vault access with.



## OpenAPI

````yaml GET /vaults/{id}/documents/{documentId}
openapi: 3.0.3
info:
  title: GC AI External API
  version: 1.0.0
  description: >-
    The GC AI External API allows programmatic access to GC AI's chat
    capabilities. It's designed for integration with workflow automation tools
    like Zapier, Make, n8n, or custom applications.


    ## Authentication


    All API requests must include an API key in the `Authorization` header:


    ```

    Authorization: gcai_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    ```


    API keys can be created in the GC AI app under **Settings → API**.


    ## Multi-turn Conversations


    Conversations can span multiple turns: pass the `chat_id` returned by a
    completion back on your next request to continue the same chat. See
    [Multi-turn Conversations](/api-reference/concepts/multi-turn).


    ## Current Limitations


    The following is not yet available via API:


    - **Interactive clarification**: the model cannot pause to ask the caller a
    follow-up question; the `askUserQuestions` tool is disabled on the API
    surface


    ## Usage


    Usage is tracked and viewable in the GC AI app under **Settings → API → View
    Usage**.


    ## Support


    For API support, contact [support@gc.ai](mailto:support@gc.ai) or reach out
    to your account representative.
  contact:
    email: support@gc.ai
servers:
  - url: https://app.gc.ai/api/external/v1
    description: Production server
security: []
tags:
  - name: Async Jobs
    description: Poll the status and result of asynchronous API jobs
  - name: Chat
    description: AI chat completion endpoints
  - name: Chats
    description: Chat management, message history, and sharing endpoints
  - name: Contract Intelligence
    description: Vault discovery and document ingestion endpoints for Contract Intelligence
  - name: Files
    description: File upload and management endpoints
  - name: Folders
    description: Folder management endpoints
  - name: Playbooks
    description: Playbook review endpoints
  - name: Profiles
    description: Personal and company profile endpoints
  - name: Projects
    description: Project management endpoints
  - name: Skills
    description: Skill library management endpoints
  - name: Utility
    description: Health check and connectivity endpoints
  - name: Usage
    description: Usage and credit/billing reporting endpoints
paths:
  /vaults/{id}/documents/{documentId}:
    get:
      tags:
        - Contract Intelligence
      summary: Get one document row
      description: >-
        Read one row of a vault's document table by its `document_id`.


        A document appears here once its first scan writes values, which is a
        few minutes after upload. Until then poll `GET /files/{id}` with the
        `id` that `POST /vaults/{id}/documents` returned.


        The row is built by the same query that serves the list, so a document
        reads the same way whichever endpoint returns it. Soft-deleted documents
        answer `404` unless the request passes `include_deleted=true`.


        Requires a user-scoped API key (`u:gcai_...`). A vault is shared with
        named people, so an organization-scoped key has no identity to resolve
        vault access with.
      operationId: getVaultDocument
      parameters:
        - schema:
            type: string
            format: uuid
            description: The vault ID
          required: true
          description: The vault ID
          name: id
          in: path
        - schema:
            type: string
            format: uuid
            description: The `document_id` of a row from `GET /vaults/{id}/documents`.
          required: true
          description: The `document_id` of a row from `GET /vaults/{id}/documents`.
          name: documentId
          in: path
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            description: >-
              When `true`, also return soft-deleted documents and the copies GC
              AI removed as duplicates. Reading deleted documents needs the same
              rights as deleting them, so this requires the `editor` or `owner`
              role plus the organization-level permission to manage vaults.
              Defaults to `false`.
            example: 'true'
          required: false
          description: >-
            When `true`, also return soft-deleted documents and the copies GC AI
            removed as duplicates. Reading deleted documents needs the same
            rights as deleting them, so this requires the `editor` or `owner`
            role plus the organization-level permission to manage vaults.
            Defaults to `false`.
          name: include_deleted
          in: query
      responses:
        '200':
          description: The document row
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultDocumentRow'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or malformed API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Contract Intelligence is not enabled for this account. Contact
            support to request access., or `include_deleted` was used by a
            caller who cannot remove documents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Vault or document not found, vault archived, or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Vault access is per-user and requires a user-scoped API key
            (u:gcai_...).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit exceeded. See [Rate
            Limits](/api-reference/concepts/rate-limits) for the tiers, limits,
            and how to back off.
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying after a rate-limit block.
                example: '60'
              required: true
              description: Seconds to wait before retrying after a rate-limit block.
            RateLimit-Limit:
              schema:
                type: string
                description: Request quota for the applicable window.
                example: '3'
              required: true
              description: Request quota for the applicable window.
            RateLimit-Remaining:
              schema:
                type: string
                description: Requests remaining in the current window.
                example: '0'
              required: true
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: string
                description: Seconds until the quota resets.
                example: '60'
              required: true
              description: Seconds until the quota resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service temporarily unavailable
          headers:
            Retry-After:
              schema:
                type: string
                description: >-
                  Seconds to wait before retrying after a transient service
                  outage.
                example: '5'
              required: true
              description: >-
                Seconds to wait before retrying after a transient service
                outage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    VaultDocumentRow:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
          description: >-
            Stable identifier for this row. Use it with `GET`, `DELETE`, and
            `POST .../restore` on this path. One upload can hold several
            documents (GC AI splits a bundled PDF into the agreements inside
            it), and each of those is its own row with its own `document_id`. A
            document stored before GC AI split bundled uploads carries its
            `file_id` here.
        file_id:
          type: string
          format: uuid
          description: >-
            The upload this row came from: the `id` returned by `POST
            /vaults/{id}/documents` and the id `GET /files/{id}` takes. Rows
            that share a `file_id` came from one upload.
        name:
          type: string
          description: >-
            The name shown in the vault: the document title when the vault has
            named this row, and the upload filename otherwise.
          example: Acme MSA (2024)
        file_name:
          type: string
          description: Filename of the upload, unchanged.
          example: acme-msa-2024.pdf
        source_name:
          type: string
          nullable: true
          description: >-
            The vault source this document arrived through, such as the
            connected folder name. Null for a source with no name.
        source_provider:
          type: string
          nullable: true
          description: >-
            The source type, such as `manual_upload`, `google_drive`, or
            `sharepoint`.
          example: manual_upload
        extracted_at:
          type: string
          nullable: true
          description: >-
            ISO 8601 timestamp of the most recent value written to this row, or
            null before the first value lands.
        is_extraction_active:
          type: boolean
          description: >-
            True while a scan of this document is queued or running, so some
            cells may still be empty or change. Poll the row until it is false.
        deleted_at:
          type: string
          nullable: true
          description: >-
            ISO 8601 timestamp of the soft delete, or null for a live row. Only
            rows requested with `include_deleted=true` can carry a value.
        removed_as_duplicate_at:
          type: string
          nullable: true
          description: >-
            ISO 8601 timestamp when GC AI removed this row as a copy of another
            document in the vault, or null. `include_deleted=true` also returns
            these copies, so this field says why a row with a null `deleted_at`
            is in that list.
        values:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/VaultDocumentCell'
          description: >-
            One entry per column of the vault, keyed by the column `field_key`.
            Every row of a vault carries the same keys, so the response reads as
            a table. Read the keys, labels, and types from `GET
            /vaults/{id}/columns`.
      required:
        - document_id
        - file_id
        - name
        - file_name
        - source_name
        - source_provider
        - extracted_at
        - is_extraction_active
        - deleted_at
        - removed_as_duplicate_at
        - values
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: >-
            Machine-readable error code present on some errors (e.g.
            `RATE_LIMITED`, `INSUFFICIENT_CREDITS`, `TRIAL_NOT_STARTED`,
            `BILLING_NOT_CONFIGURED`). Branch on this rather than the
            human-readable `error` string.
        message:
          type: string
          description: Additional error details
        details:
          type: object
          additionalProperties:
            nullable: true
          description: Validation error details (for 400 errors)
      required:
        - error
    VaultDocumentCell:
      type: object
      properties:
        value:
          type: string
          nullable: true
          description: >-
            The extracted value, always a string. Structured column types carry
            JSON in this string: a currency cell holds `{"amount","currency"}`,
            a date range holds `{"start","end"}`, a multi-select or list holds a
            JSON array of strings, and a party list holds a JSON array of
            `{"name","entityType"}`. A date holds `YYYY-MM-DD`. `null` means the
            scan found no value for this column, so a caller never has to tell
            an empty answer from an absent one.
          example: Delaware
        is_edited:
          type: boolean
          description: >-
            True when a person replaced the scanned value by hand. The `value`
            is theirs, not the scan output.
        edited_at:
          type: string
          nullable: true
          description: ISO 8601 timestamp of the hand edit, or null.
        edited_by:
          type: string
          nullable: true
          description: Display name of the person who made the edit, or null.
        edited_by_user_id:
          type: integer
          nullable: true
          description: >-
            GC AI user ID of the person who made the edit, or null. Matches the
            `user_id` that `GET /vaults/{id}/members` reports.
        has_citations:
          type: boolean
          description: >-
            True when the scan recorded where in the document it read this
            value. Read the citations in the app; v1 does not return them.
      required:
        - value
        - is_edited
        - edited_at
        - edited_by
        - edited_by_user_id
        - has_citations
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |-
        API key for authentication. Format: `gcai_xxxxxxxxx`

        Create API keys in the GC AI app under Settings → API.

````