POST
/
interactions
/
{id}
/
documents
curl --request POST \
  --url https://api.{environment}.corti.app/v2/interactions/{id}/documents \
  --header 'Content-Type: application/json' \
  --data '{
  "context": [
    {
      "type": "facts",
      "data": [
        {
          "text": "<string>",
          "group": "other",
          "source": "core"
        }
      ]
    }
  ],
  "templateKey": "<string>",
  "name": "<string>",
  "outputLanguage": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "templateRef": "<string>",
  "isStream": true,
  "sections": [
    {
      "key": "<string>",
      "name": "<string>",
      "text": "<string>",
      "sort": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "outputLanguage": "<string>"
}

Headers

Tenant-Name
string

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

Example:

"copiloteu"

Path Parameters

id
string
required

The interaction ID representing the context for the request. Must be a valid UUID.

Body

application/json
context
object[]
required

An array of context objects.

templateKey
string
required

The key of the template that informs on what kind of document is to be generated.

outputLanguage
string
required

The language in which the document will be generated. Check https://docs.corti.ai/about/languages for more.

template
object

Template details if the template should be generated during the request.

name
string

An optional name for the document.

modelName
string
Example:

"\"model_name (Latest)\" | \"model_name_version\""

Response

201
application/json
id
string

Unique ID of the generated document

name
string

Name of the generated document

templateRef
string

Reference for the used template

isStream
boolean
sections
object[]

Individual document sections

createdAt
string

The original timestamp when the document was created.

updatedAt
string

The timestamp when the document was last updated.

outputLanguage
string

The language in which the document will be generated. Check https://docs.corti.ai/about/languages for more.