curl --request PATCH \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "Delaware"
}
'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}"
payload = { "value": "Delaware" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: 'Delaware'})
};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'Delaware'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}"
payload := strings.NewReader("{\n \"value\": \"Delaware\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"Delaware\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"Delaware\"\n}"
response = http.request(request)
puts response.read_body{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_key": "<string>",
"cell": {
"value": "Delaware",
"is_edited": true,
"edited_at": "<string>",
"edited_by": "<string>",
"edited_by_user_id": 123,
"has_citations": true
},
"extracted_at": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}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.
curl --request PATCH \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "Delaware"
}
'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}"
payload = { "value": "Delaware" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: 'Delaware'})
};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'Delaware'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}"
payload := strings.NewReader("{\n \"value\": \"Delaware\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"Delaware\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"Delaware\"\n}"
response = http.request(request)
puts response.read_body{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_key": "<string>",
"cell": {
"value": "Delaware",
"is_edited": true,
"edited_at": "<string>",
"edited_by": "<string>",
"edited_by_user_id": 123,
"has_citations": true
},
"extracted_at": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Path Parameters
The vault ID
The document_id of a row from GET /vaults/{id}/documents.
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.
1 - 100"governingLaw"
Body
The value to store. Send an empty string to clear the cell.
50000"Delaware"
Response
The stored cell
Document the cell belongs to
Column key for the cell
The cell after the write, in the same shape GET /vaults/{id}/documents reports under values.
Show child attributes
Show child attributes
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.
Was this page helpful?