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

# Estimate envelope cost

`POST /v1/accounts/{accountId}/envelopes/estimate-cost`

## Request

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

What creating the envelope would cost, creating and charging nothing. Takes the creation body and checks it as creation does (`max_total_credits` aside); answers as an assignment's estimate: the envelope counts as one document (`documents` is 1, an extra one when the plan's allowance doesn't cover it), each signer's notifications and identity check count once for the whole envelope, and each digital-certificate signature on every document it is made on, as creation charges them.

[Copy as Markdown](https://api.assinafy.com.br/v1/docs/markdown?method=post&path=%2Fv1%2Faccounts%2F%7BaccountId%7D%2Fenvelopes%2Festimate-cost) [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%252Festimate-cost%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%252Festimate-cost%20and%20help%20me%20integrate%20this%20endpoint.)

## Path parameters

- `accountId` string, required

## 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`

Cost estimate and balances

- 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` CostEstimate: Cost breakdown for an assignment plus current account balances. `credits` is the sum of `breakdown` (notifications, digital-certificate signatures and identity checks). `total_credits` is what the send will take from the credit balance: `credits`, plus `extra_document_cost` when `needs_extra_document` is true. The extra document is not a `breakdown` line.
    - `documents` integer, required: Documents consumed: 1, for an assignment as for an envelope, whatever its documents.
    - `credits` number, required: Sum of the `breakdown` costs: notifications, digital-certificate signatures and identity checks. Does not include the extra document.
    - `needs_extra_document` boolean, required: True when the plan's document allowance is exhausted and an extra document will be charged from credits.
    - `extra_document_cost` number, required: Credits for one extra document. Charged only when `needs_extra_document` is true.
    - `total_credits` number, required: Credits the send will consume: `credits`, plus `extra_document_cost` when `needs_extra_document` is true.
    - `breakdown` CostEstimateBreakdownItem[], required
      - `code` string
      - `name` string
      - `cost` number
      - `quantity` integer
      - `unit_cost` number
    - `document_balance` number, nullable, required: Documents left in the plan. `null` when the account's documents are not limited.
    - `credit_balance` number, nullable, required: Credits available. `null` when the account's credits are not limited.
    - `has_sufficient_resources` boolean, required: Whether creating it would pass its balance checks now: the checks creation itself makes, so a contract that allows overage passes with a low `document_balance` or `credit_balance`.
    - `blocking_reason` 'PendingPayment' | 'InsufficientDocuments' | 'InsufficientCredits', nullable, required
    - `message` string, nullable, required

## Other responses

- `400`: Refused on the same fields as creation, in `errors`, and with `message` alone for a method the platform does not know or a pairing it refuses. What creation checks while it creates each document (a signer's missing contact, a page or field not found, the balance) is not checked here: `has_sufficient_resources` says what the balance allows.
- `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.
- `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/estimate-cost/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)
