Skip to main content
POST
/
api
/
v1
/
templates
Create Template
curl --request POST \
  --url https://api.artosai.com/api/v1/templates/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_name": "<string>",
  "document_type": "<string>",
  "sections": [
    {
      "order_index": 123,
      "level": 123,
      "section_name": "<string>",
      "synopsis": "<string>",
      "template_instructions": "<string>",
      "template_text": "<string>",
      "section_type": "<string>",
      "section_mode": "<string>",
      "is_repeating": false,
      "expansion_type": "<string>",
      "data_instructions": "<string>",
      "guidance": "<string>",
      "outline_text": "<string>",
      "allowed_data_rules": [
        "<string>"
      ],
      "examples": [
        {}
      ],
      "rules": [
        {
          "confidence_score": 123,
          "rule_type": "<string>",
          "rule_mode": "<string>",
          "description": "<string>",
          "explanation": "<string>",
          "generated_content": "<string>",
          "rule_parameters": {}
        }
      ]
    }
  ],
  "template_s3_uri": "<string>",
  "template_file_name": "<string>",
  "document_description": "<string>",
  "tags": [
    "<string>"
  ],
  "example_s3_uris": [
    "<string>"
  ],
  "example_skeletons": [
    "<string>"
  ],
  "users": [
    "<string>"
  ]
}
'
{
  "template_id": "<string>",
  "template_name": "<string>",
  "organization_id": "<string>",
  "section_count": 123,
  "rule_count": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Token provides organization-scoped access.

Body

application/json
template_name
string
required

Name of template

document_type
string
required

Document type (e.g., CSR, IND)

sections
object[]
required

At least one section required

template_s3_uri
string | null

S3 URI for template file

template_file_name
string | null

Template file name

document_description
string | null
tags
string[] | null
example_s3_uris
string[] | null

S3 URIs for example documents

example_skeletons
string[] | null

Example document skeletons

users
string[] | null

User IDs with access

Response

Template created successfully

template_id
string

UUID of created template

template_name
string
organization_id
string
section_count
integer
rule_count
integer

Total rules across sections

created_at
string<date-time>
message
string | null