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

# Restore the Extracted Value of a Cell

> Take a hand edit off one cell and put the value the scan extracted back. This does not clear the cell: it restores the AI value, along with the source citations and reasoning the edit had been hiding.

A cell with no hand edit on it returns `404`. So does a cell that was edited and already reverted, and a column that has no value on this document at all. The three are indistinguishable in the response, so treat the `404` as "there is nothing to put back" rather than as a missing document.

A manual column returns `400`. Every value in a manual column was typed by a person, so there is no analyzed value to go back to.

A document that belongs to another vault returns `404`, even when the caller can reach both vaults.

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 POST /vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert
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}/revert:
    post:
      tags:
        - Contract Intelligence
      summary: Restore the extracted value of a cell
      description: >-
        Take a hand edit off one cell and put the value the scan extracted back.
        This does not clear the cell: it restores the AI value, along with the
        source citations and reasoning the edit had been hiding.


        A cell with no hand edit on it returns `404`. So does a cell that was
        edited and already reverted, and a column that has no value on this
        document at all. The three are indistinguishable in the response, so
        treat the `404` as "there is nothing to put back" rather than as a
        missing document.


        A manual column returns `400`. Every value in a manual column was typed
        by a person, so there is no analyzed value to go back to.


        A document that belongs to another vault returns `404`, even when the
        caller can reach both vaults.


        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: revertVaultDocumentCell
      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
      responses:
        '200':
          description: The restored cell
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultDocumentCellResponse'
        '400':
          description: >-
            A manual column, or a column GC AI writes itself, has nothing to
            revert to
          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,
            access denied, or no hand edit to revert
          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:
    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.

````