---
title: "Estimate document-from-template cost"
method: POST
path: "/v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost"
tags: ["Documents"]
---

# Estimate document-from-template cost

`POST /v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost`

## Request

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

Estimate the cost of creating a document from a template without creating it. Contact information is not required — only the role_id and optionally a verification or notification method are needed. Each document always consumes 1 document from the plan's monthly allowance; if exhausted, the ExtraDocument cost is charged from credits (needs_extra_document = true). blocking_reason may be PendingPayment, InsufficientDocuments, or InsufficientCredits.

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

## Path parameters

- `accountId` string, required
- `templateId` string, required

## Request body

- object
  - `signers` object[], required: One entry per template role (editor roles are ignored for cost calculation).
    - `role_id` string, required: The template role ID associated with the signer.
    - `verification_method` 'Email' | 'Whatsapp' | 'DigitalCertificate' | 'IdDocumentFaceMatchBasic': Verification method. If provided without notification_methods, the notification method is inferred. Defaults to Email. Verification is never billed on its own — the cost comes from the notification it is paired with, so `Whatsapp` verification requires the WhatsApp notification and costs 0.45 credits per signer. `DigitalCertificate` adds the per-signer signature cost (0.5 credits) on top of the notification cost, and returns `400` when the template has placed signer fields. `IdDocumentFaceMatchBasic` verifies the signer from a photo of their government ID, a photo of them holding it and a liveness check — it requires its account feature, requires the signer to have a valid CPF in `government_id`, and is charged a per-signer fee.
    - `notification_methods` string[]: Notification method for this signer — exactly one, and it must be compatible with `verification_method`. If provided without verification_method, the verification method is inferred. Defaults to Email.

## Response `200`

Cost estimate

- 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: Documents consumed (always 1).
    - `credits` number: Sum of the `breakdown` costs: notifications, digital-certificate signatures and identity checks. Does not include the extra document.
    - `needs_extra_document` boolean: True when the plan's document allowance is exhausted and an extra document will be charged from credits.
    - `extra_document_cost` number: Credits for one extra document. Charged only when `needs_extra_document` is true.
    - `total_credits` number: Credits the send will consume: `credits`, plus `extra_document_cost` when `needs_extra_document` is true.
    - `breakdown` CostEstimateBreakdownItem[]
      - `code` string
      - `name` string
      - `cost` number
      - `quantity` integer
      - `unit_cost` number
    - `document_balance` number: Documents left in the plan.
    - `credit_balance` number: Credits available.
    - `has_sufficient_resources` boolean
    - `blocking_reason` 'PendingPayment' | 'InsufficientDocuments' | 'InsufficientCredits', nullable
    - `message` string, nullable

## Other responses

- `401`: Missing or invalid credentials.
- `500`: Unexpected server error.

## Changes

- **2026-10-15** `da98836f863b`: 1 info
  - added the new `IdDocumentFaceMatchBasic` enum value to the request property `signers/items/verification_method`

[Operation history](https://skmtc.dev/assinafy/apis/assinafy-api-reference/changes/v1/accounts/:accountId/templates/:templateId/documents/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/f7da81a5567e?raw)
