Templates

Create a Markdown template and its source-defined signer roles and fields

post/api/v1/templates/markdown

Request

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

Request body

sourcestring required

Markdown with the supported Liquid variable, if/unless and for syntax.

sampleDataobject

Example JSON for previews. Never implicitly fills a generated agreement.

pageSize'A4' | 'Letter'
namestring required
descriptionstring

Example request

{
  "name": "Consulting agreement"
}

Response

collectionIdsstring[]

Collection memberships; omitted on lists unless includeCollections=true.

idstring required
namestring required
descriptionstring nullable
templateType'pdf' | 'docx' | 'markdown' required
baseFileUrlstring required
isActiveboolean required
sandboxboolean required

Created with a test-mode API key (sandbox template)

formFieldsDetectednumber nullable

How many interactive form fields the base PDF ships with, counted when the upload was confirmed. 0 for a flat PDF, null when the file was never scanned.

autoImportFormFieldsboolean required

Whether those embedded fields were placed as template fields automatically when the upload was confirmed.

catalogFormSlugstring nullable

Standard Forms catalog slug this was cloned from, e.g. "irs-w9" (null for uploaded templates)

catalogFormTitlestring nullable

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

catalogRevisionstring nullable

Catalog form revision at clone time, e.g. "Rev. March 2024"

catalogVersionIdstring nullable

ID of the catalog form version this was cloned from

fieldCountnumber

Fields the template places. On template lists only.

signerRoleCountnumber

Signer roles the template defines. On template lists only.

createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "formFieldsDetected": 23,
  "detectedMergeFields": [
    {
      "name": "client_name",
      "occurrences": 3
    }
  ]
}

Changes

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