Envelopes

Send several documents to the same signers at once. Each document gets its own assignment and keeps its own status, certificate and downloads; one invitation goes to each signer, through the methods sent for them, for all the documents they are on, from the first of them. A send that fails is recorded on that signer's request (notification_history) and doesn't undo the envelope: 200 means the envelope was created, not that every invitation was delivered. The envelope is charged as one document, whatever its documents, each signer's notifications and identity check once for the whole envelope, and each digital-certificate signature on every document it is made on. Every document must be uploaded and processed (metadata_ready) with no assignment, and every listed signer must be on at least one document. Each document is signed on its virtual page or, with collect, on the fields placed on its pages, as on an assignment; a digital-certificate signer signs only virtual documents, alone on each. Needs the Envelopes feature on the workspace's plan (403 with code PlanRestricted otherwise). A refused request creates and charges nothing; errors names every field at fault.

Copy as Markdown Open in ChatGPT Open in Claude

post/v1/accounts/{accountId}/envelopes

Request

  • Base URL
    https://api.assinafy.com.br
  • Auth
    • HTTP bearer
    • or API key in header X-Api-Key

Path parameters

accountIdstring required

Workspace account ID.

Headers

Idempotency-Keystring
Example:0f8fad5b-d9cb-469f-a165-70867728950e

Any text, case-sensitive and new for each envelope you mean to create (a UUID, say). Retrying with the same key after a lost response answers the envelope the first request created, and creates and charges nothing, whatever the body says. A key belongs to its workspace and doesn't expire. 409 with code IdempotencyKeyInUse if the first request is still running: try again. An empty value counts as no key, as on template documents.

Request body

namestring required

What the invitation calls what is being signed, in place of a document's name. < is refused (400).

messagestring nullable

Optional message sent to every signer; their invitation adds the names of the documents they are on.

max_total_creditsnumber

Optional ceiling on what this request may spend, as on an assignment: refused with 409 and code CreditCeilingExceeded, nothing created or charged, when the envelope's total credits are above it. A value that is not a number of credits, zero or more, answers 400; numeric text counts, as a form-encoded body sends it. The estimate ignores it.

Example request

{
  "name": "Contrato de prestação de serviços",
  "message": "Segue o contrato e seus anexos.",
  "max_total_credits": 1.5,
  "signers": [
    {
      "id": "fa8c140cb49b79f940aab95fddd",
      "verification_method": "Email",
      "notification_methods": [
        "Email"
      ]
    }
  ],
  "documents": [
    {
      "id": "615601fab04c0a3147bb1246",
      "entries": [
        {
          "fields": [
            {
              "display_settings": {
                "left": 69,
                "top": 282,
                "width": 421,
                "height": 45.86,
                "fontFamily": "Arial",
                "fontSize": 22,
                "backgroundColor": "#D5EBFF"
              }
            }
          ]
        }
      ],
      "signer_ids": [
        "fa8c140cb49b79f940aab95fddd"
      ],
      "copy_receiver_ids": [
        "cr8c140cb49b79f940aab95fddd"
      ]
    }
  ]
}

Response

The created envelope

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": {
    "resource": "envelope",
    "id": "1a2f3c4d5e6f708192a3b4c5d6e",
    "name": "Contrato de prestação de serviços",
    "message": "Segue o contrato e seus anexos.",
    "documents": [
      {
        "id": "615601fab04c0a3147bb1246",
        "position": 1,
        "name": "contrato.pdf",
        "status": "pending_signature",
        "artifacts": {
          "original": "https://api.assinafy.com.br/v1/documents/615601fab04c0a3147bb1246/download/original",
          "thumbnail": "https://api.assinafy.com.br/v1/documents/615601fab04c0a3147bb1246/thumbnail"
        },
        "signers": [
          {
            "id": "fa8c140cb49b79f940aab95fddd",
            "full_name": "Ana Souza",
            "email": "ana@example.com",
            "whatsapp_phone_number": "+5548999990001",
            "signed_at": "2026-11-06T14:30:00Z"
          }
        ]
      }
    ],
    "counts": {
      "certificated": 1,
      "pending_signature": 2
    },
    "signing_urls": [
      {
        "url": "https://api.assinafy.com.br/v1/sign/doc1?email=joe@example.com"
      }
    ],
    "created_at": "2026-11-04T12:00:00Z"
  }
}

Changes