Skip to content

Create Synchronous Document

POST {{base_url}}/v1/documents
curl -X POST {{base_url}}/v1/documents \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "name": "Service Provision Contract No. 9",
  "document_pdf_url": "https://files.example.com/contract.pdf",
  "signers": [{
    "name": "John Doe",
    "email": "[email protected]",
    "country_code": "+51",
    "phone": "900000001"
  }]
}'
Sin ejecutar·latencia ~ 412 ms
Demo pública · no guarda datos · firma con sandbox PKI

This endpoint allows you to register a new main document and, optionally, attachments, signers, and signature placements in a single call. It responds with 201 and the complete envelope.

Sync POST /v1/documents
Documents per envelope up to 5 (main + 4 attachments)
Weight 50 MB total envelope
File source base64, URL
Response 201 with complete envelope
When interactive / few documents

The access token obtained during the login process must be sent with each request:

ParameterTypeDescriptionLimits
Authorization*stringAccess token obtained during login, with the 'Bearer' prefix.Required
Content-TypestringSpecifies the content type of the HTTP request body. For requests that include JSON data'application/json'

Required Fields

Fields marked with an asterisk (*) are required and must be provided in the request. Other fields are optional.


| Limit | Value | |—|—|—| | Documents per envelope (main + attachments) | 5 | | TOTAL envelope weight | 50 MB | | Attachments (extra_docs) | Maximum 4 (= total − 1) | | A single document | ≤ total weight (50 MB) |


You must strictly choose ONE of the following options (they are mutually exclusive; sending two will cause a 422 error):

ParameterTypeDescriptionLimits
document_pdf_urlurlPublic URL from which the system will download the PDF file. RecommendedMutually exclusive
document_pdf_base64stringPDF file encoded in Base64 format.Mutually exclusive

ParameterTypeDescriptionLimits
name*stringOfficial document name. The system automatically normalizes it to UPPERCASE and appends the '.pdf' extension.Required
ref_idstringReference for the main file. In this synchronous flow, the system ignores it by default, always mapping the main file as 'main'.Optional (ignored)

ParameterTypeDescriptionLimits
external_idstring(255)Free external ID assigned by the integrator (pass-through) for internal control.Optional
folder_tokenuuidToken of the destination folder where the document will be saved.Optional
signature_deadlineISO8601Future deadline date and time to complete signatures (e.g. '2026-12-31T23:59:59.000Z').Full UTC format
sender_namestring(150)Sender name shown to signers in notifications. If omitted, the owner's name is used.Max 150 characters
reply_to_emailemailEmail address configured to receive replies from sent notifications.Email format
disable_owner_notificationsboolCompletely disables email alerts to the envelope owner.Default: false
disable_signer_notificationsboolDisables automatic email alerts and flows to signers.Default: false
send_automatic_invitationsboolImmediately sends invitation emails or messages when creating the envelope.Default: true
is_signature_order_activeboolForces signers to strictly follow the established hierarchical order (sequential).Default: false
is_rejection_allowedboolEnables the button for a signer to formally reject the document by explaining the reason.Default: false
is_original_download_allowedboolAllows the signer to download the clean original PDF before stamping their signature.Default: true
reminder_every_n_daysintFrequency in days to send automatic pending signature reminders (range 0 to 30).0 to disable
observersarray<string>List of observer emails with read-only access to the document (maximum 20).Array of emails
redirect_linkstring(255)Redirect URL that the browser will send the user to immediately after signing.Must be a valid URL
metadataobjectFree JSON key-value storage object for custom metadata.Pass-through

Allows adding up to a maximum of 4 supplementary documents in the same call.

ParameterTypeDescriptionLimits
extra_docs[].ref_id*stringUnique and required identifier for the attachment. It is essential for associating signature coordinates later.Required and unique
extra_docs[].namestringAttachment file name.Optional
extra_docs[].pdf_urlurlPublic URL for direct attachment download. RecommendedMutually exclusive with base64 or key

Required Fields

Fields marked with an asterisk (*) are required and must be provided in the request. Other fields are optional.


Defines the document actors. Minimum required fields per element: name, country_code (e.g. ‘+51’), phone and email.

ParameterTypeDescriptionLimits
signers[].roleenumRole of the participant within the envelope. Supported values: 'signer' (signs), 'approver' (approves without signing) or 'witness' (witness).Default: 'signer'
signers[].standard_flowarray<string>Primary electronic signature methods. Valid values: 'holographic_signature', 'otp_email', 'otp_whatsapp', or 'digital_certificate_local'.See rules below
signers[].advanced_flowarray<string>Advanced biometric validation layers. Valid values: 'selfie', 'doc_identidad', 'video_firma', 'face_recognition'.Maximum 2 active flows

Signature Placement (Mutually Exclusive Formats)

Section titled “Signature Placement (Mutually Exclusive Formats)”
Section titled “Recommended Structure: placements[] (Percentages)”

It is configured within each signer’s array (signers[].placements[]). Allows positioning signatures and initials fluidly across multiple documents at once.

