Create Synchronous Document
Create Synchronous Document
Section titled “Create Synchronous Document”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 vs Async?
Section titled “Sync vs Async?”Sync POST /v1/documents |
Async POST /v1/documents/envelopes/async |
|
|---|---|---|
| Documents per envelope | up to 5 (main + 4 attachments) | up to 100 |
| Weight | 50 MB total envelope | ~100 MB per doc · 1 GB total |
| File source | base64, URL, DOCX or temporal key | URL only (first release) |
| Response | 201 with complete envelope | 202 with ingest_token (background assembly) |
| When | interactive / few documents | large batches / heavy files |
curl -X POST https://api.firmeasy.legal/api/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"
}]
}'Authentication
Section titled “Authentication”The access token obtained during the login process must be sent with each request:
AuthorizationContent-TypeFields marked with an asterisk (*) are required and must be provided in the request. Other fields are optional.
Envelope Limits
Section titled “Envelope Limits”| 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) |
Main document source
Section titled “Main document source”You must strictly choose ONE of the following options (they are mutually exclusive; sending two will cause a 422 error):
document_pdf_urldocument_pdf_base64document_temporal_keydocument_docx_urldocument_docx_base64Identity and Reference
Section titled “Identity and Reference”nameref_idEnvelope Configuration
Section titled “Envelope Configuration”external_idfolder_tokentemplate_tokencreated_bycreated_throughsignature_deadlinesender_namereply_to_emaildisable_owner_notificationsdisable_signer_notificationssend_automatic_invitationssend_automatic_invitations_bysend_signed_document_by_whatsappis_signature_order_activeis_rejection_allowedis_original_download_allowedreminder_every_n_dayslangobserversredirect_linkmetadataAttachments
Section titled “Attachments”Allows adding up to a maximum of 4 supplementary documents in the same call.
extra_docs[].ref_idextra_docs[].nameextra_docs[].pdf_urlextra_docs[].pdf_base64extra_docs[].temporal_keyextra_docs[].fileFields marked with an asterisk (*) are required and must be provided in the request. Other fields are optional.
Signers
Section titled “Signers”Defines the document actors. Minimum required fields per element: name, country_code (e.g. ‘+51’), phone and email.
signers[].rolesigners[].document_typesigners[].document_numbersigners[].standard_flowsigners[].advanced_flowSignature Placement (Mutually Exclusive Formats)
Section titled “Signature Placement (Mutually Exclusive Formats)”Option A) Recommended Structure: placements[] (Percentages)
Section titled “Option A) 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.
document_reftypepage_numberrelative_position_leftrelative_position_toprelative_position_bottomrelative_size_widthrelative_size_height"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 }]Option B) Legacy: Absolute PDF Points (Main only)
Section titled “Option B) Legacy: Absolute PDF Points (Main only)”It is configured at the signer’s root level (outside of placements). Cannot be mixed with placements or it will throw 422.
| Field | Type | Notes |
|---|---|---|
position_x |
number | Exact X coordinate in absolute PDF points (top-left origin). |
position_y |
number | Exact Y coordinate in absolute PDF points. |
page |
int | Page number (greater than or equal to 1). |
Minimum request example (JSON Payload)
Section titled “Minimum request example (JSON Payload)”{ "name": "Service Provision Contract No. 9", "document_pdf_base64": "JVBERi0xLjQKJdPr6goxIDAgb2JqCjw8L0xlbmd0aCAyIDAgUi9GaWx0ZXIvRmxhdGVEZWNvZGU+PnN0cmVhbQp4nDMwVTAwULAwMDIxUzAFAAZ3A2Y9CmVuZHN0cmVhbQplbmRvYmoKMiAwIG9iagozMAplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2VzL0NvdW50IDEvS2lkc1s0IDAgUl0+PgplbmRvYmoKNDAwIFJGST0=", "signers": [ { "name": "Jane Doe", "country_code": "+51", "phone": "900000001", "standard_flow": ["digital_certificate_local"], "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 } ] } ]}Successful Response (201 Created)
Section titled “Successful Response (201 Created)”{ "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", "extra_docs_count": 0, "extra_docs": [], "signers": [ { "external_id": null, "token": "signer-api-id", "status": "pending", "rejection_reason": null, "order": 1, "name": "Carl Smith", "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"}tokenexternal_idnamestatusoriginal_fileoriginal_download_filesigned_filesignatures_madesignersextra_docs_countcreated_atPossible Errors
Section titled “Possible Errors”| 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. |
