Skip to main content
POST
/
documents
/
templates
/
{templateID}
/
versions
cURL
curl --request POST \
  --url https://api.{environment}.corti.app/v2/documents/templates/{templateID}/versions/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Tenant-Name: <tenant-name>' \
  --data '
{
  "generation": {
    "instructions": {
      "prompt": "<string>"
    },
    "sections": [
      {
        "sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "orderIndex": 123
      }
    ]
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "versionNumber": 123,
  "generation": {
    "instructions": {
      "prompt": "<string>"
    },
    "sections": [
      {
        "sectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "orderIndex": 123
      }
    ]
  },
  "deletedAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.corti.ai/llms.txt

Use this file to discover all available pages before exploring further.

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"

Path Parameters

templateID
string<uuid>
required

Body

application/json
generation
object
required

When the template inherits from another template, all inner fields are optional. Any field omitted is inherited from the parent's published version.

Response

Created — returns shallow (unresolved) template version

Template version with raw authored values — no inheritance resolution applied. Sections are returned as references (IDs), not fully resolved objects. Use this to inspect what was explicitly set on this version versus inherited. Returned by GET, LIST, and POST version endpoints.

id
string<uuid>
required

The UUID of the version.

versionNumber
integer
required

Starts at 0 and auto-increments.

generation
object
required

Template generation with section references (not fully resolved). Use the resolved TemplateGeneration for hydrated section data.

deletedAt
string<date-time> | null

Present when the template version has been deleted.