Skip to main content
POST
Upload template

Authorizations

Authorization
string
header
required

API key issued from Settings → API Keys. Pass as Authorization: Bearer <key>.

Body

application/json
fileId
string
required

Reusable file id produced by the direct file upload flow. It is consumed as upload transport, not exposed as template identity.

Pattern: ^file_[A-Za-z0-9_-]{21}$
name
string
description
string
staged
boolean

When true, the create response includes a one-time cleanupProof for unpublished CLI staging. Normal uploads omit this.

Response

Created template

id
string
required

Stable logical template id (tmpl_…).

Pattern: ^tmpl_[A-Za-z0-9_-]{21}$
name
string
required
filename
string
required
format
enum<string>
required
Available options:
docx,
xlsx
mimeType
string
required
tokens
object[]
required
grammar
object
required
createdAt
required
description
string | null
size
integer | null
Required range: 0 <= x <= 9007199254740991
sha256
string | null
Required string length: 64
currentRevision
object | null
updatedAt
cleanupProof
string

One-time proof to finalize or hard-clean this unpublished staged template. Returned only on staged create, never on GET or list.