Skip to main content
POST
/
api
/
v1
/
dev
/
render
Render a document from JSON (temporary)
curl --request POST \
  --url https://api.autype.com/api/v1/dev/render \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "config": {
    "document": {
      "type": "pdf",
      "size": "A4"
    },
    "variables": {
      "companyName": "Acme Inc"
    },
    "sections": [
      {
        "id": "section-1",
        "type": "flow",
        "content": [
          {
            "type": "h1",
            "text": "Hello {{companyName}}"
          },
          {
            "type": "text",
            "text": "This is a paragraph."
          }
        ]
      }
    ]
  },
  "webhook": {
    "webhookUrl": "https://example.com/webhook",
    "webhookAuth": {
      "headerName": "X-API-Key",
      "headerValue": "my-secret-key",
      "basicAuthUsername": "user",
      "basicAuthPassword": "pass"
    }
  }
}
'
{
  "jobId": "<string>",
  "status": "PENDING",
  "format": "PDF",
  "creditCost": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "downloadUrl": "<string>",
  "filename": "<string>",
  "error": "<string>",
  "completedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

API Key (starts with ak_...)

Query Parameters

strict
boolean

Enable strict validation mode (validates anchors, references, citations, abbreviations)

Body

application/json
config
object
required

Complete document JSON following the Autype document schema. Must include document (with type) and sections. May also include variables, defaults, abbreviations, citations, and style — all at the same level inside this object. The output format is determined by the document.type field (pdf, docx, or odt). Variable placeholders can use either {{varName}} or ${varName} syntax — both are accepted on input. See the Document JSON Syntax docs for the full schema reference.

Example:
{
"document": { "type": "pdf", "size": "A4" },
"variables": { "companyName": "Acme Inc" },
"sections": [
{
"id": "section-1",
"type": "flow",
"content": [
{
"type": "h1",
"text": "Hello {{companyName}}"
},
{
"type": "text",
"text": "This is a paragraph."
}
]
}
]
}
webhook
object

Optional webhook configuration. Receives a POST when the job completes or fails.

Response

Render job created

jobId
string
required

Render job ID for status polling

status
enum<string>
required
Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
format
enum<string>
required
Available options:
PDF,
DOCX,
ODT
creditCost
number
required

Credit cost for this render job

createdAt
string<date-time>
required
downloadUrl
string

Autype API download URL with signed token (only when completed). Supports direct browser download.

filename
string

Filename for download

error
string

Error message if failed

completedAt
string<date-time>