Skip to main content
PATCH
Update a template content block

Authorizations

Authorization
string
header
required

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Headers

Sajn-Version
enum<string>

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Available options:
2026-09,
2026-10
Sajn-Workspace
string

ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.

Idempotency-Key
string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Maximum string length: 255

Path Parameters

id
string
required

The template ID.

contentId
string
required

The content block ID.

Body

application/json

Body

type
enum<string>

Field type

Available options:
TEXT,
HTML,
FORM,
PDF,
PRODUCT_TABLE,
TABLE,
SPACER,
PAGE_BREAK,
DURATION
position
number

0-based order of the field among the content blocks

fieldMeta
object

The full metadata for the field type. It replaces the stored metadata.

Response

200

id
string
required

Unique field identifier

documentId
string | null
required

Document this field belongs to

templateId
string | null
required

Template this field belongs to

type
enum<string>
required

Field type

Available options:
TEXT,
HTML,
FORM,
PDF,
PRODUCT_TABLE,
TABLE,
SPACER,
PAGE_BREAK,
DURATION
position
number
required

0-based order of the field among the document's content blocks

fieldMeta
object
required

Type-specific content. For PDF fields this includes placedFields (boxes placed on the PDF pages) and formFields (form fields extracted from the PDF).

createdAt
string<date-time> | null
required

Date and time when the field was created

updatedAt
string<date-time> | null
required

Date and time when the field was last updated