---
title: "Restore the extracted value of a cell"
method: POST
path: "/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert"
tags: ["Contract Intelligence"]
---

# Restore the extracted value of a cell

`POST /vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert`

## Request

- Base URL: `https://app.gc.ai/api/external/v1`
- URL: `https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/gc-ai/apis/gc-ai-external-api/docs/vaults/:id/documents/:documentId/cells/:fieldKey/revert/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `id` string, uuid, required: The vault ID
- `documentId` string, uuid, required: The `document_id` of a row from `GET /vaults/{id}/documents`.
- `fieldKey` string, required: 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.

## Response `200`

The restored cell

- VaultDocumentCellResponse
  - `document_id` string, uuid, required: Document the cell belongs to
  - `field_key` string, required: Column key for the cell
  - `cell` object, required: The cell after the write, in the same shape `GET /vaults/{id}/documents` reports under `values`.
    - `value` string, nullable, required: 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.
    - `is_edited` boolean, required: True when a person replaced the scanned value by hand. The `value` is theirs, not the scan output.
    - `edited_at` string, nullable, required: ISO 8601 timestamp of the hand edit, or null.
    - `edited_by` string, nullable, required: Display name of the person who made the edit, or null.
    - `edited_by_user_id` integer, nullable, required: 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` boolean, required: True when the scan recorded where in the document it read this value. Read the citations in the app; v1 does not return them.
  - `extracted_at` string, nullable, required: 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.

## Other responses

- `400`: A manual column, or a column GC AI writes itself, has nothing to revert to
- `401`: Missing or malformed API key
- `403`: Contract Intelligence is not enabled for this account. Contact support to request access., or the caller's vault role cannot edit data
- `404`: Vault or document not found, the document belongs to another vault, access denied, or no hand edit to revert
- `409`: 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
- `422`: Vault access is per-user and requires a user-scoped API key (u:gcai_...).
- `429`: Rate limit exceeded. See [Rate Limits](https://docs.gc.ai/api-reference/concepts/rate-limits) for the tiers, limits, and how to back off.
- `500`: Internal server error
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/gc-ai/apis/gc-ai-external-api.md) - [All operations](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/revisions/2bbdfddf7107?raw)
