---
title: "Create envelope"
method: POST
path: "/v1/accounts/{accountId}/envelopes"
tags: ["Envelopes"]
---

# Create envelope

`POST /v1/accounts/{accountId}/envelopes`

## Request

- Base URL: `https://api.assinafy.com.br`
- URL: `https://api.assinafy.com.br/v1/accounts/{accountId}/envelopes`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

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](https://api.assinafy.com.br/v1/docs/markdown?method=post&path=%2Fv1%2Faccounts%2F%7BaccountId%7D%2Fenvelopes) [Open in ChatGPT](https://chatgpt.com/?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dpost%26path%3D%252Fv1%252Faccounts%252F%257BaccountId%257D%252Fenvelopes%20and%20help%20me%20integrate%20this%20endpoint.) [Open in Claude](https://claude.ai/new?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dpost%26path%3D%252Fv1%252Faccounts%252F%257BaccountId%257D%252Fenvelopes%20and%20help%20me%20integrate%20this%20endpoint.)

## Path parameters

- `accountId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- EnvelopeCreateRequest: An envelope as sent: on creation, and to estimate what creating it would cost.
  - `name` string, required: What the invitation calls what is being signed, in place of a document's name. `<` is refused (`400`).
  - `message` string, nullable: Optional message sent to every signer; their invitation adds the names of the documents they are on.
  - `max_total_credits` number: 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.
  - `signers` object[], required: Every signer of the envelope, once, by id: up to 20. They all sign at once: an envelope takes no `step`.
    - `id` string, required: An existing signer's ID.
    - `verification_method` 'Email' | 'Whatsapp' | 'DigitalCertificate' | 'IdDocumentFaceMatchBasic': As on an assignment. A `DigitalCertificate` signer signs only virtual documents, alone on each, each with their certificate, and is charged on each. An `IdDocumentFaceMatchBasic` signer checks their identity once for the whole envelope, and is charged for it once.
    - `notification_methods` string[]: As on an assignment: one method, inferred from `verification_method` when left out.
    - `embedded` boolean: As on an assignment: the signer signs inside your app, through an embed session, on every document of the envelope, the ones added later too. Their `signing_urls` entry has no link (`url` is `null`). An embed session minted on any of their documents still waiting for them lists the documents of the envelope they still have to sign, and the code their invitation carries verifies them there.
  - `documents` EnvelopeDocumentRequest[], required: The documents, in the order the envelope lists them: up to 20.
    - `id` string, 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`.
    - `entries` object[]: Required for `collect`, as on an assignment: the fields placed on each page of the document. Its signers are the ones on its fields, exactly its `signer_ids`.
      - `page_id` string, required: A page of the document.
      - `fields` object[], required: The fields placed on this page. A page with none adds nothing, as on an assignment.
        - `signer_id` string, required: A signer of the document.
        - `field_id` string, required: A field definition of the workspace.
        - `display_settings` DisplaySettings, required: A field placement rectangle on a document page. Geometry values are pixels in Assinafy's 150-DPI page image, measured from the upper-left corner. Clients must keep the rectangle within the selected page's width and height; the API does not clamp out-of-bounds values.
          - `left` number, float, required: Horizontal distance from the page's left edge, in page-image pixels.
          - `top` number, float, required: Vertical distance from the page's top edge, in page-image pixels.
          - `width` number, float, required: Width of the placement rectangle, in page-image pixels.
          - `height` number, float, required: Height of the placement rectangle, in page-image pixels.
          - `fontFamily` string: Font-family presentation metadata.
          - `fontSize` number, float, required: Font size in the 150-DPI page-image coordinate system.
          - `backgroundColor` string: CSS-compatible background-color presentation metadata.
    - `signer_ids` string[], required: The signers of this document, each listed once: on creation, signers listed in `signers`; when added, signers of the envelope's documents.
    - `expires_at` union: This document's expiration, read as on an assignment, at least one hour in the future. Text is read as a date: ISO 8601 is the format to send (a UTC offset in the value is honored, a value without one is read as UTC, and a date alone means 23:59 UTC that day), and text that is a number is Unix time. A number is Unix time in seconds, its fraction dropped. Null, 0, an empty text or leaving it out means no expiration; a value that can't be read as a date answers `400`.
      - string
      - number
    - `copy_receiver_ids` string[]: Signer IDs that only receive a copy of this document, as on an assignment.

## Response `200`

The created envelope

- object: Standard success wrapper. Operations add their own `data`.
  - `status` integer: HTTP status code, mirrored in the body.
  - `message` string: Human-readable message; empty on success.
  - `data` DocumentEnvelope: Documents sent together to the same signers. Each document keeps its own assignment, status, certificate and downloads.
    - `resource` string: Present in single-resource responses.
    - `id` string, required
    - `name` string, required
    - `message` string, nullable, required
    - `documents` object[], required: The envelope's documents, in the order it lists them.
      - `id` string, required
      - `position` integer, required: The document's place in the envelope's order, from 1.
      - `name` string, required
      - `status` string, required: Status code — see GET /v1/documents/statuses.
      - `artifacts` object, required: The document's files, as its own read (`GET /v1/documents/{documentId}`) gives them: always `original`, plus `thumbnail` once one exists, and for a certificated document `certificated`, `certificate-page`, `bundle` and, when signed with a digital certificate, `pades`. In the envelope list (`GET /v1/accounts/{accountId}/envelopes`) only `thumbnail`, given without checking that it exists: its URL answers `404` until the thumbnail is generated.
      - `signers` object[], required: The document's signers: a signer appears only on the documents they are on.
        - `id` string, required
        - `full_name` string, required
        - `email` string, nullable, required
        - `whatsapp_phone_number` string, nullable, required
        - `completed` boolean, required: Whether they have signed this document.
        - `signed_at` string, date-time, nullable, required: When they signed this document; `null` until they do.
    - `counts` object, nullable, required: How many of its documents are in each status (status code => count); only the statuses present. An envelope has no status of its own. `null` once it lists no document: every one deleted or taken out.
    - `signing_urls` SigningUrl[], required: One entry per signer, as on an assignment (`SigningUrl`): the link of the document their invitation is sent from while it waits for them, else of their first document that still does (the e-mail page asks that document for the invitation again; any of their links opens the whole envelope).
      - `signer_id` string
      - `url` string, nullable: See the schema description. `null` for a signer notified only by WhatsApp and for an embedded signer.
      - `embedded` boolean: Whether the signer was marked `embedded` when the assignment was created.
    - `created_at` string, date-time, required

## Other responses

- `400`: Refused as sent; nothing was created or charged. Each field at fault is an entry of `errors` (a list refused as a whole is not read item by item), an item of a list named by its index (`documents[1].signer_ids`): `name`; `message` (not text); `signers` and `documents` (missing, empty, not a list, or more than 20 signers or 20 documents; `documents` also when its documents hold more than 2,000 fields between them, a virtual document's being one per signer, or more than 100 copy receivers); `signers[i].id` (missing, listed twice, not a signer of the workspace, or on no document); `signers[i].verification_method` (not a code); `signers[i].notification_methods` (not a list of codes); `signers[i].step` (sent at all); `documents[i].id` (missing, listed twice, or a document that can't take the assignment: not found, not `metadata_ready`, or already assigned); `documents[i].method` (other than `virtual` or `collect`); `documents[i].entries` (missing for `collect`, or not a list of pages with fields naming their `signer_id`); `documents[i].expires_at` (not text, a number or null); `documents[i].signer_ids` (missing, not a list of ids, a signer not listed once in `signers`, for `collect` not exactly the signers on its fields, or a digital-certificate signer on a `collect` document or with another signer). A page or field the assignment doesn't find on a `collect` document, a method code the platform doesn't know, a verification and notification that don't pair, a signer without the e-mail or WhatsApp number their method needs, an `embedded` other than `true`, `false`, `1` or `0` (`null` reads as left out, as on an assignment) or set for a signer verified other than by Bypass, Email or WhatsApp, a balance too low for the envelope, an `expires_at` or `copy_receiver_ids` the assignment refuses, and a document another request assigned or put back into processing meanwhile answer `400` with `message` only, as on an assignment.
- `401`: Missing or invalid credentials.
- `403`: The workspace's plan lacks the Envelopes feature, or a signer's method or embedded signing the plan lacks (`PlanRestricted`); or an OAuth app's token lacks `documents:write` (`InsufficientScope`). Also a member deactivated in the workspace, a workspace scheduled for deletion, or an OAuth token of another workspace.
- `404`: The requested resource does not exist.
- `409`: The envelope costs more than `max_total_credits` (`CreditCeilingExceeded`), or another request with this `Idempotency-Key` is still running (`IdempotencyKeyInUse`).
- `500`: Unexpected server error.

## Changes

- **2026-11-11** `f4fa0790d9f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/assinafy/apis/assinafy-api-reference/changes/v1/accounts/:accountId/envelopes/post.md)

---

[API](https://skmtc.dev/assinafy/apis/assinafy-api-reference.md) - [All operations](https://skmtc.dev/assinafy/apis/assinafy-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/assinafy/apis/assinafy-api-reference/revisions/afcdb904d0bf?raw)
