Skip to main content
GET
/
documents
/
List documents
curl --request GET \
  --url https://api.{environment}.corti.app/v2/documents/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Tenant-Name: <tenant-name>'
const options = {
method: 'GET',
headers: {'Tenant-Name': '<tenant-name>', Authorization: 'Bearer <token>'}
};

fetch('https://api.{environment}.corti.app/v2/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using RestSharp;


var options = new RestClientOptions("https://api.{environment}.corti.app/v2/documents/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Tenant-Name", "<tenant-name>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
import requests

url = "https://api.{environment}.corti.app/v2/documents/"

headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/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: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);

$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://api.{environment}.corti.app/v2/documents/"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.{environment}.corti.app/v2/documents/")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "templateVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "language": "<string>",
    "stringDocument": {},
    "labels": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "interactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "structuredDocument": {}
  }
]
{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}

Authorizations

Authorization
string
header
required

Input your token

Headers

Tenant-Name
string
required

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

Example:

"base"

Query Parameters

templateId
string<uuid>

Filter documents by template UUID.

interactionId
string<uuid>

Filter documents by interaction UUID.

label
string[]

Filter documents by label in key:value format. Repeatable; matches documents that have any of the given labels.

Response

OK

id
string<uuid>
required
name
string
required
templateId
string<uuid>
required

The template ID used for generation. For a plain templateRef with no overrides this is the referenced template. For other paths it is the newly saved auto-generated template aggregate.

templateVersionId
string<uuid>
required

The specific template version that was used for generation.

language
string
required

The BCP 47 language tag of the generated output.

stringDocument
object
required

The generated document as a map of section key to rendered string output.

labels
object[]
required

Key/value labels attached to this document.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
interactionId
string<uuid> | null

The interaction whose context was used to generate this document, if supplied.

structuredDocument
object | null

The generated document as a structured object keyed by section.