Skip to main content
PUT
@firma-dev/sdk

Authorizations

Authorization
string
header
required

API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.

Path Parameters

id
string<uuid>
required

Body

application/json
template_properties
object

Update template metadata and settings

users
object[]

Upsert users (include id to update, omit to create). An existing recipient cannot be changed between CC and Signer/Approver (400); delete it and create it again.

force_remove_conditions
boolean
default:false

When deleting users whose fields are referenced by conditions in other fields: if true, automatically remove the condition references; if false (default), the request will be rejected with an error.

deleted_users
object[]

Users to delete with field handling strategy

fields
object[]

Upsert fields (include id to update, omit to create)

reminders
object[]

Upsert reminders (include id to update, omit to create)

documents_layout_version
integer

The documents_layout_version of your last read (multi-document). Required for a field write on a template with more than one document or a layout version above 1 (409 DOCUMENTS_LAYOUT_VERSION_REQUIRED); a stale value answers 409 DOCUMENT_SET_VERSION_CONFLICT; a value that is not a non-negative integer answers 400 VALIDATION_ERROR with key documents_layout_version.

Required range: x >= 0
seal_participants
object[]

When present, the array replaces the template's whole set of seal participants and removes the fields the former ones owned; [] removes them all; omit the key to leave them unchanged. null is not accepted: it answers 400 VALIDATION_ERROR. See the operation description for the rules of each entry and the errors.

Response

Template updated successfully. Returns full template with all relationships. seal_participants lists only the seal participants whose seal belongs to the company of the API key: a seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.

A template with its seal participants: every key of Template, plus seal_participants. seal_participants lists only the seal participants whose seal belongs to the company of the API key: a seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.

id
string<uuid>
required

Unique identifier for the template

name
string
required

Template name

Maximum string length: 255
created_date
string<date-time>
required

Template creation timestamp

seal_participants
object[]
required

The template's seal participants in order, limited to those whose seal belongs to the company of the API key. A seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.

description
string | null

Template description

document_url
string<uri>

Pre-signed URL to the PDF document. This is a time-limited signed URL for secure access - see document_url_expires_at for expiration time. Initial URLs are valid for 7 days; refreshed URLs are valid for 1 hour. Request a new template retrieval to get a fresh URL if expired.

document_url_expires_at
string<date-time> | null

ISO 8601 timestamp when the document_url will expire. After this time, the URL will return an access denied error. Fetch the template again to receive a fresh signed URL.

page_count
integer

Number of pages in the document

Required range: x >= 1
expiration_hours
integer
default:168

Hours until signing requests created from this template expire

Required range: x >= 1
credit_cost
integer
default:1

Number of credits consumed when a signing request is sent from this template. Minimum value is 1.

Required range: x >= 1
settings
object

Settings returned by the signing request list and detail endpoints. Templates use the TemplateSettings schema (no identity fields).

recipients
object[]

Template recipients (included in GET single template)

fields
object[]

Template fields (included in GET single template)

updated_date
string<date-time>

Template last update timestamp

documents
object[]

The template's documents in position order (multi-document; present only for companies enabled for it). On GET /templates (the list): A list entry carries no document_url. A parent whose document set has never been changed lists documents: [] here, while its single-resource GET answers its one document (with document_id null). On GET /templates/{id}, PUT /templates/{id} and POST /templates: A parent whose document set has never been changed answers its one document, with document_id null.

documents_version
integer

Version of the document set, raised by every document change (multi-document; enabled companies only).

documents_layout_version
integer

Version of the document layout, raised when documents are added, removed or reordered (multi-document; enabled companies only). Field writes on a signing request with more than one document send it back as documents_layout_version.