ParameterTypeDescriptionLimits
document_refstringFile label to which the signature applies. Can be 'main' (main document) or the exact 'ref_id' assigned to an attachment.Default: 'main'
typeenumType of graphic mark to stamp on the page. Values: 'signature' (full signature) or 'initials' (visa/initials).Default: 'signature'
page_numberintSequential page number where the box will be placed (must be greater than or equal to 1).Required
relative_position_leftfloatX-axis position calculated as a percentage (0 to 100) from the left edge of the page.Required (e.g. 36.5)
relative_position_topfloatY-axis position calculated as a percentage (0 to 100) from the top edge of the page.Mutually exclusive with bottom
relative_position_bottomfloatY-axis position calculated as a percentage (0 to 100) from the bottom edge of the page.Mutually exclusive with top
relative_size_widthfloatWidth of the signature box calculated as a percentage of the total page width.Optional (0 to 100)
relative_size_heightfloatHeight of the signature box calculated as a percentage of the total page height.Optional (0 to 100)
"placements": [
{
"document_ref": "main",
"type": "signature",
"page_number": 1,
"relative_position_left": 36.5,
"relative_position_top": 39.25,
"relative_size_width": 25,
"relative_size_height": 8
}
]
{
"name": "Service Provision Contract No. 9",
"document_pdf_base64": "JVBERi0xLjQKJdPr6goxIDAgb2JqCjw8L0xlbmd0aCAyIDAgUi9GaWx0ZXIvRmxhdGVEZWNvZGU+PnN0cmVhbQp4nDMwVTAwULAwMDIxUzAFAAZ3A2Y9CmVuZHN0cmVhbQplbmRvYmoKMiAwIG9iagozMAplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2VzL0NvdW50IDEvS2lkc1s0IDAgUl0+PgplbmRvYmoKNDAwIFJGST0=",
"signers": [
{
"name": "Jane Doe",
"email": "[email protected]",
"country_code": "+51",
"phone": "900000001",
"standard_flow": ["holographic_signature"],
"placements": [
{
"document_ref": "main",
"type": "signature",
"page_number": 1,
"relative_position_left": 36.5,
"relative_position_top": 39.25,
"relative_size_width": 25,
"relative_size_height": 8
}
]
}
]
}

{
"external_id": "ERP-123",
"token": "abcdef01-2345-6789-abcd-ef0123456789",
"name": "Acuerdo_Comercial_2025.pdf",
"folder": { "token": "uuid", "name": "Carpeta" },
"status": "pending",
"lang": "es",
"size": 245100,
"original_file": "[https://api.firmeasy.legal/files/...?intent=view&signature=](https://api.firmeasy.legal/files/...?intent=view&signature=)...",
"signed_file": null,
"original_download_file": "[https://api.firmeasy.legal/files/...?intent=download](https://api.firmeasy.legal/files/...?intent=download)&...",
"signed_download_file": null,
"signatures_made": 0,
"signature_deadline": "2026-12-31T23:59:59.000Z",
"created_by": { "email": "[email protected]" },
"extra_docs_count": 0,
"extra_docs": [],
"signers": [
{
"external_id": null,
"token": "signer-api-id",
"status": "pending",
"rejection_reason": null,
"order": 1,
"name": "Carl Smith",
"email": "[email protected]",
"phone": "900000002",
"country_code": "+51",
"document_type": null,
"document_number": null,
"role": "signer",
"link": "[https://app.firmeasy.legal/](https://app.firmeasy.legal/)...",
"placements": [
{
"document_ref": "main",
"type": "signature",
"page_number": 1,
"relative_position_left": 36.5,
"relative_position_top": 39.25,
"relative_size_width": 25,
"relative_size_height": 8
}
],
"standard_flow": [
{
"state": "pending",
"flow_name": "Firma Holográfica",
"flow_key": "holographic_signature"
}
],
"advanced_flow": []
}
],
"created_through": "api",
"created_at": "2026-06-23T10:00:00.000000Z",
"updated_at": "2026-06-23T10:00:00.000000Z"
}
NombreTypeDescription
tokenstringUnique envelope identifier generated by FirmEasy. Save it in your database for future queries and operations.
external_idstringThe same external ID sent in the original request, returned for your system's validation.
namestringNormalized document name (in UPPERCASE with '.pdf' extension).
statusstringCurrent envelope status. Possible values: 'pending', 'signed', 'rejected'.
original_filestringSigned URL to view the original PDF in the browser.
original_download_filestringSigned URL to download the original PDF directly.
signed_filestringURL of the signed document. Will be null while the envelope is not fully signed.
signatures_madeintegerNumber of signatures stamped so far. Starts at 0.
signersarrayList of registered signers with their individual token, status, signature link, and flow configuration.
extra_docs_countintegerNumber of attached documents included in the envelope.
created_atdatetimeExact date and time of envelope creation in UTC ISO 8601 format.

Code Status Description
400 Bad Request Invalid request (body parameters with incorrect or missing syntax).
401 Unauthorized Not authorized (invalid, expired, or missing JWT token in headers).
422 Unprocessable Entity Business validation error (multiple file sources, incompatible flows).
500 Server Error Internal error on FirmEasy servers.