Skip to main content
PUT
Replace Form Template

Authorizations

Authorization
string
header
required

API key authentication. Send your raw API key as the Authorization header value with NO scheme prefix — Authorization: YOUR-API-KEY. Do NOT prefix it with Bearer or ApiKey, and do not use an X-API-Key header; those are not accepted.

Headers

Idempotency-Key
string

Optional key for a safe retry of this upload or replacement. Send a new value, 1 to 255 printable ASCII characters, for each operation. A successful attempt reserves the key for 30 days from admission. Retries do not extend that window. After 30 days the same key runs as a new request, even if its body differs. Within that window, retry the same path, query and JSON body with the same key to receive the original checkpoint's current summary and status without uploading again. A failed attempt stores no key. Keys belong to the calling credential. Within 30 days, reusing one with a different request returns 422 IDEMPOTENCY_KEY_REUSED; an invalid key returns 400 INVALID_IDEMPOTENCY_KEY.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]{1,255}$

Path Parameters

companyId
string<uuid>
required

Company identifier

number
string
required

The form template's stable FM-XXXX number (as returned by the Upload Form Template endpoint). It identifies the template across all of its versions and is the same value forms-logic rules reference.

Body

application/json
fileName
string
required

Original file name of the replacement, including the .docx extension (used only for extension detection — the template's display name is preserved). Must be non-empty.

fileBase64
string
required

The raw .docx bytes of the new version, base64-encoded.

Response

New version created. The response is the new checkpoint's summary — note number and templateKey are unchanged from the previous version.

A single form-template checkpoint.

templateKey
string<uuid>
required

Stable identifier of the template across its versions.

checkpointId
string<uuid>
required

Identifier of this specific checkpoint (version) of the template.

companyId
string<uuid>
required
name
string
required

Display name (derived from the uploaded file name).

number
string
required

Human-facing form number (e.g. FM-0010).

category
enum<string>
required

The form category assigned to the template.

Available options:
event,
quote-flow,
quote-bind-flow,
insured,
submission,
person,
organization,
unknown
storagePath
string
required

Internal storage key of the checkpoint's document.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
createdBy
string | null
updatedBy
string | null