Skip to main content
POST
@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.

Body

application/json
name
string
required

Signing request name

Maximum string length: 255
Example:

"Employment Contract - John Doe"

document
string<byte>
required

Base64-encoded PDF or DOCX document (mutually exclusive with template_id and document_id). DOCX files are automatically converted to PDF. For documents larger than 5 MB, use POST /documents and pass the document_id instead.

Example:

"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291c..."

description
string

Signing request description

Example:

"Full-time employment contract for Software Engineer position"

template_id
string<uuid>

Template ID to use (mutually exclusive with document and document_id).

Seals. If the template has seal participants and seal_participants is absent or null, the request inherits them and the template fields that belong to them. An array, including [], replaces them: the template's seal participants and their fields are not copied. Any other type answers 400 VALIDATION_ERROR. A kept seal and the recipients are renumbered together into one contiguous order sequence that keeps the template's relative order. When the template has no recipients of its own, inherited seals are placed after the request's recipients. A template seal follows the current version of its lineage: the request attaches the current version, not the version the template points at. If that current version is revoked or deleted, or the lineage has no current version, the call answers 409 SEAL_UNAVAILABLE and creates nothing. A template seal that the API key's company cannot see, or whose current version is limited to a workspace other than the API key's workspace, is not copied and neither are its fields; the request is still created and seal_participants lists the seal as a dropped entry (dropped: true). If a seal would be kept while organization seals are not enabled, the call answers 503 SEALS_DISABLED.

Example:

"123e4567-e89b-12d3-a456-426614174000"

expiration_hours
integer
default:168

Hours until signing request expires (default: 168 = 7 days)

Required range: x >= 1
Example:

168

recipients
object[]

Array of recipients. At least one must be a Signer. For document-based: required. For template-based: optional (uses template recipients if omitted). Use template_user_id (preferred) or order (fallback) to match template users. Recipients with designation CC are never matched to template users; they are added as CC recipients. The template's CC recipients are copied to the signing request, skipping any whose email (case-insensitive) is already on a CC recipient of the request.

Minimum array length: 1
fields
object[]

Array of fields to be filled (document-based only)

anchor_tags
object[]

Anchor tags for automatic field placement. Text markers in the PDF are located and converted to positioned fields. The anchor text is removed from the PDF after processing. Fields created from anchor tags are added alongside any manually specified fields. Only available for document-based creation (not template-based).

Maximum array length: 100
reminders
object[]

Array of reminder configurations

settings
object

Signing request settings

document_id
string<uuid>

ID of a previously uploaded document (mutually exclusive with document and template_id). Obtain by calling POST /documents first.

Example:

"123e4567-e89b-12d3-a456-426614174000"

language
enum<string> | null

Opt-in email language for this signing request. When set, all signer-facing emails (and their date formatting) use it. Omit or null to fall back to the workspace, then company, default language (unchanged behavior).

Available options:
en,
es,
it,
pt,
fr,
de,
el,
ru,
pl,
cs,
sv,
nl,
ro,
nb,
ca
completion_title
string | null

Heading shown on the completion page after signing. Falls back to the template value (when template_id is used), then the workspace and company defaults.

Maximum string length: 200
Example:

"Thank you for signing"

completion_message
string | null

Body text shown on the completion page after signing. Falls back to the template value (when template_id is used), then the workspace and company defaults.

Maximum string length: 1000
Example:

"Your signed copy is on its way to your inbox."

completion_redirect_url
string<uri> | null

URL the signer is redirected to from the completion page. Must use https:// (http://localhost and http://127.0.0.1 are also accepted on test-mode signing requests). Falls back to the template value (when template_id is used), then the workspace and company defaults.

Maximum string length: 2000
Example:

"https://example.com/thank-you"

completion_redirect_delay
integer | null

Seconds the completion page waits before redirecting (0 redirects immediately). Only applies when a redirect URL resolves; the page falls back to 5 seconds when no level sets a delay. Falls back to the template value (when template_id is used), then the workspace and company defaults.

Required range: 0 <= x <= 30
Example:

5

seal_participants
object[] | null

Organization seal participants for the new signing request: with template_id, omit the key or send null to inherit the template's seals, send [] for no seals, or send an array to replace them. A replaced template seal and its fields are not copied. Any other type answers 400 VALIDATION_ERROR. On a template-based request the seal orders and the recipients' orders are renumbered together into one contiguous sequence, whether the seals are inherited or sent in the array. A non-empty array, or an inherited seal that would be kept, requires organization seals to be enabled; otherwise the call answers 503 SEALS_DISABLED.

document_ids
string<uuid>[]

Temporary upload ids from POST /documents, in document order, to create a multi-document signing request (enablement required). Exactly one of document, document_id or document_ids or template_id (400 CONFLICTING_DOCUMENT_SOURCE); a repeated id answers 400 DUPLICATE_DOCUMENT_ID, more than 20 400 MAX_DOCUMENTS_EXCEEDED, an unknown or expired upload 400 DOCUMENT_UPLOAD_NOT_FOUND, a set above 100 MB 413 DOCUMENT_SET_TOO_LARGE; more than one id for a company not enabled answers 409 MULTI_DOCUMENT_READ_ONLY.

Required array length: 1 - 20 elements

Response

Signing request created and sent successfully. The response may include non-blocking anchor-tag warnings.

Signing request created and sent

id
string<uuid>
required

Signing request ID

name
string
required

Signing request name

status
enum<string>
required

Always 'sent' for this endpoint

Available options:
sent
description
string | null

Signing request description

document_url
string<uri>

Signed URL to access document

page_count
integer

Number of pages in document

expiration_hours
integer

Hours until expiration

settings
object

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

created_date
string<date-time>
sent_date
string<date-time>

When request was sent

template_id
string<uuid> | null
first_signer
object

Details of the first signer who received the email

recipients
object[]

All recipients with real UUIDs

fields
object[]

All active fields of the new signing request, including the fields owned by seal participants. Each item is the stored field record, not the Field shape used in requests: for example the field type is in field_type, and a seal-owned field has no recipient and names its seal participant in seal_participant_id.

seal_participants
object[]

Organization seal participants in the signing order. Empty when the request has no seals. Each item is either a persisted seal participant (dropped: false) or, on a template-based request, an entry for a template seal that was not copied because the API key's company cannot see the seal or because the seal is limited to another workspace (dropped: true, id and order null, seal_out_of_scope: true). Dropped entries come after the persisted ones, in template order. Template seals that an explicit seal_participants array replaced are not listed.

A persisted seal participant of the new document: every key of SealParticipantApi, plus dropped: false.

credits_remaining
integer

Company credits remaining after deduction

warnings
string[]

Optional non-blocking warnings, including unknown anchor-tag properties during the compatibility window and anchor-processing warnings.