curl --request GET \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://app.gc.ai/api/external/v1/vaults/{id}/documents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"documents": [
{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Acme MSA (2024)",
"file_name": "acme-msa-2024.pdf",
"source_name": "<string>",
"source_provider": "manual_upload",
"extracted_at": "<string>",
"is_extraction_active": true,
"deleted_at": "<string>",
"removed_as_duplicate_at": "<string>",
"values": {}
}
],
"total": 123,
"pagination": {
"limit": 123,
"offset": 123,
"has_more": true
}
}{
"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": {}
}Read a Vault's Document Table
Read the extracted table of a Contract Intelligence vault: one row per document, with every column the vault scans for.
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.
Filtering and sorting run in the database over the whole vault, so total counts every matching document and not just the page. Both name their target by the column field_key that GET /vaults/{id}/columns reports. A sort or filter naming a column the vault does not have returns 400, and so does a filter whose value does not fit its operator, because a silently dropped rule paired with a confident total is worse than a rejected request.
Pass filter as a URL-encoded JSON array of rules, each {"field","operator","value"}, where field is a column field_key. For example filter=[{"field":"governingLaw","operator":"equals","value":"Delaware"}]. Operators that take no value (is_empty, is_not_empty) omit it; number_range and date_range take {"from","to"} with either side optional; in and equals_only take an array. Rules combine with AND.
A page holds at most 200 rows. total scans the whole filtered vault, so a client paging quickly can pass include_total=false and read the count on its own cadence.
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 GET \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://app.gc.ai/api/external/v1/vaults/{id}/documents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"documents": [
{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Acme MSA (2024)",
"file_name": "acme-msa-2024.pdf",
"source_name": "<string>",
"source_provider": "manual_upload",
"extracted_at": "<string>",
"is_extraction_active": true,
"deleted_at": "<string>",
"removed_as_duplicate_at": "<string>",
"values": {}
}
],
"total": 123,
"pagination": {
"limit": 123,
"offset": 123,
"has_more": true
}
}{
"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
Query Parameters
Max rows to return (default 100, max 200)
1 <= x <= 200Number of items to skip (default 0)
x >= 0Case-insensitive substring match on the document name, the upload filename, or the Document Name column.
200URL-encoded JSON array of filter rules. See the description for the shape and the operators.
8000"[{\"field\":\"governingLaw\",\"operator\":\"equals\",\"value\":\"Delaware\"}]"
Column field_key to sort by. Also accepts fileName (the upload filename), extractedAt, and sourceName. Defaults to fileName, ascending.
200"extractedAt"
Sort direction. Defaults to asc.
asc, desc When false, skip the whole-vault count and return total: null. Defaults to true.
true, false "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.
true, false "true"
Was this page helpful?