Templates

Create a document from this template

post/api/v1/templates/{id}/create-document

Request

  • Base URL: https://api.korala.ai
  • URL: https://api.korala.ai/api/v1/templates/{id}/create-document
  • Auth: one of:
    • API key in header X-API-Key
    • bearer (a scheme the document does not define)

Path parameters

idstring required

Request body

sandboxboolean

Dashboard mode. API keys always use their authenticated mode.

collectionIdsstring[]

Explicit destination collections. Omission or [] leaves the resource unassigned.

templateDataobject

JSON input for Markdown/Liquid templates. Explicit input is required for generation; preview sample data is never used implicitly.

namestring required
signersobject

Map of signer role ID to signer details (required if template has signer roles)

variablesobject

Variables to substitute in text fields (PDF) or DOCX body placeholders (DOCX)

suppressNotificationsboolean

Suppress all email notifications for this document

Example request

{
  "name": "NDA - Acme Corp",
  "signers": {
    "role-id-1": {
      "email": "client@acme.com",
      "name": "John Doe"
    }
  },
  "variables": {
    "client_name": "Acme Corporation",
    "contract_date": "2026-01-15"
  }
}

Response

collectionIdsstring[]

Collection memberships; omitted on lists unless includeCollections=true.

idstring required
namestring required
status'draft' | 'pending' | 'completing' | 'completed' | 'failed' | 'voided' | 'expired' required
originalFileUrlstring required
signedFileUrlstring nullable
certificateFileUrlstring nullable
expiresAtstring date-time nullable
completedAtstring date-time nullable
sandboxboolean required

Whether this is a sandbox (test) document

suppressNotificationsboolean required

Whether email notifications are suppressed

formFieldsDetectednumber nullable

How many interactive form fields the uploaded PDF ships with, counted when the upload was confirmed. 0 for a flat PDF, null when the file was never scanned (e.g. generated from a template).

autoImportFormFieldsboolean required

Whether those embedded fields are placed automatically for the first signer added to this document.

catalogFormSlugstring nullable

Standard Forms catalog slug this document was generated from, e.g. "irs-w9" (null for non-catalog documents)

catalogFormTitlestring nullable

Catalog form title, e.g. "IRS Form W-9 …"

catalogRevisionstring nullable

Catalog form revision, e.g. "Rev. March 2024"

catalogVersionIdstring nullable

ID of the catalog form version this document is based on

templateIdstring uuid nullable

The workspace template this document was created from

templateNamestring nullable

That template's current name, on the document detail only (null if the template was deleted)

signerNamesstring[]

Names of the people signing, in signing order. On document lists only.

createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "formFieldsDetected": 23
}

Changes

No recorded changes to this operation across all 1 revision of this API.