Skip to content

Create Document Async

POST {{base_url}}/v1/documents/envelopes/async
curl -X POST {{base_url}}/v1/documents/envelopes/async \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "name": "Service Agreement",
  "documents": [{
    "ref_id": "main",
    "source_type": "url",
    "file_format": "pdf",
    "role": "sign",
    "source_payload": { "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

Unlike the synchronous method, this endpoint accepts massive batches in a single call and responds immediately with a 202 Accepted status and an ingest_token. The envelope is assembled in the background by downloading files in parallel.



Limit Value
Maximum documents per envelope 100
Maximum weight per document ~100 MB
Maximum total envelope weight 1 GB
Supported source (V1) URL Only

To avoid duplicates in case of network failures, you can send an idempotency key. If you retry the same call, the server will return the same cached response (30-minute TTL).

ParameterTypeDescriptionLimits
Idempotency-KeyuuidUnique identifier generated by the client. If the original ingestion is still in progress and you retry, it will return code 409.HTTP Header

ParameterTypeDescriptionLimits
name*stringEnvelope name (normalized to UPPERCASE with .pdf appended).Required
documents*arrayList of 1 to 100 documents. The first element (position 0) will always be considered the main document.Required
documents[].ref_idstringUnique identifier. For the main document it is optional (defaults to 'main'). For attachments it is required and must be unique.Required for attachments
documents[].source_typeenumFile source type.Only supports 'url'
documents[].source_payload.url*urlPublic URL from which the document will be downloaded.Max: 2048 characters
callback_urlurlOne-shot webhook that will be invoked when ingestion finishes (success or failure).Max: 2048 characters
callback_secretstringSecret key. If sent, the webhook payload will be signed via HMAC-SHA256 in the X-Firmeasy-Signature-SHA256 header.Optional
external_idstring(255)Free external ID assigned by the integrator (pass-through). Copied to the resulting document.Optional
metadataobjectFree JSON key-value storage object for custom metadata. Copied to the resulting document.Pass-through

The async endpoint accepts the same configuration fields as the Sync endpoint:

ParameterTypeDescriptionLimits
folder_tokenuuidToken of the destination folder where the document will be saved.Must be a valid UUID
signature_deadlineISO8601Future deadline date and time to complete signatures (e.g. '2026-12-31T23:59:59.000Z').Full UTC format
is_signature_order_activeboolForces signers to strictly follow the established order (sequential).Default: false
is_rejection_allowedboolEnables the button for a signer to formally reject the document.Default: false
is_original_download_allowedboolAllows the signer to download the clean original PDF before signing.Default: true
disable_owner_notificationsboolDisables email alerts to the envelope owner.Default: false
disable_signer_notificationsboolDisables automatic alerts to signers.Default: false
send_automatic_invitationsboolSends invitations when creating the envelope.Default: true
send_automatic_invitations_byenumInvitation sending method. Values: 'email' or 'whatsapp'.Optional
send_signed_document_by_whatsappboolSends completed document copy via WhatsApp.Default: false
reminder_every_n_daysintFrequency in days for automatic reminders (0 to 30).0 to disable
observersarray<string>List of observer emails with read-only access (max 20).Array of emails
redirect_linkstring(255)Post-signature redirect URL.Must be a valid URL
created_byemailEmail of the user who created the request.Email format
sender_namestring(150)Sender name shown to signers. If omitted, the owner's name is used.Max 150 characters
reply_to_emailemailAddress to receive replies from sent notifications.Email format

If the request is valid, the system immediately responds with an ingestion token. The estimated time is calculated as min(1800, 10 + n·5) seconds, where n is the number of documents.

{
"ingest_token": "01234567-89ab-cdef-0123-456789abcdef",
"status": "ingesting",
"documents_total": 2,
"credits_cost": 2,
"status_url": "[{{base_url}}/v1/documents/envelopes/01234567-89ab-cdef-0123-456789abcdef/status]({{base_url}}/v1/documents/envelopes/01234567-89ab-cdef-0123-456789abcdef/status)",
"estimated_processing_time_seconds": 20
}
NombreTypeDescription
ingest_tokenstringUnique ingestion identifier. Save it to check the status or cancel the process.
statusstringInitial ingestion status. Returned value: 'ingesting'.
documents_totalintegerTotal number of documents received for processing in this batch.
credits_costintegerCredits that will be deducted upon successful completion. If ingestion fails, no charge is made.
status_urlstringURL to check the envelope assembly progress in real time.
estimated_processing_time_secondsintegerEstimated time in seconds to complete the ingestion.

Billing note: 1 credit per document is charged only upon successful completion of the assembly. If ingestion fails, no credits are deducted. If the organization balance is firmas_disponibles < -500, the operation is rejected with code 402.


Allows you to verify the progress of the envelope assembly. When it reaches the ready status, the system will return the definitive document_token.

See the dedicated page for full detail: Ingestion Status.

Endpoint: GET /v1/documents/envelopes/{{ingest_token}}/status

Possible statuses: ingestingassemblingready (success) | failed | cancelled.

Additional error codes: 402 if the organization has insufficient balance (firmas_disponibles < -500).


If the document is still in progress, you can send the order to abort it.

See the dedicated page for full detail: Cancel Ingestion.

Endpoint: POST /v1/documents/envelopes/{{ingest_token}}/cancel

It will respond with code 200 if cancelled successfully. If the envelope is already in a terminal state (ready, failed, or cancelled), it will return a 409 error.


Document Object (Final Response / Webhooks)

Section titled “Document Object (Final Response / Webhooks)”

Once the document is processed, the system consolidates the complete envelope. This is the structure you will get when querying the document via the API (or through creation Webhooks).

{
"external_id": "ERP-123",
"token": "abcdef01-2345-6789-abcd-ef0123456789",
"name": "CONTRATO_LOTE_MASIVO.pdf",
"folder": { "token": "uuid", "name": "Carpeta" },
"status": "pending",
"lang": "es",
"size": 245100,
"original_file": "https://.../files/...?intent=view&signature=...",
"signed_file": null,
"original_download_file": "https://.../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": 2,
"extra_docs": [
{
"token": "anexo-token",
"name": "Anexo 1 - Tarifario 2026.pdf",
"original_file": "https://.../?intent=view&...",
"signed_file": null,
"original_download_file": "https://.../?intent=download&...",
"signed_download_file": null,
"uploaded_by": { "email": "[email protected]" }
}
],
"signers": [
{
"external_id": null,
"token": "signer-api-id",
"status": "pending",
"rejection_reason": null,
"order": 1,
"name": "Jane Doe",
"email": "[email protected]",
"phone": "900000001",
"country_code": "+51",
"document_type": "dni",
"document_number": "900000003",
"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 for future queries and operations.
external_idstringExternal ID sent in the original request, returned for your system's validation.
namestringNormalized document name (in UPPERCASE with '.pdf' extension).
statusstringCurrent envelope status. Initial value: 'pending'.
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. Null while the envelope is not fully signed.
signatures_madeintegerNumber of signatures stamped so far. Starts at 0.
extra_docs_countintegerNumber of attached documents included in the envelope.
extra_docsarrayList of attachments with their tokens and download URLs. URLs expire in 60 minutes.
signersarrayList of registered signers with their individual token, status, signature link, and flow configuration.
created_atdatetimeExact date and time of envelope creation in UTC ISO 8601 format.