curl --request POST \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert', 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}/revert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
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": {}
}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.
curl --request POST \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert', 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}/revert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}/cells/{fieldKey}/revert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
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"
Response
The restored 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?