---
title: "Get one document row"
method: GET
path: "/vaults/{id}/documents/{documentId}"
tags: ["Contract Intelligence"]
---

# Get one document row

`GET /vaults/{id}/documents/{documentId}`

## Request

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

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.

## Path parameters

- `id` string, uuid, required: The vault ID
- `documentId` string, uuid, required: The `document_id` of a row from `GET /vaults/{id}/documents`.

## Query parameters

- `include_deleted` 'true' | 'false': 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`.

## Response `200`

The document row

- VaultDocumentRow
  - `document_id` string, uuid, required: 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` string, uuid, required: 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` string, required: The name shown in the vault: the document title when the vault has named this row, and the upload filename otherwise.
  - `file_name` string, required: Filename of the upload, unchanged.
  - `source_name` string, nullable, required: The vault source this document arrived through, such as the connected folder name. Null for a source with no name.
  - `source_provider` string, nullable, required: The source type, such as `manual_upload`, `google_drive`, or `sharepoint`.
  - `extracted_at` string, nullable, required: ISO 8601 timestamp of the most recent value written to this row, or null before the first value lands.
  - `is_extraction_active` boolean, required: 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` string, nullable, required: 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` string, nullable, required: 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` object, required: 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`.

## Other responses

- `400`: Invalid query parameters
- `401`: Missing or malformed API key
- `403`: 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
- `404`: Vault or document not found, vault archived, or access denied
- `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)
