Templates

Confirm template upload and set metadata

post/api/v1/templates/{id}/confirm

Request

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

Path parameters

idstring required

Request body

namestring required
descriptionstring
autoImportFormFieldsboolean

When the base PDF is a fillable form, its embedded fields are placed as template fields automatically — same positions, types, character limits and font sizes the form declares — and assigned to the template's first signer role (one named "Signer" is created when the template has none). Defaults to false for templates created with an API key (integrations provision their own roles and fields) and true for templates created from the dashboard; pass a value to override either way.

Example request

{
  "name": "NDA Template",
  "description": "Standard non-disclosure 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.