Envelopes

Add document to envelope

Changed on

Add a document to an open envelope for some of its signers. The document is checked as on creation: a metadata_ready document of the workspace with no assignment, signed on its virtual page or, with collect, on the fields placed in entries, with its own expires_at and copy_receiver_ids. An envelope holds up to 20 documents. It charges only its digital-certificate signatures, the envelope having paid for its document and its signers' notifications and identity checks when it was sent, and goes last in the envelope's order; a signer whose identity check the envelope approved is verified on it too. Each chosen signer is sent the envelope's invitation again, through the methods and with the link of their first invitation, now listing the new document, even once the document that invitation was sent from is taken out; the other signers hear nothing. The signers are the envelope's own: no one new joins once it was sent. Needs the Envelopes feature on the workspace's plan, as creating does. 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/{envelopeId}/documents

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.

envelopeIdstring required

The envelope ID.

Request body

idstring required

A metadata_ready document of the workspace with no assignment.

method'virtual' | 'collect'

As on an assignment: virtual (the default), signed on its virtual page, or collect, signed on the fields placed in entries.

signer_idsstring[] required

The signers of this document, each listed once: on creation, signers listed in signers; when added, signers of the envelope's documents.

copy_receiver_idsstring[]

Signer IDs that only receive a copy of this document, as on an assignment.

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 document costs more on its own. A value that is not a number of credits, zero or more, answers 400; numeric text counts, as a form-encoded body sends it.

Example request

{
  "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"
  ],
  "max_total_credits": 1.5
}

Response

The envelope with the document added

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