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

# Set a Cell Value by Hand

> Overwrite one extracted value in a vault with a value of your own. The cell keeps showing your value, and hides the citations and reasoning behind the extracted one, until you put it back with `POST /vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert`.

`value` is always a string, whatever the column holds. Text, enum, email, URL, number, and percentage columns take the value as written. A checkbox column takes `true` or `false`. A date column takes `YYYY-MM-DD`. Multi-select and list columns take a JSON array of strings, for example `["Delaware","New York"]`. Currency, duration, date-range, party, and related-agreement columns take the same JSON the read path returns for that column, so the safest way to build one is to read the cell first and edit what comes back.

An enum or multi-select value outside the column's configured options returns `400`, and so does any column GC AI writes itself: the folder columns synced from a connected drive, and a Document Name column the vault manages through its naming template.

Editing a cell while its document is still being scanned is allowed. Your value wins: an extraction that lands afterwards does not overwrite it, so there is no need to poll for the scan to finish first.

A document that belongs to another vault returns `404`, even when the caller can reach both vaults, and so does a column key this vault does not have. Read the keys from `GET /vaults/{id}/columns`.

Requires the `editor` or `owner` role in the vault and the organization-level permission to manage vaults. An archived vault returns `409`: restore it first. A document that was deleted, or auto-removed as a duplicate copy, also returns `409`, and so does a document stored before GC AI split bundled uploads, which has no cells of its own to write.

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 PATCH /vaults/{id}/documents/{documentId}/cells/{fieldKey}
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}/cells/{fieldKey}:
    patch:
      tags:
        - Contract Intelligence
      summary: Set a cell value by hand
      description: >-
        Overwrite one extracted value in a vault with a value of your own. The
        cell keeps showing your value, and hides the citations and reasoning
        behind the extracted one, until you put it back with `POST
        /vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert`.


        `value` is always a string, whatever the column holds. Text, enum,
        email, URL, number, and percentage columns take the value as written. A
        checkbox column takes `true` or `false`. A date column takes
        `YYYY-MM-DD`. Multi-select and list columns take a JSON array of
        strings, for example `["Delaware","New York"]`. Currency, duration,
        date-range, party, and related-agreement columns take the same JSON the
        read path returns for that column, so the safest way to build one is to
        read the cell first and edit what comes back.


        An enum or multi-select value outside the column's configured options
        returns `400`, and so does any column GC AI writes itself: the folder
        columns synced from a connected drive, and a Document Name column the
        vault manages through its naming template.


        Editing a cell while its document is still being scanned is allowed.
        Your value wins: an extraction that lands afterwards does not overwrite
        it, so there is no need to poll for the scan to finish first.


        A document that belongs to another vault returns `404`, even when the
        caller can reach both vaults, and so does a column key this vault does
        not have. Read the keys from `GET /vaults/{id}/columns`.


        Requires the `editor` or `owner` role in the vault and the
        organization-level permission to manage vaults. An archived vault
        returns `409`: restore it first. A document that was deleted, or
        auto-removed as a duplicate copy, also returns `409`, and so does a
        document stored before GC AI split bundled uploads, which has no cells
        of its own to write.


        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: updateVaultDocumentCell
      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
            minLength: 1
            maxLength: 100
            description: >-
              Column key, as the vault reports it for its columns. A key, not a
              label: `governingLaw`, not `Governing law`. Percent-encode it if
              it holds a character a URL path reserves.
            example: governingLaw
          required: true
          description: >-
            Column key, as the vault reports it for its columns. A key, not a
            label: `governingLaw`, not `Governing law`. Percent-encode it if it
            holds a character a URL path reserves.
          name: fieldKey
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VaultDocumentCellUpdateRequest'
      responses:
        '200':
          description: The stored cell
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultDocumentCellResponse'
        '400':
          description: >-
            Invalid request body, a value outside the column's configured
            options, or a column GC AI writes itself
          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 the caller's vault role cannot edit
            data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Vault or document not found, the document belongs to another vault,
            or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The vault is archived, the document has been deleted or removed as a
            duplicate, or the document predates bundled-upload splitting and has
            no cells to write
          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:
    VaultDocumentCellUpdateRequest:
      type: object
      properties:
        value:
          type: string
          maxLength: 50000
          description: The value to store. Send an empty string to clear the cell.
          example: Delaware
      required:
        - value
    VaultDocumentCellResponse:
      type: object
      properties:
        document_id:
          type: string
          format: uuid
          description: Document the cell belongs to
        field_key:
          type: string
          description: Column key for the cell
        cell:
          allOf:
            - $ref: '#/components/schemas/VaultDocumentCell'
            - description: >-
                The cell after the write, in the same shape `GET
                /vaults/{id}/documents` reports under `values`.
        extracted_at:
          type: string
          nullable: true
          description: >-
            ISO 8601 timestamp of the last write that set a value on this cell.
            A revert restores the scanned value without restamping it, so after
            a revert this is still the time of the edit that was undone, not the
            time of the original scan.
      required:
        - document_id
        - field_key
        - cell
        - extracted_at
    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.

````