curl --request POST \
--url https://api.{environment}.corti.app/v2/documents/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <tenant-name>' \
--data '{
"name": "<string>",
"inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"publish": true
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inheritedFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoGenerated": true,
"source": "user",
"description": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 123,
"generation": {
"instructions": {
"prompt": "<string>"
},
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inheritedFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoGenerated": true,
"source": "user",
"description": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 123,
"generation": {
"heading": "<string>",
"instructions": {
"contentPrompt": "<string>",
"writingStylePrompt": "<string>",
"miscPrompt": "<string>"
},
"outputSchema": {
"type": "string",
"description": "<string>",
"default": "<string>",
"enum": [
"<string>"
],
"pattern": "<string>"
}
},
"deletedAt": "2023-11-07T05:31:56Z"
}
}
]
},
"deletedAt": "2023-11-07T05:31:56Z"
}
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Guided Templates
Create template
Creates a new template with an initial version. When publish is true (default),
the response includes the published version with full inheritance resolution applied
(template-level and section-level inheritance walked).
POST
/
documents
/
templates
/
curl --request POST \
--url https://api.{environment}.corti.app/v2/documents/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <tenant-name>' \
--data '{
"name": "<string>",
"inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"publish": true
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inheritedFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoGenerated": true,
"source": "user",
"description": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 123,
"generation": {
"instructions": {
"prompt": "<string>"
},
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"languages": [
"<string>"
],
"regions": [
"<string>"
],
"specialties": [
"<string>"
],
"labels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inheritedFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"autoGenerated": true,
"source": "user",
"description": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 123,
"generation": {
"heading": "<string>",
"instructions": {
"contentPrompt": "<string>",
"writingStylePrompt": "<string>",
"miscPrompt": "<string>"
},
"outputSchema": {
"type": "string",
"description": "<string>",
"default": "<string>",
"enum": [
"<string>"
],
"pattern": "<string>"
}
},
"deletedAt": "2023-11-07T05:31:56Z"
}
}
]
},
"deletedAt": "2023-11-07T05:31:56Z"
}
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Headers
Body
application/json
- Inherit from existing template
- Create from scratch
Creates a template that inherits from another template. Any fields omitted in generation are inherited from the referenced template's published version; any fields provided override the inherited values.
Response
Created
Template as returned by single-resource endpoints (GET, POST, PATCH on
/documents/templates/{templateID}). Extends GuidedTemplateListItem with the resolved
publishedVersion.
Was this page helpful?