assinafy 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
1
  # Assinafy Ruby SDK API Reference
2
2
 
3
- > Contract source: Assinafy API v1 OpenAPI 3.1.0, retrieved 2026-11-02 from
4
- > `https://api.assinafy.com.br/v1/docs/openapi.json` (90 paths, 118 operations, 49 schemas).
5
- > `scripts/check_api_contract.rb` validates contract compatibility weekly.
3
+ > Contract source: Assinafy API v1 OpenAPI 3.1.0, retrieved 2026-11-24 from
4
+ > `https://api.assinafy.com.br/v1/docs/openapi.json` (112 paths, 147 operations, 62 schemas).
5
+ > Staging: `https://api.angry-pisco.stage.assinafy.com.br/v1/docs/openapi.json` (120 paths, 157 operations, 63 schemas).
6
+ > `scripts/check_api_contract.rb` validates production contract compatibility weekly.
6
7
 
7
8
  This is the SDK-facing contract reference. Paths below are wire paths; Ruby methods return the unwrapped
8
9
  `data` member for Assinafy response envelopes, pagination helpers return `{ data:, meta: }`, binary methods
@@ -31,8 +32,8 @@ Required parameters and object properties are marked with `*`.
31
32
  - `POST /v1/login` answers with an `mfa_token` challenge instead of an access token when the user has two-factor
32
33
  authentication enabled. `AuthResource#verify_mfa` exchanges it, without workspace credentials; the challenge is
33
34
  single-use and expires 5 minutes after login.
34
- - Webhook endpoint signing secrets (`whsec_...`) are readable and rotatable only with an API key or a user session
35
- token, never by OAuth applications. Treat them like API keys. Verify every delivery with
35
+ - Webhook endpoint signing secrets (`whsec_...`) are readable only with an API key or user session.
36
+ OAuth applications with `webhooks:write` can rotate secrets and must store the returned value. Treat them like API keys. Verify every delivery with
36
37
  `WebhookVerifier#verify_delivery` against the raw request body.
37
38
  - HTTP connections require TLS 1.2 or newer and use Ruby/Faraday TLS verification and the host system trust store;
38
39
  the SDK does not pin the upstream TLS certificate.
@@ -44,124 +45,171 @@ Required parameters and object properties are marked with `*`.
44
45
 
45
46
  | Method | Path | Ruby SDK method | Authentication | Parameters | Request body | Success wire response |
46
47
  | --- | --- | --- | --- | --- | --- | --- |
47
- | GET | `/.well-known/oauth-protected-resource` | `OAuthResource#protected_resource_metadata` | Public | None | None | `200` `application/json` **bare** RFC 9728 metadata object { `resource`: string; `authorization_servers`: Array<string>; `scopes_supported`: Array<string>; `bearer_methods_supported`: Array<string> } — not enveloped |
48
- | GET | `/v1/accounts` | `AccountResource#list` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Account`](#account)> } |
49
- | POST | `/v1/accounts` | `AccountResource#create` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `name*`: string; `notification_sender_type`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
50
- | GET | `/v1/accounts/{accountId}` | `AccountResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
51
- | PUT | `/v1/accounts/{accountId}` | `AccountResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `name`: string; `notification_sender_type`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
48
+ | GET | `/v1/accounts/{accountId}` | `AccountResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `expand`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
49
+ | PUT | `/v1/accounts/{accountId}` | `AccountResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `name`: string; `notification_sender_type`: string (`"User"`, `"Account"`) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
52
50
  | DELETE | `/v1/accounts/{accountId}` | `AccountResource#delete` | Bearer token or `X-Api-Key` | path `accountId*`: string | optional; `application/json` object { `force`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
53
- | GET | `/v1/accounts/{accountId}/contracts` | `ContractResource#list` | Bearer token or `X-Api-Key`; OAuth `documents:read` | path `accountId*`: string<br>query `status`: comma-separated array of `draft`, `active`, `expired`, `terminated`<br>query `counterparty`, `search`, `end_date_from`, `end_date_to`, `ending_within_days`, `external_system`, `external_id`, `sort`, `expand`, `page`, `per-page` | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentContract`](#documentcontract)> }; pagination headers become `{ data:, meta: }` |
54
- | GET | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `ContractResource#get` | Bearer token or `X-Api-Key`; OAuth `documents:read` | path `accountId*`: string<br>path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) or [`DocumentContractAmendment`](#documentcontractamendment) }; SDK returns `nil` on `404` |
55
- | PUT | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `ContractResource#update` | Bearer token or `X-Api-Key`; OAuth `documents:write` | path `accountId*`: string<br>path `documentId*`: string | required non-empty [`DocumentContractInput`](#documentcontractinput); explicit `nil` is sent as JSON null | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) or [`DocumentContractAmendment`](#documentcontractamendment) }; `403` without contract tracking, `409` on stale `updated_at` |
56
- | GET | `/v1/accounts/{accountId}/documents/{documentId}/contract/related` | `ContractResource#related` | Bearer token or `X-Api-Key`; OAuth `documents:read` | path `accountId*`: string<br>path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: root [`DocumentContract`](#documentcontract) with `amendments` }; SDK returns `nil` on `404` |
57
- | POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/renew` | `ContractResource#renew` | Bearer token or `X-Api-Key`; OAuth `documents:write` | path `accountId*`: string<br>path `documentId*`: string | optional; `application/json` object { `end_date`: string (date, nullable); `value`: number (nullable); `term`: integer; `updated_at`: string (date-time) }; a valid request requires `term` or `end_date` | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) }; `403` without contract tracking, `409` on stale `updated_at` |
58
- | POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/terminate` | `ContractResource#terminate` | Bearer token or `X-Api-Key`; OAuth `documents:write` | path `accountId*`: string<br>path `documentId*`: string | optional; `application/json` object { `reason`: string (nullable, max 500); `updated_at`: string (date-time) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) }; `403` without contract tracking, `409` on stale `updated_at` |
59
- | GET | `/v1/accounts/{accountId}/documents` | `DocumentResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `status`: string<br>query `method`: string<br>query `search`: string<br>query `tags`: string<br>query `sort`: string<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
60
- | POST | `/v1/accounts/{accountId}/documents` | `DocumentResource#upload` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `multipart/form-data` object { `file*`: string (binary) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
61
- | GET | `/v1/accounts/{accountId}/documents/search` | `DocumentResource#search` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `status`: string<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
51
+ | GET | `/v1/accounts/{accountId}/theme` | `AccountResource#theme` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountTheme`](#accounttheme) } |
52
+ | GET | `/v1/accounts/{accountId}/usage` | `AccountResource#usage` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountUsage`](#accountusage) } |
53
+ | GET | `/v1/accounts/{accountId}/logo` | `AccountResource#download_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `image/*` string (format: binary) |
54
+ | POST | `/v1/accounts/{accountId}/logo` | `AccountResource#upload_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `multipart/form-data` object { `file*`: string (format: binary) } | `200` `application/json` [`Envelope`](#envelope) |
55
+ | DELETE | `/v1/accounts/{accountId}/logo` | `AccountResource#delete_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) |
56
+ | GET | `/v1/accounts` | `AccountResource#list` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Account`](#account)> } |
57
+ | POST | `/v1/accounts` | `AccountResource#create` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `name*`: string; `notification_sender_type`: string (`"User"`, `"Account"`) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Account`](#account) } |
58
+ | GET | `/v1/documents/{documentId}/activities` | `DocumentResource#activities` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>query `sort`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentActivity`](#documentactivity)> } |
59
+ | GET | `/v1/assignments` | `AssignmentResource#list` | Bearer token or `X-Api-Key` | query `accountId`: string<br>query `sort`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Assignment`](#assignment)> } |
60
+ | POST | `/v1/documents/{documentId}/assignments` | `AssignmentResource#create` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method*`: string (`"virtual"`, `"collect"`); `signers*`: Array<object { `id*`: string; `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)>; `embedded`: boolean; `step`: integer; `sign_as`: string or null (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`, `null`) }>; `entries`: Array<object { `page_id`: string; `fields`: Array<object { `signer_id`: string; `field_id`: string; `display_settings`: [`DisplaySettings`](#displaysettings) }> }>; `message`: string; `expires_at`: string (format: date-time); `copy_receivers`: Array<string>; `max_total_credits`: number } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Assignment`](#assignment) } |
61
+ | POST | `/v1/documents/{documentId}/assignments/estimate-cost` | `AssignmentResource#estimate_cost` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method`: string (`"virtual"`, `"collect"`); `signers`: Array<object { `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `sign_as`: string or null (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`, `null`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)> }>; `entries`: Array<object> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
62
+ | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/resend` | `AssignmentResource#resend_notification` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `is_sent`: boolean; `document_id`: string; `signer_id`: string } } |
63
+ | POST | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/estimate-resend-cost` | `AssignmentResource#estimate_resend_cost` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ResendCostEstimate`](#resendcostestimate) } |
64
+ | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reset-expiration` | `AssignmentResource#reset_expiration` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` object { `expires_at*`: string or null (format: date-time) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Assignment`](#assignment) } |
65
+ | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification` | `AssignmentResource#identity_review` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerIdentityReview`](#signeridentityreview) } |
66
+ | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/images/{name}` | `AssignmentResource#identity_review_image` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string<br>path `name*`: string (`"document_front"`, `"document_back"`, `"document_pdf"`, `"face"`) | None | `200` `image/jpeg` string (format: binary); `image/png` string (format: binary); `application/pdf` string (format: binary) |
67
+ | POST | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/review` | `AssignmentResource#decide_identity_review` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | required; `application/json` object { `decision*`: string (`"Approved"`, `"Rejected"`); `note`: string or null (max length: 2000) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerIdentityReview`](#signeridentityreview) } |
68
+ | POST | `/v1/login` | `AuthResource#login` | Public | None | required; `application/json` object { `email*`: string (format: email); `password*`: string (format: password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) } |
69
+ | PUT | `/v1/authentication/request-password-reset` | `AuthResource#request_password_reset` | Public | None | required; `application/json` object { `email*`: string (format: email) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (format: email) } } |
70
+ | PUT | `/v1/authentication/reset-password` | `AuthResource#reset_password` | Public | None | required; `application/json` object { `email*`: string (format: email); `token`: string; `new_password*`: string (format: password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (format: email) } } |
71
+ | PUT | `/v1/authentication/change-password` | `AuthResource#change_password` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `email*`: string (format: email); `password*`: string (format: password); `new_password*`: string (format: password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (format: email) } } |
72
+ | POST | `/v1/authentication/mfa/verify` | `AuthResource#verify_mfa` | Public | None | required; `application/json` object { `mfa_token*`: string; `code*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) } |
73
+ | GET | `/v1/accounts/{accountId}/contracts` | `ContractResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `status`: Array<string (`"draft"`, `"active"`, `"expired"`, `"terminated"`)><br>query `counterparty`: string<br>query `search`: string<br>query `end_date_from`: string (format: date)<br>query `end_date_to`: string (format: date)<br>query `ending_within_days`: integer (min: 0) (max: 3650)<br>query `external_system`: string<br>query `external_id`: string<br>query `sort`: string<br>query `expand`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentContract`](#documentcontract)> } |
74
+ | GET | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `ContractResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) or [`DocumentContractAmendment`](#documentcontractamendment) } |
75
+ | PUT | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `ContractResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | required; `application/json` [`DocumentContractInput`](#documentcontractinput) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) or [`DocumentContractAmendment`](#documentcontractamendment) } |
76
+ | GET | `/v1/accounts/{accountId}/documents/{documentId}/contract/related` | `ContractResource#related` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string<br>query `expand`: string (`"document"`) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) } |
77
+ | POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/renew` | `ContractResource#renew` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | optional; `application/json` object { `end_date`: string or null (format: date); `value`: number or null; `term`: integer (min: 1); `updated_at`: string (format: date-time) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) } |
78
+ | POST | `/v1/accounts/{accountId}/documents/{documentId}/contract/terminate` | `ContractResource#terminate` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | optional; `application/json` object { `reason`: string or null (max length: 500); `updated_at`: string (format: date-time) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentContract`](#documentcontract) } |
79
+ | GET | `/v1/accounts/{accountId}/documents` | `DocumentResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `status`: string<br>query `envelope_id`: string<br>query `method`: string (`"virtual"`, `"collect"`)<br>query `search`: string<br>query `tags`: string<br>query `sort`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
80
+ | POST | `/v1/accounts/{accountId}/documents` | `DocumentResource#upload` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `multipart/form-data` object { `file*`: string (format: binary) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
81
+ | GET | `/v1/accounts/{accountId}/documents/search` | `DocumentResource#search` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `status`: string<br>query `envelope_id`: string<br>query `sort`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
82
+ | GET | `/v1/documents/statuses` | `DocumentResource#statuses` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatus`](#documentstatus)> } |
83
+ | GET | `/v1/documents/{documentId}` | `DocumentResource#details` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>query `expand`: Array<string (`"envelope_id"`, `"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
84
+ | DELETE | `/v1/documents/{documentId}` | `DocumentResource#delete` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
85
+ | PATCH | `/v1/documents/{documentId}` | `DocumentResource#rename` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `name*`: string (max length: 255) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
86
+ | GET | `/v1/documents/{documentId}/download/{artifactName}` | `DocumentResource#download` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>path `artifactName*`: string (`"original"`, `"certificated"`, `"certificate-page"`, `"pades"`, `"bundle"`) | None | `200` `application/pdf` string (format: binary) |
87
+ | GET | `/v1/documents/{documentSignatureHash}/verify` | `DocumentResource#verify` | Public | path `documentSignatureHash*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentVerification`](#documentverification) } |
62
88
  | GET | `/v1/accounts/{accountId}/documents/{documentId}/tags` | `DocumentResource#list_tags` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Tag`](#tag)> } |
63
89
  | PUT | `/v1/accounts/{accountId}/documents/{documentId}/tags` | `DocumentResource#replace_tags` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | required; `application/json` object { `tags`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Tag`](#tag)> } |
64
90
  | POST | `/v1/accounts/{accountId}/documents/{documentId}/tags` | `DocumentResource#append_tags` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string | required; `application/json` object { `tags`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Tag`](#tag)> } |
65
91
  | DELETE | `/v1/accounts/{accountId}/documents/{documentId}/tags/{tagId}` | `DocumentResource#detach_tag` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `documentId*`: string<br>path `tagId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `detached`: boolean } } |
92
+ | GET | `/v1/accounts/{accountId}/embed-origins` | `AccountResource#list_embed_origins` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`EmbedOrigin`](#embedorigin)> } |
93
+ | POST | `/v1/accounts/{accountId}/embed-origins` | `AccountResource#create_embed_origin` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `origin*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`EmbedOrigin`](#embedorigin) } |
94
+ | PUT | `/v1/accounts/{accountId}/embed-origins/{originId}` | `AccountResource#update_embed_origin` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `originId*`: string | required; `application/json` object { `origin*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`EmbedOrigin`](#embedorigin) } |
95
+ | DELETE | `/v1/accounts/{accountId}/embed-origins/{originId}` | `AccountResource#delete_embed_origin` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `originId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
96
+ | POST | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/embed-sessions` | `AssignmentResource#create_embed_session` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`EmbedSession`](#embedsession) } |
97
+ | POST | `/v1/embed/sessions/{token}/exchange` | `AssignmentResource#exchange_embed_session` | Public | path `token*`: string | optional; `application/json` object { `parent_origin`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`EmbedSessionExchange`](#embedsessionexchange) } |
98
+ | GET | `/v1/accounts/{accountId}/envelopes` | `EnvelopeResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50)<br>query `search`: string<br>query `status`: string (`"open"`, `"closed"`) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentEnvelope`](#documentenvelope)> } |
99
+ | POST | `/v1/accounts/{accountId}/envelopes` | `EnvelopeResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>header `Idempotency-Key`: string | required; `application/json` [`EnvelopeCreateRequest`](#envelopecreaterequest) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
100
+ | POST | `/v1/accounts/{accountId}/envelopes/estimate-cost` | `EnvelopeResource#estimate_cost` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` [`EnvelopeCreateRequest`](#envelopecreaterequest) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
101
+ | GET | `/v1/accounts/{accountId}/envelopes/{envelopeId}` | `EnvelopeResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
102
+ | DELETE | `/v1/accounts/{accountId}/envelopes/{envelopeId}` | `EnvelopeResource#delete` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
103
+ | PATCH | `/v1/accounts/{accountId}/envelopes/{envelopeId}` | `EnvelopeResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string | required; `application/json` object { `name`: string (min length: 1) (max length: 255); `message`: string or null; `document_ids`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
104
+ | GET | `/v1/accounts/{accountId}/envelopes/{envelopeId}/activities` | `EnvelopeResource#activities` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>query `sort`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`EnvelopeActivity`](#envelopeactivity)> } |
105
+ | GET | `/v1/accounts/{accountId}/envelopes/{envelopeId}/download/{artifactName}` | `EnvelopeResource#download` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>path `artifactName*`: string (`"original"`, `"certificated"`, `"certificate-page"`, `"pades"`, `"bundle"`) | None | `200` `application/zip` string (format: binary) |
106
+ | PUT | `/v1/accounts/{accountId}/envelopes/{envelopeId}/cancel` | `EnvelopeResource#cancel` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<object { `id*`: string; `status*`: string; `cancelled*`: boolean }> } |
107
+ | PUT | `/v1/accounts/{accountId}/envelopes/{envelopeId}/signers/{signerId}/resend` | `EnvelopeResource#resend_notification` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `is_sent*`: boolean; `envelope_id*`: string; `signer_id*`: string } } |
108
+ | POST | `/v1/accounts/{accountId}/envelopes/{envelopeId}/documents` | `EnvelopeResource#add_document` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string | required; `application/json` [`EnvelopeDocumentRequest`](#envelopedocumentrequest) plus object { `max_total_credits`: number (min: 0) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
109
+ | DELETE | `/v1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}` | `EnvelopeResource#remove_document` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
66
110
  | GET | `/v1/accounts/{accountId}/fields` | `FieldResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `include_inactive`: boolean<br>query `include_standard`: boolean | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Field`](#field)> } |
67
111
  | POST | `/v1/accounts/{accountId}/fields` | `FieldResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `name*`: string; `type*`: string; `regex`: string or null; `is_required`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Field`](#field) } |
68
- | POST | `/v1/accounts/{accountId}/fields/validate-multiple` | `FieldResource#validate_multiple` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` Array<object { `field_id*`: string; `value*`: any JSON value }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldValidationResult`](#fieldvalidationresult)> } |
69
112
  | GET | `/v1/accounts/{accountId}/fields/{fieldId}` | `FieldResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `fieldId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Field`](#field) } |
70
113
  | PUT | `/v1/accounts/{accountId}/fields/{fieldId}` | `FieldResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `fieldId*`: string | required; `application/json` object { `name`: string; `regex`: string or null; `is_active`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Field`](#field) } |
71
114
  | DELETE | `/v1/accounts/{accountId}/fields/{fieldId}` | `FieldResource#delete` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `fieldId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
72
- | POST | `/v1/accounts/{accountId}/fields/{fieldId}/validate` | `FieldResource#validate` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `fieldId*`: string | required; `application/json` object { `value*`: any JSON value } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`FieldValidation`](#fieldvalidation) } |
73
- | GET | `/v1/accounts/{accountId}/logo` | `AccountResource#download_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `image/*` string (binary) |
74
- | POST | `/v1/accounts/{accountId}/logo` | `AccountResource#upload_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `multipart/form-data` object { `file*`: string (binary) } | `200` `application/json` [`Envelope`](#envelope) |
75
- | DELETE | `/v1/accounts/{accountId}/logo` | `AccountResource#delete_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) |
76
- | GET | `/v1/accounts/{accountId}/signers` | `SignerResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
77
- | POST | `/v1/accounts/{accountId}/signers` | `SignerResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `full_name*`: string; `email`: string (email); `whatsapp_phone_number`: string; `government_id`: string (CPF or CNPJ; required for `DigitalCertificate` signers) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
115
+ | POST | `/v1/accounts/{accountId}/fields/{fieldId}/validate` | `FieldResource#validate` | Bearer token or `X-Api-Key` or signer access code | path `accountId*`: string<br>path `fieldId*`: string | required; `application/json` object { `value*`: any } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`FieldValidation`](#fieldvalidation) } |
116
+ | POST | `/v1/accounts/{accountId}/fields/validate-multiple` | `FieldResource#validate_multiple` | Bearer token or `X-Api-Key` or signer access code | path `accountId*`: string | required; `application/json` Array<object { `field_id*`: string; `value*`: any }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldValidationResult`](#fieldvalidationresult)> } |
117
+ | GET | `/v1/field-types` | `FieldResource#types` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldType`](#fieldtype)> } |
118
+ | GET | `/v1/users/self/mfa` | `AuthResource#mfa_methods` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `methods`: Array<object { `id`: string; `type`: string; `label`: string; `confirmed_at`: string (format: date-time); `last_used_at`: string (format: date-time) }>; `recovery_codes_remaining`: integer } } |
119
+ | POST | `/v1/users/self/mfa/totp` | `AuthResource#start_totp_enrollment` | Bearer token or `X-Api-Key` | None | optional; `application/json` object { `label`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `id`: string; `secret`: string; `provisioning_uri`: string } } |
120
+ | PUT | `/v1/users/self/mfa/totp/confirm` | `AuthResource#confirm_totp_enrollment` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `id*`: string; `code*`: string; `password`: string (format: password); `reauth_code`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `recovery_codes`: Array<string> } } |
121
+ | POST | `/v1/users/self/mfa/recovery-codes` | `AuthResource#regenerate_recovery_codes` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `password`: string (format: password); `code`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `recovery_codes`: Array<string> } } |
122
+ | DELETE | `/v1/users/self/mfa/{customId}` | `AuthResource#delete_mfa_method` | Bearer token or `X-Api-Key` | path `customId*`: string | required; `application/json` object { `password`: string (format: password); `code`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `is_mfa_enabled`: boolean } } |
123
+ | GET | `/v1/accounts/{accountId}/notification-policy` | `AccountResource#notification_policy` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPolicy`](#notificationpolicy) } |
124
+ | PUT | `/v1/accounts/{accountId}/notification-policy` | `AccountResource#update_notification_policy` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `events`: [`NotificationPolicyEvents`](#notificationpolicyevents); `owners_receive_all`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPolicy`](#notificationpolicy) } |
125
+ | GET | `/v1/users/self/notification-preferences` | `UserResource#notification_preferences` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPreferences`](#notificationpreferences) } |
126
+ | PUT | `/v1/users/self/notification-preferences` | `UserResource#update_notification_preferences` | Bearer token or `X-Api-Key` | None | required; `application/json` [`NotificationPreferences`](#notificationpreferences) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPreferences`](#notificationpreferences) } |
127
+ | POST | `/v1/oauth/token` | `OAuthResource#token` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthTokenRequest`](#oauthtokenrequest); `application/json` [`OAuthTokenRequest`](#oauthtokenrequest) | `200` `application/json` object { `access_token`: string; `issued_token_type`: string; `token_type`: string; `expires_in`: integer; `refresh_token`: string or null; `scope`: string; `id_token`: string or null } |
128
+ | POST | `/v1/oauth/revoke` | `OAuthResource#revoke` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthRevokeRequest`](#oauthrevokerequest); `application/json` [`OAuthRevokeRequest`](#oauthrevokerequest) | `200` No body |
129
+ | GET | `/v1/oauth/userinfo` | `OAuthResource#userinfo` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` object { `sub`: string; `name`: string or null; `email`: string or null (format: email); `email_verified`: boolean or null } |
130
+ | GET | `/v1/documents/{documentId}/thumbnail` | `DocumentResource#thumbnail` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
131
+ | GET | `/v1/documents/{documentId}/pages/{pageId}/download` | `DocumentResource#download_page` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>path `pageId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
132
+ | GET | `/v1/public/documents/{documentId}` | `DocumentResource#public_info` | Public | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
133
+ | PUT | `/v1/public/documents/{documentId}/send-token` | `DocumentResource#send_token` | Public | path `documentId*`: string | required; `application/json` object { `channel*`: string (`"email"`); `recipient*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `document`: object { `resource`: string; `id`: string; `name`: string; `page_count`: integer; `created_by`: string }; `channel`: string; `recipient`: string } } |
134
+ | GET | `/v1/users/self/push-preferences` | `UserResource#push_preferences` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`PushPreferences`](#pushpreferences) } |
135
+ | PUT | `/v1/users/self/push-preferences` | `UserResource#update_push_preferences` | Bearer token or `X-Api-Key` | None | required; `application/json` [`PushPreferences`](#pushpreferences) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`PushPreferences`](#pushpreferences) } |
136
+ | GET | `/v1/accounts/{accountId}/signers` | `SignerResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
137
+ | POST | `/v1/accounts/{accountId}/signers` | `SignerResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `full_name*`: string; `email`: string (format: email); `whatsapp_phone_number`: string; `government_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
78
138
  | GET | `/v1/accounts/{accountId}/signers/{signerId}` | `SignerResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
79
- | PUT | `/v1/accounts/{accountId}/signers/{signerId}` | `SignerResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `signerId*`: string | required; `application/json` object { `full_name`: string; `email`: string (email); `whatsapp_phone_number`: string; `government_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
139
+ | PUT | `/v1/accounts/{accountId}/signers/{signerId}` | `SignerResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `signerId*`: string | required; `application/json` object { `full_name`: string; `email`: string (format: email); `whatsapp_phone_number`: string; `government_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
80
140
  | DELETE | `/v1/accounts/{accountId}/signers/{signerId}` | `SignerResource#delete` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
81
- | GET | `/v1/accounts/{accountId}/stats` | `AccountResource#stats` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `granularity`: string<br>query `month`: string (`YYYY-MM`; required for daily) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatsRow`](#documentstatsrow)> } |
141
+ | GET | `/v1/signers/self` | `SignerResource#self_data` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerSelf`](#signerself) } |
142
+ | GET | `/v1/sign/theme` | `SignerResource#theme` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountTheme`](#accounttheme) } |
143
+ | GET | `/v1/sign/logo` | `SignerResource#download_logo` | signer access code | None | None | `200` `image/*` string (format: binary) |
144
+ | GET | `/v1/signers/identity-verification` | `SignerResource#identity_verification` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `can_start`: boolean; `status`: string or null; `url`: string or null; `expires_at`: string or null (format: date-time); `completed_at`: string or null (format: date-time) } } |
145
+ | POST | `/v1/signers/identity-verification` | `SignerResource#start_identity_verification` | signer access code | None | required; `application/json` object { `consent*`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `id`: string; `url`: string; `expires_at`: string or null (format: date-time) } } |
146
+ | GET | `/v1/signers/{signerId}/document` | `SignerDocumentResource#current` | signer access code | path `signerId*`: string<br>query `expand`: Array<string (`"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SigningDocument`](#signingdocument) } |
147
+ | GET | `/v1/sign` | `AssignmentResource#signer_document` | signer access code | query `has_accepted_terms`: boolean<br>query `expand`: Array<string (`"envelope"`)><br>query `document_id`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SigningDocument`](#signingdocument) } |
148
+ | POST | `/v1/documents/{documentId}/assignments/{assignmentId}` | `AssignmentResource#sign` | signer access code | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` Array<object { `itemId*`: string; `fieldId*`: string; `pageId*`: string; `value*`: string }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object } |
149
+ | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reject` | `AssignmentResource#decline` | signer access code | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` object { `decline_reason*`: string (max length: 2000) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
150
+ | PUT | `/v1/signers/documents/sign-multiple` | `SignerDocumentResource#sign_multiple` | signer access code | None | required; `application/json` object { `document_ids*`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
151
+ | PUT | `/v1/signers/documents/decline-multiple` | `SignerDocumentResource#decline_multiple` | signer access code | None | required; `application/json` object { `document_ids*`: Array<string>; `decline_reason*`: string (max length: 2000) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
152
+ | POST | `/v1/verify` | `SignerResource#verify_email` | signer access code | None | required; `application/json` object { `verification-code*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
153
+ | PUT | `/v1/documents/{documentId}/signers/confirm-data` | `SignerResource#confirm_data` | signer access code | path `documentId*`: string | required; `application/json` object { `email`: string (format: email); `whatsapp_phone_number`: string; `has_accepted_terms`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
154
+ | PUT | `/v1/signers/accept-terms` | `SignerResource#accept_terms` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `full_name*`: string; `email*`: string or null (format: email); `has_accepted_terms*`: boolean } } |
155
+ | POST | `/v1/signature` | `SignerResource#upload_signature` | signer access code | query `type`: string (`"signature"`, `"initial"`)<br>query `reuse`: boolean | required; `image/png` string (format: binary); `image/jpeg` string (format: binary) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
156
+ | GET | `/v1/signature/{signatureType}` | `SignerResource#download_signature` | signer access code | path `signatureType*`: string | None | `200` `image/*` string (format: binary) |
157
+ | GET | `/v1/signers/{signerId}/documents` | `SignerDocumentResource#list` | signer access code or Bearer token or `X-Api-Key` | path `signerId*`: string<br>query `envelope_id`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
158
+ | GET | `/v1/signers/{signerId}/documents/search` | `SignerDocumentResource#search` | signer access code or Bearer token or `X-Api-Key` | path `signerId*`: string<br>query `envelope_id`: string<br>query `search`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
159
+ | GET | `/v1/signers/{signerId}/documents/{documentId}/download/{artifactName}` | `SignerDocumentResource#download` | signer access code | path `signerId*`: string<br>path `documentId*`: string<br>path `artifactName*`: string (`"original"`) | None | `200` `application/pdf` string (format: binary) |
160
+ | POST | `/v1/sign/certified-copy` | `SignerDocumentResource#send_certified_copy` | signer access code | None | optional; `application/json` object { `document_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `available`: boolean; `notification_method`: string (`"Email"`, `"Whatsapp"`); `resends_left`: integer or null; `sent_to`: string } } |
161
+ | GET | `/v1/signers/downloads/{token}` | `SignerDocumentResource#download_certified_copy` | Public | path `token*`: string | None | `200` `application/pdf` string (format: binary) |
162
+ | POST | `/v1/signers/downloads/{token}/resend` | `SignerDocumentResource#resend_certified_copy` | Public | path `token*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `available`: boolean; `notification_method`: string (`"Email"`, `"Whatsapp"`); `resends_left`: integer or null; `sent_to`: string } } |
163
+ | POST | `/v1/authentication/social-login` | `AuthResource#social_login` | Public | None | required; `application/json` object { `provider*`: string (`"google"`); `token*`: string; `has_accepted_terms*`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) } |
164
+ | POST | `/v1/auth/link-social-login` | `AuthResource#link_social_login` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `provider*`: string (`"google"`); `token*`: string } | `200` `application/json` [`Envelope`](#envelope) |
165
+ | GET | `/v1/accounts/{accountId}/stats` | `AccountResource#stats` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `granularity`: string (`"monthly"`, `"daily"`)<br>query `month`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatsRow`](#documentstatsrow)> } |
166
+ | GET | `/v1/users/self/stats` | `UserResource#stats` | Bearer token or `X-Api-Key` | query `granularity`: string (`"monthly"`, `"daily"`)<br>query `month`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatsRow`](#documentstatsrow)> } |
82
167
  | GET | `/v1/accounts/{accountId}/tags` | `TagResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Tag`](#tag)> } |
83
- | POST | `/v1/accounts/{accountId}/tags` | `TagResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `name*`: string; `color`: 6-digit hex string (optional leading `#`) or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Tag`](#tag) } |
84
- | PUT | `/v1/accounts/{accountId}/tags/{tagId}` | `TagResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `tagId*`: string | required; `application/json` object { `name`: string; `color`: 6-digit hex string (optional leading `#`) or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Tag`](#tag) } |
168
+ | POST | `/v1/accounts/{accountId}/tags` | `TagResource#create` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `name*`: string; `color`: string or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Tag`](#tag) } |
169
+ | PUT | `/v1/accounts/{accountId}/tags/{tagId}` | `TagResource#update` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `tagId*`: string | required; `application/json` object { `name`: string; `color`: string or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Tag`](#tag) } |
85
170
  | DELETE | `/v1/accounts/{accountId}/tags/{tagId}` | `TagResource#delete` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `tagId*`: string<br>query `force`: boolean | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `deleted`: boolean } } |
86
- | GET | `/v1/accounts/{accountId}/templates` | `TemplateResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Template`](#template)> } |
87
- | POST | `/v1/accounts/{accountId}/templates/{templateId}/documents` | `DocumentResource#create_from_template` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `templateId*`: string | required; `application/json` object { `signers*`: Array<object { `role_id*`: string; `id*`: string; `verification_method`: string; `notification_methods`: Array<string>; `step`: integer }>; `editor_fields`: Array<object { `field_id*`: string; `value*`: string }>; `name`: string; `message`: string; `expires_at`: string (date-time); `tags`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
88
- | POST | `/v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost` | `DocumentResource#estimate_cost_from_template` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `templateId*`: string | required; `application/json` object { `signers*`: Array<object { `role_id*`: string; `verification_method`: string; `notification_methods`: Array<string> }> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
89
- | GET | `/v1/accounts/{accountId}/theme` | `AccountResource#theme` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountTheme`](#accounttheme) } |
90
- | GET | `/v1/accounts/{accountId}/webhooks` | `WebhookResource#list_dispatches` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `endpoint_id`: string<br>query `event`: string<br>query `delivered`: string<br>query `from`: integer<br>query `to`: integer<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WebhookDispatch`](#webhookdispatch)> } |
91
- | GET | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#list_endpoints` | Bearer token or `X-Api-Key`; OAuth `account:read` | path `accountId*`: string; query `url`: exact registered URL | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WebhookEndpoint`](#webhookendpoint)> } |
92
- | POST | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#create_endpoint` | Bearer token or `X-Api-Key`; OAuth `webhooks:write` | path `accountId*`: string | required; `application/json` object { `url*`: string (uri); `email*`: string (email); `events*`: Array<string>; `name`: string; `is_active`: boolean; `signing_enabled`: boolean }; unknown keys raise `ValidationError` locally | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) with `secret`: string when signing_enabled is true (returned once) }; `400` duplicate URL, `403` past the plan limit (1 endpoint, 3 on paid plans) |
93
- | DELETE | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#delete_endpoint_by_url` | Bearer token or `X-Api-Key`; OAuth `webhooks:write` | path `accountId*`: string; query `url*`: exact registered URL | None | `200` envelope data `[]`; SDK returns `nil`; `404` when no endpoint matches |
94
- | GET | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#get_endpoint` | Bearer token or `X-Api-Key`; OAuth `account:read` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) } |
95
- | PUT | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#update_endpoint` | Bearer token or `X-Api-Key`; OAuth `webhooks:write` | path `accountId*`: string<br>path `endpointId*`: string | required; `application/json` object { `url`: string (uri); `email`: string (email); `events`: Array<string>; `name`: string; `is_active`: boolean; `signing_enabled`: boolean } — partial; at least one field | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) } |
96
- | DELETE | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#delete_endpoint` | Bearer token or `X-Api-Key`; OAuth `webhooks:write` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope); SDK returns `nil` |
97
- | GET | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret` | `WebhookResource#endpoint_secret` | Bearer token or `X-Api-Key`; not available to OAuth applications | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpointSecret`](#webhookendpointsecret) }; `400` when signing is disabled |
98
- | POST | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret/rotate` | `WebhookResource#rotate_endpoint_secret` | Bearer token or `X-Api-Key`; not available to OAuth applications | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpointSecret`](#webhookendpointsecret) } (the new secret; the old one stops working immediately) |
99
- | PUT | `/v1/accounts/{accountId}/webhooks/inactivate` | `WebhookResource#inactivate` | Bearer token or `X-Api-Key` | path `accountId*`: string | None; acts on the account's oldest endpoint | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
100
- | GET | `/v1/accounts/{accountId}/webhooks/subscriptions` | `WebhookResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string | None; reads the account's oldest endpoint; SDK returns `nil` on `404` | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
101
- | PUT | `/v1/accounts/{accountId}/webhooks/subscriptions` | `WebhookResource#register` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `events*`: Array<string>; `is_active*`: boolean; `url*`: string (uri); `email*`: string (email) } — creates or replaces the account's oldest endpoint; the SDK defaults `is_active` to `true` and rejects other keys | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
102
- | POST | `/v1/accounts/{accountId}/webhooks/{historyId}/retry` | `WebhookResource#retry_dispatch` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `historyId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookDispatch`](#webhookdispatch) } |
103
- | GET | `/v1/assignments` | `AssignmentResource#list` | Bearer token or `X-Api-Key` | query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Assignment`](#assignment)> } |
104
- | POST | `/v1/auth/link-social-login` | `AuthResource#link_social_login` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `provider*`: string; `token*`: string } | `200` `application/json` [`Envelope`](#envelope) |
105
- | PUT | `/v1/authentication/change-password` | `AuthResource#change_password` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `email*`: string (email); `password*`: string (password); `new_password*`: string (password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (email) } } |
106
- | POST | `/v1/authentication/mfa/verify` | `AuthResource#verify_mfa` | Public | None | required; `application/json` object { `mfa_token*`: string; `code*`: string (6-digit authenticator code or recovery code) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) }; `400` invalid code, `401` expired, used, or over-attempted challenge |
107
- | PUT | `/v1/authentication/request-password-reset` | `AuthResource#request_password_reset` | Public | None | required; `application/json` object { `email*`: string (email) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (email) } } |
108
- | PUT | `/v1/authentication/reset-password` | `AuthResource#reset_password` | Public | None | required; `application/json` object { `email*`: string (email); `token`: string; `new_password*`: string (password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `email`: string (email) } } |
109
- | POST | `/v1/authentication/social-login` | `AuthResource#social_login` | Public | None | required; `application/json` object { `provider*`: string; `token*`: string; `has_accepted_terms*`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) } |
110
- | GET | `/v1/documents/statuses` | `DocumentResource#statuses` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatus`](#documentstatus)> } |
111
- | GET | `/v1/documents/{documentId}` | `DocumentResource#details` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
112
- | DELETE | `/v1/documents/{documentId}` | `DocumentResource#delete` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
113
- | PATCH | `/v1/documents/{documentId}` | `DocumentResource#rename` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `name*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
114
- | GET | `/v1/documents/{documentId}/activities` | `DocumentResource#activities` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentActivity`](#documentactivity)> } |
115
- | POST | `/v1/documents/{documentId}/assignments` | `AssignmentResource#create` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method*`: string; `signers*`: Array<object { `id*`: string; `verification_method`: string; `notification_methods`: Array<string>; `step`: integer }>; `entries`: Array<object { `page_id`: string; `fields`: Array<object { `signer_id`: string; `field_id`: string; `display_settings`: [`DisplaySettings`](#displaysettings) }> }>; `message`: string; `expires_at`: string (date-time); `copy_receivers`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Assignment`](#assignment) } |
116
- | POST | `/v1/documents/{documentId}/assignments/estimate-cost` | `AssignmentResource#estimate_cost` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method`: string; `signers`: Array<object { `verification_method`: string; `notification_methods`: Array<string> }>; `entries`: Array<object> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
117
- | POST | `/v1/documents/{documentId}/assignments/{assignmentId}` | `AssignmentResource#sign` | `signer-access-code` query parameter | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` Array<object { `itemId*`: string; `fieldId*`: string; `pageId*`: string; `value*`: string }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object } |
118
- | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reject` | `AssignmentResource#decline` | `signer-access-code` query parameter | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` object { `decline_reason*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
119
- | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reset-expiration` | `AssignmentResource#reset_expiration` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` object { `expires_at*`: string (date-time) or `null` to clear } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Assignment`](#assignment) } |
120
- | POST | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/estimate-resend-cost` | `AssignmentResource#estimate_resend_cost` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ResendCostEstimate`](#resendcostestimate) } |
121
- | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification` | `AssignmentResource#identity_review` | Bearer token or `X-Api-Key` | path `documentId*`, `assignmentId*`, `signerId*`: string | None | `200` envelope data [`SignerIdentityReview`](#signeridentityreview); `404` when no verification exists |
122
- | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/images/{name}` | `AssignmentResource#identity_review_image` | Bearer token or `X-Api-Key` | path `documentId*`, `assignmentId*`, `signerId*`: string; `name*`: enum `document_front`, `document_back`, `document_pdf`, `face` | None | `200` binary `image/jpeg`, `image/png` or `application/pdf`, `Cache-Control: no-store`; `404` unless evidence exists and review is InReview |
123
- | POST | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/review` | `AssignmentResource#decide_identity_review` | Bearer token or `X-Api-Key` | path `documentId*`, `assignmentId*`, `signerId*`: string | required; `application/json` { `decision*`: enum `Approved`, `Rejected`; `note`: string or null (max 2000 characters) } | `200` envelope data [`SignerIdentityReview`](#signeridentityreview); `400` unless InReview and document is pending_signature or pending_identity_review |
124
- | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/resend` | `AssignmentResource#resend_notification` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `is_sent`: boolean; `document_id`: string; `signer_id`: string } } |
125
- | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/whatsapp-notifications` | `AssignmentResource#whatsapp_notifications` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WhatsappNotification`](#whatsappnotification)> } |
126
- | GET | `/v1/documents/{documentId}/download/{artifactName}` | `DocumentResource#download` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `artifactName*`: string | None | `200` `application/pdf` string (binary) |
127
- | GET | `/v1/documents/{documentId}/pages/{pageId}/download` | `DocumentResource#download_page` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `pageId*`: string | None | `200` `image/*` string (binary) |
128
- | PUT | `/v1/documents/{documentId}/signers/confirm-data` | `SignerResource#confirm_data` | `signer-access-code` query parameter | path `documentId*`: string | required; `application/json` object { `full_name`: string; `email`: string (email); `government_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Signer`](#signer) } |
129
- | GET | `/v1/documents/{documentId}/thumbnail` | `DocumentResource#thumbnail` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `image/*` string (binary) |
130
- | GET | `/v1/documents/{documentSignatureHash}/verify` | `DocumentResource#verify` | Public | path `documentSignatureHash*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentVerification`](#documentverification) } |
131
- | GET | `/v1/field-types` | `FieldResource#types` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldType`](#fieldtype)> } |
132
- | POST | `/v1/login` | `AuthResource#login` | Public | None | required; `application/json` object { `email*`: string (email); `password*`: string (password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthSession`](#authsession) }, or object { `mfa_token`: string } when two-factor authentication is enabled — complete it with `POST /v1/authentication/mfa/verify` |
133
- | POST | `/v1/oauth/token` | `OAuthResource#token`, `#exchange_code`, `#refresh` | Public (client authenticates with `client_id` in the body) | None | required; `application/x-www-form-urlencoded` (RFC 6749; also accepts `application/json`) object { `grant_type*`: string enum `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:token-exchange`; `client_id*`: string; `code`: string; `redirect_uri`: string (uri); `code_verifier`: string; `refresh_token`: string; `client_secret`: string; `resource`: string (uri); `subject_token`: string; `subject_token_type`: string; `requested_token_type`: string } | `200` `application/json` **flat** object { `access_token`: string; `token_type`: string; `expires_in`: integer; `refresh_token`: string (nullable); `scope`: string; `id_token`: string (nullable); `issued_token_type`: string (token exchange only) } — not enveloped |
134
- | POST | `/v1/oauth/revoke` | `OAuthResource#revoke` | Public (client authenticates with `client_id` in the body) | None | required; `application/x-www-form-urlencoded` (RFC 7009; also accepts `application/json`) object { `token*`: string; `client_id*`: string; `token_type_hint`: string enum `access_token`, `refresh_token`; `client_secret`: string } | `200` empty body — every token outcome reports success |
135
- | GET | `/v1/oauth/userinfo` | `OAuthResource#userinfo` | Bearer token or `X-Api-Key`; requires the `openid` scope | None | None | `200` `application/json` **flat** object { `sub`: string; `name`: string (nullable); `email`: string (email, nullable); `email_verified`: boolean (nullable) } — not enveloped |
136
- | GET | `/v1/public/documents/{documentId}` | `DocumentResource#public_info` | Public | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
137
- | PUT | `/v1/public/documents/{documentId}/send-token` | `DocumentResource#send_token` | Public | path `documentId*`: string | required; `application/json` object { `channel*`: `"email"`; `recipient*`: string (signer email) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `document`: object { `resource`, `id`, `name`, `page_count`, `created_by` }; `channel`: string; `recipient`: string } } |
138
- | GET | `/v1/sign` | `AssignmentResource#signer_document` | `signer-access-code` query parameter | query `has_accepted_terms`: boolean | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
139
- | POST | `/v1/signature` | `SignerResource#upload_signature` | `signer-access-code` query parameter | query `type`: string<br>query `reuse`: boolean | required; `image/png` string (binary) | `200` `application/json` [`Envelope`](#envelope) |
140
- | GET | `/v1/signature/{signatureType}` | `SignerResource#download_signature` | `signer-access-code` query parameter | path `signatureType*`: string | None | `200` `image/*` string (binary) |
141
- | PUT | `/v1/signers/accept-terms` | `SignerResource#accept_terms` | `signer-access-code` query parameter | None | None | `200` `application/json` [`Envelope`](#envelope) |
142
- | PUT | `/v1/signers/documents/decline-multiple` | `SignerDocumentResource#decline_multiple` | `signer-access-code` query parameter | None | required; `application/json` object { `document_ids*`: Array<string>; `decline_reason*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
143
- | PUT | `/v1/signers/documents/sign-multiple` | `SignerDocumentResource#sign_multiple` | `signer-access-code` query parameter | None | required; `application/json` object { `document_ids*`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
144
- | GET | `/v1/signers/self` | `SignerResource#self_data` | `signer-access-code` query parameter | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerSelf`](#signerself) } |
145
- | GET | `/v1/signers/identity-verification` | `SignerResource#identity_verification` | `signer-access-code` query parameter | None | None | `200` envelope data { `can_start`: boolean; `status`: string or null; `url`: string or null (bearer capture URL, preserve fragment); `expires_at`: date-time or null; `completed_at`: date-time or null } |
146
- | POST | `/v1/signers/identity-verification` | `SignerResource#start_identity_verification` | `signer-access-code` query parameter | None | required; `application/json` { `consent*`: true } | `200` envelope data { `id`: string; `url`: string (bearer capture URL, preserve fragment); `expires_at`: date-time or null }; `400` unless no session exists or the last session Expired |
147
- | GET | `/v1/signers/{signerId}/document` | `SignerDocumentResource#current` | `signer-access-code` query parameter | path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
148
- | GET | `/v1/signers/{signerId}/documents` | `SignerDocumentResource#list` (signer code); `#list_as_workspace` (Bearer token or `X-Api-Key`) | `signer-access-code` query parameter, or workspace credentials | path `signerId*`: string<br>query `page`: integer<br>query `per-page`: integer | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
149
- | GET | `/v1/signers/{signerId}/documents/search` | `SignerDocumentResource#search` (signer code); `#search_as_workspace` (Bearer token or `X-Api-Key`) | `signer-access-code` query parameter, or workspace credentials | path `signerId*`: string<br>query `search`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
150
- | GET | `/v1/signers/{signerId}/documents/{documentId}/download/{artifactName}` | `SignerDocumentResource#download` | Public | path `signerId*`: string<br>path `documentId*`: string<br>path `artifactName*`: string | None | `200` `application/pdf` string (binary) |
171
+ | GET | `/v1/accounts/{accountId}/templates` | `TemplateResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `search`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Template`](#template)> } |
172
+ | POST | `/v1/accounts/{accountId}/templates/{templateId}/documents` | `DocumentResource#create_from_template` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `templateId*`: string<br>header `Idempotency-Key`: string | required; `application/json` object { `signers*`: Array<object { `role_id*`: string; `id`: string; `email`: string; `name`: string; `whatsapp_phone_number`: string; `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `notification_methods`: Array<string>; `embedded`: boolean; `step`: integer }>; `editor_fields`: Array<object { `field_id*`: string; `value*`: string }>; `name`: string; `message`: string; `expires_at`: string (format: date-time); `tags`: Array<string>; `max_total_credits`: number } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
173
+ | POST | `/v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost` | `DocumentResource#estimate_cost_from_template` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `templateId*`: string | required; `application/json` object { `signers*`: Array<object { `role_id*`: string; `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `notification_methods`: Array<string> }> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
174
+ | GET | `/v1/users/self` | `UserResource#me` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthUser`](#authuser) } |
151
175
  | GET | `/v1/users/api-keys` | `AuthResource#get_api_key` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ApiKey`](#apikey) } |
152
- | POST | `/v1/users/api-keys` | `AuthResource#create_api_key` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `password*`: string (password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ApiKey`](#apikey) } |
176
+ | POST | `/v1/users/api-keys` | `AuthResource#create_api_key` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `password*`: string (format: password) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ApiKey`](#apikey) } |
153
177
  | DELETE | `/v1/users/api-keys` | `AuthResource#delete_api_key` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
154
- | GET | `/v1/users/self` | `UserResource#me` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthUser`](#authuser) } |
155
- | GET | `/v1/users/self/mfa` | `AuthResource#mfa_methods` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `methods`: Array<object { `id`: string; `type`: string; `label`: string; `confirmed_at`: string (date-time); `last_used_at`: string (date-time) }>; `recovery_codes_remaining`: integer } } |
156
- | POST | `/v1/users/self/mfa/totp` | `AuthResource#start_totp_enrollment` | Bearer token or `X-Api-Key` | None | optional; `application/json` object { `label`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `id`: string; `secret`: string (returned only here); `provisioning_uri`: string } } |
157
- | PUT | `/v1/users/self/mfa/totp/confirm` | `AuthResource#confirm_totp_enrollment` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `id*`: string (SDK `method_id:`); `code*`: string; `password`: string (password); `reauth_code`: string } — `password` or `reauth_code` only when replacing a confirmed method | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `recovery_codes`: Array<string> (shown once) } } |
158
- | POST | `/v1/users/self/mfa/recovery-codes` | `AuthResource#regenerate_recovery_codes` | Bearer token or `X-Api-Key` | None | required; `application/json` object { `password`: string (password); `code`: string } — one of the two is required (checked locally) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `recovery_codes`: Array<string> } } |
159
- | DELETE | `/v1/users/self/mfa/{customId}` | `AuthResource#delete_mfa_method` | Bearer token or `X-Api-Key` | path `customId*`: string | required; `application/json` object { `password`: string (password); `code`: string } — one of the two is required (checked locally) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `is_mfa_enabled`: boolean } } |
160
- | GET | `/v1/users/self/notification-preferences` | `UserResource#notification_preferences` | User bearer token or `X-Api-Key`; unavailable to third-party OAuth apps | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPreferences`](#notificationpreferences) } |
161
- | PUT | `/v1/users/self/notification-preferences` | `UserResource#update_notification_preferences` | User bearer token or `X-Api-Key`; unavailable to third-party OAuth apps | None | required; `application/json` [`NotificationPreferences`](#notificationpreferences) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`NotificationPreferences`](#notificationpreferences) } |
162
- | GET | `/v1/users/self/stats` | `UserResource#stats` | Bearer token or `X-Api-Key` | query `granularity`: string<br>query `month`: string (`YYYY-MM`; required for daily) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`DocumentStatsRow`](#documentstatsrow)> } |
163
- | POST | `/v1/verify` | `SignerResource#verify_email` | `signer-access-code` query parameter | None | required; `application/json` object { `verification-code*`: string } | `200` `application/json` [`Envelope`](#envelope) |
178
+ | GET | `/v1/accounts/{accountId}/webhooks/subscriptions` | `WebhookResource#get` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
179
+ | PUT | `/v1/accounts/{accountId}/webhooks/subscriptions` | `WebhookResource#register` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `events*`: Array<string>; `is_active*`: boolean; `url*`: string (format: uri); `email*`: string (format: email) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
180
+ | PUT | `/v1/accounts/{accountId}/webhooks/inactivate` | `WebhookResource#inactivate` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookSubscription`](#webhooksubscription) } |
164
181
  | GET | `/v1/webhooks/event-types` | `WebhookResource#list_event_types` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WebhookEventType`](#webhookeventtype)> } |
182
+ | GET | `/v1/accounts/{accountId}/webhooks` | `WebhookResource#list_dispatches` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `endpoint_id`: string<br>query `event`: string<br>query `delivered`: string (`"true"`, `"false"`)<br>query `from`: integer<br>query `to`: integer<br>query `page`: integer<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WebhookDispatch`](#webhookdispatch)> } |
183
+ | POST | `/v1/accounts/{accountId}/webhooks/{historyId}/retry` | `WebhookResource#retry_dispatch` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `historyId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookDispatch`](#webhookdispatch) } |
184
+ | GET | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#list_endpoints` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `url`: string (format: uri) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WebhookEndpoint`](#webhookendpoint)> } |
185
+ | POST | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#create_endpoint` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` object { `url*`: string (format: uri); `email*`: string (format: email); `events*`: Array<string>; `name`: string; `is_active`: boolean; `signing_enabled`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) plus object { `secret`: string } } |
186
+ | DELETE | `/v1/accounts/{accountId}/webhooks/endpoints` | `WebhookResource#delete_endpoint_by_url` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `url*`: string (format: uri) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
187
+ | GET | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#get_endpoint` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) } |
188
+ | PUT | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#update_endpoint` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | required; `application/json` object { `url`: string (format: uri); `email`: string (format: email); `events`: Array<string>; `name`: string; `is_active`: boolean; `signing_enabled`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpoint`](#webhookendpoint) plus object { `secret`: string } } |
189
+ | DELETE | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}` | `WebhookResource#delete_endpoint` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
190
+ | GET | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret` | `WebhookResource#endpoint_secret` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpointSecret`](#webhookendpointsecret) } |
191
+ | POST | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret/rotate` | `WebhookResource#rotate_endpoint_secret` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | optional; `application/json` object { `keep_previous`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookEndpointSecret`](#webhookendpointsecret) plus object { `previous_secret_expires_at`: string (format: date-time) } } |
192
+ | POST | `/v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/test` | `WebhookResource#test_endpoint` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `endpointId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`WebhookDispatch`](#webhookdispatch) } |
193
+ | GET | `/.well-known/oauth-protected-resource` | `OAuthResource#protected_resource_metadata` | Public | None | None | `200` `application/json` object { `resource`: string (format: uri); `authorization_servers`: Array<string (format: uri)>; `scopes_supported`: Array<string>; `bearer_methods_supported`: Array<string> } |
194
+ | GET | `/v1/documents/{documentId}/assignments/{assignmentId}/whatsapp-notifications` | `AssignmentResource#whatsapp_notifications` | Bearer token or `X-Api-Key` | path `documentId*`: string<br>path `assignmentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`WhatsappNotification`](#whatsappnotification)> } |
195
+
196
+ ### Staging operations
197
+
198
+ These operations are published by `https://api.angry-pisco.stage.assinafy.com.br/v1/docs` and are not yet
199
+ published in production. Configure that staging base URL for these calls; production can return 404.
200
+
201
+ | Method | Path | Ruby SDK method | Authentication | Parameters | Request body | Success wire response |
202
+ | --- | --- | --- | --- | --- | --- | --- |
203
+ | GET | `/v1/documents/{documentId}/signer-capacities` | `DocumentResource#signer_capacities` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<object { `signer_id*`: string; `sign_as*`: string (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`) }> } |
204
+ | GET | `/v1/documents/{documentId}/watchers` | `DocumentResource#watchers` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
205
+ | PUT | `/v1/documents/{documentId}/watchers` | `DocumentResource#set_watchers` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `watcher_ids*`: Array<string (min length: 1)> (max items: 10) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
206
+ | POST | `/v1/accounts/{accountId}/envelopes/{envelopeId}/signers/{signerId}/estimate-resend-cost` | `EnvelopeResource#estimate_resend_cost` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ResendCostEstimate`](#resendcostestimate) } |
207
+ | GET | `/v1/documents/{documentId}/notification-history` | `DocumentResource#notification_history` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<object { `signer_id*`: string; `notification_history*`: Array<[`NotificationHistoryEntry`](#notificationhistoryentry) plus object { `delivered_at`: string or null (format: date-time); `opened_at`: string or null (format: date-time) }> }> } |
208
+ | POST | `/v1/documents/{documentId}/scheduled-sends` | `AssignmentResource#schedule` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `send_at*`: string (format: date-time) or integer; `method`: string (`"virtual"`, `"collect"`); `signers*`: Array<object>; `expires_at`: string (format: date-time) or integer or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
209
+ | GET | `/v1/accounts/{accountId}/scheduled-sends` | `ScheduledSendResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50)<br>query `document_id`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`ScheduledSend`](#scheduledsend)> } |
210
+ | POST | `/v1/accounts/{accountId}/scheduled-sends` | `EnvelopeResource#schedule` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` [`EnvelopeCreateRequest`](#envelopecreaterequest) plus object { `send_at*`: string (format: date-time) or integer } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
211
+ | PUT | `/v1/accounts/{accountId}/scheduled-sends/{scheduledSendId}/cancel` | `ScheduledSendResource#cancel` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `scheduledSendId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
212
+ | PUT | `/v1/accounts/{accountId}/scheduled-sends/{scheduledSendId}/send` | `ScheduledSendResource#send_now` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `scheduledSendId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
165
213
 
166
214
  ## Error responses
167
215
 
@@ -200,7 +248,9 @@ raise `Assinafy::ApiError`:
200
248
  - `status_code` contains the HTTP or envelope status.
201
249
  - `message` uses the API's `message`, `error`, or `name` value.
202
250
  - `response_data` preserves the parsed response body.
203
- - `error_name` and `error_code` expose framework `name` and `code` values when present.
251
+ - `error_name` exposes `name`; `error_code` exposes numeric framework codes or actionable codes such as
252
+ `PlanRestricted`, `InsufficientScope`, `CreditCeilingExceeded`, `DocumentNotReady` and `ContractChanged`.
253
+ `response_data['errors']` preserves field-level `{ field, code, message }` entries.
204
254
  - `context` contains `status_code` and `response_data` for structured logging or support diagnostics, plus
205
255
  `www_authenticate` when the response carries that header.
206
256
  - `rate_limit` returns `{ limit:, remaining:, reset: }` from the `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`
@@ -364,7 +414,8 @@ names from its `images` with `identity_review_image`, and submit `decide_identit
364
414
  or `decision: 'Rejected'` while the document is pending_signature or pending_identity_review. Rejection cancels
365
415
  the document and notifies signers and copy receivers. Optional `note:` (at most 2000 characters) is recorded in
366
416
  activities and sent to the provider; it is never shown to the signer. Images are fetched from the provider,
367
- available only during InReview, and must not be cached. The review retains summaries, with `evidence_available`
417
+ available only during InReview, and must not be cached. Evidence images and decisions require an API key or user session; third-party OAuth applications
418
+ can read the review summary with `documents:read`, but cannot fetch images or decide it. The review retains summaries, with `evidence_available`
368
419
  false when none is retained or fetched. Direct approvals expose evidence through the signer_identity_verified
369
420
  activity instead. Observe signer_identity_review_required, signer_identity_review_approved,
370
421
  signer_identity_review_rejected, signer_identity_verified and signer_identity_verification_failed events.
@@ -373,8 +424,8 @@ signer_identity_review_rejected, signer_identity_verified and signer_identity_ve
373
424
 
374
425
  An account can have 1 webhook endpoint, or up to 3 on paid plans; each has a distinct URL, its own events, and its
375
426
  own signing setting, and every active endpoint subscribed to an event receives it. Creation with
376
- `signing_enabled: true` returns a `secret` once: store it immediately. OAuth apps cannot read or rotate it later;
377
- if lost, delete and recreate the endpoint. `#list_endpoints(url: registered_url)` finds an exact URL match and
427
+ `signing_enabled: true` returns a `secret` once: store it immediately. OAuth apps cannot read it later, but can rotate it with `webhooks:write`;
428
+ store the newly returned secret. `keep_previous: true` retains the old secret for 24 hours of dual signing. `#list_endpoints(url: registered_url)` finds an exact URL match and
378
429
  `#delete_endpoint_by_url(registered_url)` deletes that endpoint, returning `nil`. `WebhookResource#create_endpoint`
379
430
  and `#update_endpoint` accept only `url`, `email`, `events`, `name`, `is_active`, and `signing_enabled`.
380
431
  `#register`, `#get`, and `#inactivate` (`/webhooks/subscriptions`, `/webhooks/inactivate`) act on the account's
@@ -384,8 +435,9 @@ link-local, and other reserved destination addresses.
384
435
 
385
436
  Each delivery is a JSON `POST` carrying `webhook-id` (stable across attempts of one event to one endpoint; use it to
386
437
  deduplicate), `webhook-timestamp` (Unix seconds), and, when signing is enabled, `webhook-signature`. Any `2xx` is
387
- success. An event gets up to 2 attempts, 3 seconds apart; after 10 consecutive failed events, delivery to that
388
- endpoint pauses and only a sample of events is probed until one succeeds. `WebhookResource#retry_dispatch` forces a
438
+ success. An event gets up to 6 attempts, about 10 minutes apart, for network failures, timeouts, `408`, `429` or `5xx`;
439
+ other failures are final. After 10 failed deliveries the endpoint pauses. Probes run after 3 minutes, then 15,
440
+ then 60, then every 6 hours; success resumes delivery of missed events oldest first. `WebhookResource#retry_dispatch` forces a
389
441
  redelivery, and `#list_dispatches` filters by `endpoint_id`. The body is a [`WebhookEvent`](#webhookevent).
390
442
 
391
443
  Signatures follow the [Standard Webhooks](https://www.standardwebhooks.com) specification: `webhook-signature`
@@ -396,6 +448,111 @@ seconds from `now`. It accepts Rails `request.headers`, a Rack env (`HTTP_WEBHOO
396
448
  returns `false` rather than raising. `WebhookVerifier#verify(raw_body, hex_signature)` remains for receivers whose
397
449
  own gateway signs bodies with a hex HMAC-SHA256.
398
450
 
451
+ ### Envelopes, embedding and downloads
452
+
453
+ `client.envelopes` groups up to 20 existing processed documents and 20 signers. Create with `name`,
454
+ `signers: [{ id: ... }]` and `documents: [{ id: ..., signer_ids: [...] }]`; each document retains its own
455
+ assignment and status. Every listed signer must be on a document. Certificate signers are alone on each of their
456
+ virtual documents; collect documents require positioned fields for exactly their `signer_ids`.
457
+ `estimate_cost` checks the same body without sending or charging. `create(..., idempotency_key:)` deduplicates
458
+ lost-response retries within the workspace. Keep the key for that logical creation; deleting the envelope also
459
+ removes its idempotency result. `max_total_credits` belongs on the envelope creation body, or on `add_document`;
460
+ it is not a per-document creation field. `update(message: nil)` clears the message; `document_ids` reorders all
461
+ its documents. Cancel notifies recipients, remove-document cancels that open document, and delete requires the
462
+ envelope to be closed and preserves its documents. Downloads return ZIP bytes.
463
+
464
+ Embedded signing requires the Embed feature and API-key/user-session authentication; third-party OAuth cannot
465
+ manage origins or create sessions. Register exact origins through `accounts.create_embed_origin`, mark an
466
+ Email/Whatsapp signer `embedded: true`, then call `assignments.create_embed_session`. Load its returned URL in
467
+ an iframe within five minutes. `exchange_embed_session` is normally called by Assinafy's embed page; its token
468
+ is consumed even on a `409`. It sends no workspace credentials and is never retried by the SDK.
469
+
470
+ `signer_documents.download` requires `signer_access_code:` and defaults to `original`; the published route serves
471
+ only the original while the code is active. Explicit historical artifact arguments remain accepted by the SDK,
472
+ with the API deciding availability. Use `send_certified_copy` to send a fresh link to the signing contact,
473
+ `download_certified_copy` for PDF bytes (optional `pades: true`), and `resend_certified_copy` for an expired link.
474
+ No workspace credentials are sent. Download links last seven days initially and 30 minutes when resent;
475
+ expired-link `302` responses raise `ApiError` and are not followed. The signing code closes 30 minutes after the
476
+ signer finishes all their documents. Signing summary/branding and certified-copy delivery remain available;
477
+ other signer calls can answer `410`.
478
+
479
+ ### Templates and spending limits
480
+
481
+ `documents.create_from_template` accepts a role's existing signer `id`, or `email` with an optional `name` and
482
+ WhatsApp number to reuse/create the signer. A copy receiver's method and step are ignored upstream. Editor
483
+ fields need non-empty values. Creation returns an uploaded document with `assignment: nil`; follow document
484
+ status or webhooks until `pending_signature` or `failed`. `wait_until_ready` waits for document metadata and may
485
+ return before a template's assignment exists. Pass `idempotency_key` in the payload or options Hash (options take precedence) to avoid
486
+ creating duplicate documents. Assignment, template and envelope creation accept `max_total_credits`; a price
487
+ above it answers `409` with `CreditCeilingExceeded`. Template processing may fail later if the cost increases,
488
+ without charging. `accounts.usage` reports balances and `accounts.get(expand: 'signing_features')` reports the
489
+ available signing features. Usage is not available to third-party OAuth apps.
490
+
491
+ ### Notifications and document reads
492
+
493
+ `users.push_preferences` and `update_push_preferences` manage eight personal phone-push flags, independently of
494
+ email preferences. `accounts.notification_policy` reads workspace event rules; owners change partial rules with
495
+ `update_notification_policy`. OAuth applications cannot access these personal/workspace notification settings.
496
+ `webhooks.test_endpoint` sends an actual test delivery, even to a paused or inactive endpoint.
497
+
498
+ `documents.details/get(..., expand:)` accepts `envelope_id` and `envelope`; list/search accept `envelope_id`.
499
+ `thumbnail` and `download_page` accept `artifact: 'certificated'` for signed renders, which must not be cached.
500
+ Document activities accept sort/page/per_page; `activities` preserves the Array return, and `activities_page`
501
+ returns pagination metadata. Envelope activities are always paginated.
502
+
503
+ ### Scheduled sends, capacities and watchers
504
+
505
+ Staging exposes `assignments.schedule(document_id, payload, send_at:)` and
506
+ `envelopes.schedule(payload, send_at:)`. Both reuse the corresponding creation payload validators and return
507
+ `ScheduledSend` without sending or charging now. `send_at` is ISO 8601 (no offset means UTC) or Unix seconds,
508
+ from one hour to 90 days ahead; every explicit document deadline must be at least two hours after it.
509
+ A document can have only one pending/processing send. The worker runs about every five minutes and applies
510
+ the original member's permissions, balance, plan and credit ceiling at delivery time. Failure leaves a `failed`
511
+ record and emails that member, or active owners if the member left. Scheduling does not reserve balances or
512
+ prevent immediate assignment creation, and does not support an idempotency key.
513
+
514
+ `scheduled_sends.list(document_id:, page:, per_page:)` returns all states, newest first; all scheduled-send
515
+ operations require `documents:write`, including listing. `cancel(id)` cancels only pending sends;
516
+ `send_now(id)` creates the assignment/envelope immediately. A refused send-now remains pending, so cancel it
517
+ if a later attempt is unwanted. Repeating send/cancel after a terminal state raises `ApiError` with 409.
518
+
519
+ Assignments accept `sign_as` on each signer, defaulting to `Sign` when omitted or nil. The exact supported
520
+ values are `AssignmentResource::SIGNER_CAPACITIES`; they identify the sender's stated signing capacity,
521
+ printed on the certificate only. They are immutable after creation and read through
522
+ `documents.signer_capacities(id)`, not ordinary assignment reads or webhooks. Envelope/template signer
523
+ schemas do not publish this field.
524
+
525
+ `documents.set_watchers(id, watcher_ids)` replaces up to ten workspace contacts with email addresses;
526
+ `[]` clears them. `documents.watchers(id)` reads them in order. Watchers receive a completion, decline or
527
+ expiry email with the document name and sender, without a link/file, independent of workspace notification
528
+ policy. Change them only while the document is open. A signer who is also a watcher receives both emails.
529
+
530
+ `documents.notification_history(id)` adds nullable delivery/open timestamps to each signer's records.
531
+ Opens can come from link scanners or mail clients and are not proof of human reading. Envelope reminders
532
+ have `envelopes.estimate_resend_cost(id, signer_id)`; one reminder covers the whole envelope and returns
533
+ `ResendCostEstimate` (`total`, not `total_credits`). An estimate does not check timing eligibility. Staging
534
+ reminders refuse expired requests, repeats within two minutes, or more than ten reminders in 24 hours;
535
+ reminders through the envelope and its documents share that limit.
536
+
537
+ ### Signing and explicit empty values
538
+
539
+ Use `assignments.sign(document_id, assignment_id, [], signer_access_code:)` for virtual assignments after
540
+ terms, contact confirmation and OTP verification. For collect assignments, store both `signature` and
541
+ `initial` PNG images first, even if no initial field is placed. Supply the required item values; omitted
542
+ read-only dates are filled by the server, optional fields may remain empty, and an omitted required field
543
+ fails. Image fields use stored images and `signatureDate` uses the server's signing timestamp. The SDK passes
544
+ empty String values through; the API still rejects them for required fields, including signature fields.
545
+ Staging returns the signer's assignment, without signing URLs, with only their items and other parties' contact
546
+ details and government IDs null. A completed request may be repeated safely according to staging's contract,
547
+ but the SDK never retries it automatically.
548
+
549
+ `signers.update` preserves explicit nil or empty String for email, WhatsApp number and government ID, so
550
+ callers can clear them. Omitted fields remain unchanged; full_name cannot be cleared. Verified contact
551
+ channels on unfinished requests cannot be changed, and changes to unverified channels invalidate old links.
552
+ `signers.confirm_data` only changes email, WhatsApp number and accepted terms; use workspace signer updates
553
+ for name and government ID. Field validation sends an explicit nil as JSON null and leaves required/optional
554
+ validation to the API; zero remains a value. A missing batch `value` key is rejected locally.
555
+
399
556
  ## SDK-only helpers and aliases
400
557
 
401
558
  These public functions do not map one-to-one to an API operation. Their source comments provide parameter,
@@ -408,10 +565,11 @@ return-value, and usage details.
408
565
  | `Assinafy::Client.from_config`, `.from_hash` | Construct a client from string- or symbol-keyed configuration. | [`client.rb`](../lib/assinafy/client.rb) |
409
566
  | `Client#faraday_connection` | Return the configured Faraday connection for advanced integration. | [`client.rb`](../lib/assinafy/client.rb) |
410
567
  | `Client#upload_and_request_signatures` | Upload, optionally wait, create signers, and create a virtual assignment. | [`client.rb`](../lib/assinafy/client.rb) |
411
- | `Client#auth`, `#oauth`, `#accounts`, `#users`, `#documents`, `#contracts`, `#signers`, `#signer_documents`, `#assignments`, `#webhooks`, `#templates`, `#fields`, `#tags`, `#webhook_verifier` | Return the client's resource and helper instances. | [`client.rb`](../lib/assinafy/client.rb) |
568
+ | `Client#auth`, `#oauth`, `#accounts`, `#users`, `#documents`, `#contracts`, `#signers`, `#signer_documents`, `#assignments`, `#envelopes`, `#scheduled_sends`, `#webhooks`, `#templates`, `#fields`, `#tags`, `#webhook_verifier` | Return the client's resource and helper instances. | [`client.rb`](../lib/assinafy/client.rb) |
412
569
  | `Assinafy::Configuration.new`, `.from_hash` | Build configuration directly or from string/symbol keys. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
413
570
  | `Configuration#auth_headers` | Return the selected API-key, bearer, or empty authentication header set. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
414
571
  | Configuration readers/writers: `api_key`, `token`, `account_id`, `base_url`, `webhook_secret`, `timeout`, `logger` | Read or update configuration values; `base_url=` and `timeout=` validate like the constructor. Construct a new client to apply changes. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
572
+ | `DocumentResource#activities_page` | Read activities with pagination metadata; `#activities` retains its Array return. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
415
573
  | `DocumentResource#get` | Alias for `#details`. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
416
574
  | `DocumentResource#wait_until_ready` | Poll document details until processing succeeds, fails, or times out. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
417
575
  | `DocumentResource#fully_signed?`, `#signing_progress` | Derive completion state from document assignment data. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
@@ -433,11 +591,15 @@ return-value, and usage details.
433
591
  | `Assinafy::OAuth.generate_code_verifier`, `.code_challenge`, `.generate_state`, `.normalize_scope`, `.validate_code_verifier!`, `.authorization_url` | Build the PKCE pair, CSRF state, and authorization URL for the browser half of the OAuth flow. No network request. | [`oauth.rb`](../lib/assinafy/oauth.rb) |
434
592
  | `Assinafy::OAuth::AUTHORIZATION_SERVER`, `::AUTHORIZATION_SERVER_METADATA_URL`, `::AUTHORIZATION_ENDPOINT`, `::CODE_CHALLENGE_METHOD`, `::SCOPES` | Published authorization-server endpoints and scopes. | [`oauth.rb`](../lib/assinafy/oauth.rb) |
435
593
  | `AssignmentResource::VERIFICATION_METHODS`, `::NOTIFICATION_METHODS` | The signer verification (`Email`, `Whatsapp`, `DigitalCertificate`, `IdDocumentFaceMatchBasic`) and notification (`Email`, `Whatsapp`) enums, validated locally by `build_payload`. | [`assignment_resource.rb`](../lib/assinafy/resources/assignment_resource.rb) |
436
- | `Assinafy::Utils.handle_assinafy_response`, `.clean_params`, `.query_params`, `.body_params`, `.require_email`, `.require_expiration` | Internal public helpers used by resources for envelope and parameter normalization; applications should prefer resource methods. | [`utils.rb`](../lib/assinafy/utils.rb) |
594
+ | `Assinafy::Utils.handle_assinafy_response`, `.clean_params`, `.query_params`, `.body_params`, `.require_email`, `.require_expiration`, `.require_credit_ceiling` | Internal public helpers used by resources for envelope and parameter normalization; applications should prefer resource methods. | [`utils.rb`](../lib/assinafy/utils.rb) |
437
595
  | `Assinafy::NullLogger#debug`, `#info`, `#warn`, `#error`, `#fatal`, `#unknown` | Internal no-op logger methods used when no logger is configured. | [`null_logger.rb`](../lib/assinafy/null_logger.rb) |
438
596
  | `Assinafy::VERSION` | Published SDK version constant. | [`version.rb`](../lib/assinafy/version.rb) |
439
597
  | `Assinafy::USER_AGENT` | Version-derived `Assinafy-Ruby-SDK/v[VERSION]` request identifier. | [`version.rb`](../lib/assinafy/version.rb) |
440
598
 
599
+ `ScheduledSendResource.require_send_at` validates the delivery window and returns a Time;
600
+ `.scheduled_expiration` validates a deadline against it and returns zoned ISO 8601. Resources use these helpers
601
+ before scheduling; callers normally use `assignments.schedule` or `envelopes.schedule`.
602
+
441
603
  ## Request and response examples
442
604
 
443
605
  The resource methods linked above include request and response examples in their YARD documentation.
@@ -445,765 +607,1025 @@ The schema catalog below describes the published response objects and their nest
445
607
 
446
608
  ## Schema catalog
447
609
 
448
- Every published schema and its nested properties is listed below. Required fields are marked per
449
- schema; operation-specific requirements and grant-specific OAuth requirements still apply.
610
+ All 63 published schemas (including staging ScheduledSend) are listed below. `*` marks required properties. Nested fields are listed with dot notation; links identify reusable schemas. Examples use placeholder contacts.
450
611
 
451
612
  ### Account
452
613
 
453
614
  A workspace account (organization).
454
615
 
455
- | Property | Type | Required | Nullable | Constraints / description |
456
- | --- | --- | --- | --- | --- |
457
- | `resource` | string | No | No | — |
458
- | `id` | string | No | No | — |
459
- | `name` | string | No | No | — |
460
- | `primary_color` | string | No | Yes | — |
461
- | `secondary_color` | string | No | Yes | — |
462
- | `notification_sender_type` | string | No | No | enum: `["User", "Account"]` |
463
- | `roles` | Array<string> | No | No | — |
464
- | `is_delete_allowed` | boolean | No | No | — |
465
- | `limits` | object | No | No | Current-plan limits; present only on the single-account response. More keys may be added. |
466
- | `limits.webhook_endpoints` | integer | No | No | Maximum webhook endpoints: 1, or 3 with the Multiple Webhooks feature. |
467
- | `created_at` | string (date-time) | No | No | — |
616
+ | Property | Type | Description |
617
+ | --- | --- | --- |
618
+ | `resource` | string | Example: `"account"`. |
619
+ | `id` | string | Example: `"6401df46d6a6b0c692d9ec49"`. |
620
+ | `name` | string | Example: `"Acme Inc."`. |
621
+ | `primary_color` | string or null | Example: `"aabbcc"`. |
622
+ | `secondary_color` | string or null | Example: `"112233"`. |
623
+ | `notification_sender_type` | string (`"User"`, `"Account"`) | Example: `"User"`. |
624
+ | `roles` | Array<string> | Example: `["owner"]`. |
625
+ | `is_delete_allowed` | boolean | Example: `true`. |
626
+ | `limits` | object { `webhook_endpoints`: integer } | Limits of the workspace's current plan. Returned only by `GET /v1/accounts/{accountId}`, not in account lists. More keys may be added. |
627
+ | `limits.webhook_endpoints` | integer | How many webhook endpoints the workspace can have: `1`, or `3` with the Multiple Webhooks feature. Creating one past the limit returns `403`. Example: `1`. |
628
+ | `signing_features` | object { `DigitalCertificate*`: boolean; `VerificationIdDocumentFaceMatchBasic*`: boolean; `WhatsappNotification*`: boolean; `VerificationBypass*`: boolean; `Embed*`: boolean } | Only with `?expand=signing_features` on `GET /v1/accounts/{accountId}`: which signing features the workspace's subscription includes now (its plan's and any granted to it), so a client offers only the identity checks and notices it can use. `DigitalCertificate` and `VerificationIdDocumentFaceMatchBasic` gate the `DigitalCertificate` and `IdDocumentFaceMatchBasic` verification methods, `WhatsappNotification` the `Whatsapp` notification method (and so the `Whatsapp` verification method), and `VerificationBypass` the `Bypass` verification method. `false` means creating an assignment, or a document from a template, with that method (or estimating its cost) answers `403`. `Embed` gates embedded signing: with `false`, the embed origins endpoints, `"embedded": true` on a signer and minting an embed session answer `403` with code `PlanRestricted`. `true` is not a promise: credits, the assignment's own rules (a `DigitalCertificate` signer needs a `virtual` assignment) and a change of plan still apply. Requires the `account:read` OAuth scope. |
629
+ | `signing_features.DigitalCertificate` * | boolean | Signing with the signer's own ICP-Brasil certificate. Example: `true`. |
630
+ | `signing_features.VerificationIdDocumentFaceMatchBasic` * | boolean | Identity check by ID document and face match. Example: `false`. |
631
+ | `signing_features.WhatsappNotification` * | boolean | Sending signature requests by WhatsApp. Example: `true`. |
632
+ | `signing_features.VerificationBypass` * | boolean | Signing without a verification code (the `Bypass` verification method). Example: `false`. |
633
+ | `signing_features.Embed` * | boolean | Embedded signing: the signing screen inside your own app (see **Embedded Signing Guide**). Example: `false`. |
634
+ | `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
468
635
 
469
636
  ### AccountTheme
470
637
 
471
638
  An account's branding theme.
472
639
 
473
- | Property | Type | Required | Nullable | Constraints / description |
474
- | --- | --- | --- | --- | --- |
475
- | `account_name` | string | No | No | — |
476
- | `primary_color` | string | No | No | Hex color without leading `#`. |
477
- | `secondary_color` | string | No | Yes | — |
478
- | `logo` | string | No | No | URL to the account logo. |
640
+ | Property | Type | Description |
641
+ | --- | --- | --- |
642
+ | `account_name` | string | Example: `"Account Name"`. |
643
+ | `primary_color` | string | Button background: hex color without leading `#`. The platform default when the account set none. Example: `"aabbcc"`. |
644
+ | `secondary_color` | string | Button text: hex color without leading `#`. The platform default when the account set none. Example: `"ffffff"`. |
645
+ | `logo` | string or null | Absolute URL of the logo for the caller: `/v1/accounts/{accountId}/logo` for workspace members, `/v1/sign/logo` (append `signer-access-code`) for signers. `null` when the account has no logo. Example: `"https://api.assinafy.com.br/v1/accounts/1a/logo"`. |
646
+
647
+ ### AccountUsage
648
+
649
+ The workspace's plan and what is left of it.
650
+
651
+ | Property | Type | Description |
652
+ | --- | --- | --- |
653
+ | `plan` | string or null | The plan's name. `null` when the subscription has no plan or its plan was retired. Example: `"Pro"`. |
654
+ | `documents_renewal_date` | string or null (format: date) | When the document allowance next renews. On a custom contract, the next boundary of the contract's billing day. `null` while the subscription awaits its first payment, or on a contract with no billing day. Example: `"2026-12-01"`. |
655
+ | `balances` | object { `documents`: [`Balance`](#balance); `credits`: [`Balance`](#balance) } | Document and credit balances, as in **Get current subscription**. |
656
+ | `balances.documents` | [`Balance`](#balance) | |
657
+ | `balances.credits` | [`Balance`](#balance) | |
479
658
 
480
659
  ### ApiKey
481
660
 
482
- | Property | Type | Required | Nullable | Constraints / description |
483
- | --- | --- | --- | --- | --- |
484
- | `api_key` | string | No | Yes | — |
661
+
662
+
663
+ | Property | Type | Description |
664
+ | --- | --- | --- |
665
+ | `api_key` | string or null | Example: `"mIpe_zdJfKUpMK9Va3XuYgzPXMxz49fIaRCWXseVkpVAX608A9j3i_D67qU5qW3M"`. |
485
666
 
486
667
  ### Assignment
487
668
 
488
669
  A request for signers to sign a document.
489
670
 
490
- | Property | Type | Required | Nullable | Constraints / description |
491
- | --- | --- | --- | --- | --- |
492
- | `resource` | string | No | No | — |
493
- | `id` | string | No | No | — |
494
- | `document_id` | string | No | Yes | Document this assignment belongs to; null only after the document is deleted. |
495
- | `created_at` | string (date-time) | No | No | — |
496
- | `sender_email` | string (email) | No | Yes | Null once the sender has deleted their account. |
497
- | `method` | string | No | No | enum: `["virtual", "collect"]` |
498
- | `expires_at` | string (date-time) | No | Yes | — |
499
- | `message` | string | No | Yes | — |
500
- | `signers` | Array<[`AssignmentSigner`](#assignmentsigner)> | No | No | — |
501
- | `copy_receivers` | Array<object> | No | No | — |
502
- | `items` | Array<[`AssignmentItem`](#assignmentitem)> | No | No | — |
503
- | `summary` | [`AssignmentSummary`](#assignmentsummary) | No | No | — |
504
- | `signing_urls` | Array<[`SigningUrl`](#signingurl)> | No | No | — |
671
+ | Property | Type | Description |
672
+ | --- | --- | --- |
673
+ | `resource` | string | Example: `"assignment"`. |
674
+ | `id` | string | Example: `"615606ef81d199996981dbce"`. |
675
+ | `document_id` | string or null | The document this assignment belongs to. `null` only if the document was deleted. Example: `"615601fab04c0a3147bb1246"`. |
676
+ | `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
677
+ | `sender_email` | string or null (format: email) | Email of the user who sent the document; null once that user has deleted their account. Example: `"signer@example.com"`. |
678
+ | `method` | string (`"virtual"`, `"collect"`) | Example: `"virtual"`. |
679
+ | `expires_at` | string or null (format: date-time) | Example: `null`. |
680
+ | `message` | string or null | |
681
+ | `signers` | Array<[`AssignmentSigner`](#assignmentsigner)> | |
682
+ | `copy_receivers` | Array<object> | |
683
+ | `items` | Array<[`AssignmentItem`](#assignmentitem)> | |
684
+ | `summary` | [`AssignmentSummary`](#assignmentsummary) | |
685
+ | `signing_urls` | Array<[`SigningUrl`](#signingurl)> | |
505
686
 
506
687
  ### AssignmentItem
507
688
 
508
- | Property | Type | Required | Nullable | Constraints / description |
509
- | --- | --- | --- | --- | --- |
510
- | `id` | string | No | No | — |
511
- | `page` | any JSON value | No | Yes | — |
512
- | `signer` | object | No | No | Signer responsible for this item. |
513
- | `field` | object | No | Yes | Field definition associated with the item. |
514
- | `display_settings` | any JSON value | No | No | Rendering metadata for the item. Collect items use the DisplaySettings schema; virtual and legacy items may return an empty or non-object value. |
515
- | `value` | any JSON value | No | Yes | Captured value when completed. |
516
- | `completed` | boolean | No | No | — |
689
+
690
+
691
+ | Property | Type | Description |
692
+ | --- | --- | --- |
693
+ | `id` | string | |
694
+ | `page` | [`DocumentPage`](#documentpage) or null | |
695
+ | `signer` | object | Signer responsible for this item. |
696
+ | `field` | object or null | Field definition associated with the item. |
697
+ | `display_settings` | any | Rendering metadata for the item. Collect items use the DisplaySettings schema; virtual and legacy items may return an empty or non-object value. |
698
+ | `value` | any | Captured value when completed; `null` until then. |
699
+ | `completed` | boolean | |
517
700
 
518
701
  ### AssignmentSigner
519
702
 
520
703
  A signer within an assignment: the base Signer plus per-assignment verification/notification details.
521
704
 
522
- | Property | Type | Required | Nullable | Constraints / description |
523
- | --- | --- | --- | --- | --- |
524
- | `resource` | string | No | No | Present in single-resource responses. |
525
- | `id` | string | No | No | — |
526
- | `full_name` | string | No | No | — |
527
- | `email` | string (email) | No | Yes | — |
528
- | `whatsapp_phone_number` | string | No | Yes | E.164 format; normalized on save. |
529
- | `has_accepted_terms` | boolean | No | No | — |
530
- | `verification_method` | string | No | Yes | — |
531
- | `notification_methods` | Array<string> | No | Yes | — |
532
- | `step` | integer | No | Yes | Sequential signing step (defaults to 1). |
533
- | `notified` | boolean | No | Yes | — |
534
- | `completed` | boolean | No | Yes | Only present in account-owner contexts. |
535
- | `notification_history` | Array<[`NotificationHistoryEntry`](#notificationhistoryentry)> | No | Yes | Per-channel delivery history for this signer (email + WhatsApp), most-recent send order. |
536
- | `government_id` | string | No | Yes | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). |
537
- | `identity_verification_status` | string | No | Yes | Latest identity-document verification status; `InReview` means the account must decide it before the document can be certificated. enum: `["Pending", "InReview", "Approved", "Declined", "Expired", "Abandoned"]` |
705
+ | Property | Type | Description |
706
+ | --- | --- | --- |
707
+ | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
708
+ | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
709
+ | `full_name` | string | Example: `"John Signer"`. |
710
+ | `email` | string or null (format: email) | Example: `"signer@example.com"`. |
711
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. Example: `"+5548999990000"`. |
712
+ | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
713
+ | `has_accepted_terms` | boolean | Example: `false`. |
714
+ | `verification_method` | string or null | Example: `"Email"`. |
715
+ | `notification_methods` | array or null | Example: `["Email"]`. |
716
+ | `step` | integer or null | Sequential signing step (defaults to 1). Example: `1`. |
717
+ | `notified` | boolean or null | |
718
+ | `identity_verification_status` | string or null (`"Pending"`, `"InReview"`, `"Approved"`, `"Declined"`, `"Expired"`, `"Abandoned"`) | Latest identity-document verification status; `InReview` means the account must decide it before the document can be certificated. Example: `"InReview"`. |
719
+ | `completed` | boolean or null | Only present in account-owner contexts. |
720
+ | `notification_history` | array or null | Per-channel delivery history for this signer (email + WhatsApp), most-recent send order. |
538
721
 
539
722
  ### AssignmentSummary
540
723
 
541
- | Property | Type | Required | Nullable | Constraints / description |
542
- | --- | --- | --- | --- | --- |
543
- | `signer_count` | integer | No | No | — |
544
- | `completed_count` | integer | No | No | — |
545
- | `signers` | Array<object> | No | No | — |
724
+
725
+
726
+ | Property | Type | Description |
727
+ | --- | --- | --- |
728
+ | `signer_count` | integer | |
729
+ | `completed_count` | integer | |
730
+ | `signers` | Array<object> | |
546
731
 
547
732
  ### AuthAccount
548
733
 
549
- | Property | Type | Required | Nullable | Constraints / description |
550
- | --- | --- | --- | --- | --- |
551
- | `id` | string | No | No | — |
552
- | `name` | string | No | No | — |
553
- | `roles` | Array<string> | No | No | — |
554
- | `is_delete_allowed` | boolean | No | No | — |
555
- | `created_at` | string (date-time) | No | No | — |
734
+
735
+
736
+ | Property | Type | Description |
737
+ | --- | --- | --- |
738
+ | `id` | string | Example: `"6401df46d6a6b0c692d9ec49"`. |
739
+ | `name` | string | Example: `"JS"`. |
740
+ | `roles` | Array<string> | Example: `["owner"]`. |
741
+ | `is_delete_allowed` | boolean | Example: `true`. |
742
+ | `created_at` | string (format: date-time) | Example: `"2023-03-03T11:51:34Z"`. |
556
743
 
557
744
  ### AuthSession
558
745
 
559
746
  A JWT access token plus the authenticated user and the accounts they belong to.
560
747
 
561
- | Property | Type | Required | Nullable | Constraints / description |
562
- | --- | --- | --- | --- | --- |
563
- | `access_token` | string | No | No | — |
564
- | `user` | [`AuthUser`](#authuser) | No | No | — |
565
- | `accounts` | Array<[`AuthAccount`](#authaccount)> | No | No | — |
748
+ | Property | Type | Description |
749
+ | --- | --- | --- |
750
+ | `access_token` | string | Example: `"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."`. |
751
+ | `user` | [`AuthUser`](#authuser) | |
752
+ | `accounts` | Array<[`AuthAccount`](#authaccount)> | |
566
753
 
567
754
  ### AuthUser
568
755
 
569
- | Property | Type | Required | Nullable | Constraints / description |
570
- | --- | --- | --- | --- | --- |
571
- | `id` | string | No | No | — |
572
- | `name` | string | No | No | — |
573
- | `email` | string (email) | No | No | — |
574
- | `telephone` | string | No | Yes | — |
575
- | `government_id` | string | No | Yes | — |
576
- | `is_email_verified` | boolean | No | No | — |
577
- | `has_accepted_terms` | boolean | No | No | — |
578
- | `created_at` | string (date-time) | No | No | — |
579
- | `to_be_deleted_at` | string (date-time) | No | Yes | — |
756
+
757
+
758
+ | Property | Type | Description |
759
+ | --- | --- | --- |
760
+ | `id` | string | Example: `"bgjazeo5r9v2lq7l36dx48np"`. |
761
+ | `name` | string | Example: `"John Smith"`. |
762
+ | `email` | string (format: email) | Example: `"signer@example.com"`. |
763
+ | `telephone` | string or null | Example: `"17989206641"`. |
764
+ | `government_id` | string or null | Example: `"15774136604"`. |
765
+ | `is_email_verified` | boolean | Example: `false`. |
766
+ | `has_accepted_terms` | boolean | Example: `true`. |
767
+ | `created_at` | string (format: date-time) | Example: `"2023-03-03T11:51:34Z"`. |
768
+ | `to_be_deleted_at` | string or null (format: date-time) | Example: `null`. |
769
+
770
+ ### Balance
771
+
772
+ A document or credit balance for the current billing cycle.
773
+
774
+ | Property | Type | Description |
775
+ | --- | --- | --- |
776
+ | `balance` | number or null | Remaining quantity; null for unlimited. Example: `100`. |
777
+ | `limit` | number or null | Allowance per cycle/pool; null when not cycle-limited or unlimited. Example: `100`. |
778
+ | `spent` | number | Quantity consumed in the current cycle. Example: `0`. |
580
779
 
581
780
  ### CostEstimate
582
781
 
583
- Cost breakdown for an assignment plus current account balances.
782
+ 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.
584
783
 
585
- | Property | Type | Required | Nullable | Constraints / description |
586
- | --- | --- | --- | --- | --- |
587
- | `documents` | integer | No | No | Documents consumed (always 1). |
588
- | `credits` | number | No | No | Total notification credits needed. |
589
- | `needs_extra_document` | boolean | No | No | True when the plan's document allowance is exhausted and an extra document will be charged from credits. |
590
- | `extra_document_cost` | number | No | No | Credits charged for the extra document when `needs_extra_document` is true. |
591
- | `total_credits` | number | No | No | — |
592
- | `breakdown` | Array<[`CostEstimateBreakdownItem`](#costestimatebreakdownitem)> | No | No | — |
593
- | `document_balance` | number | No | No | — |
594
- | `credit_balance` | number | No | No | — |
595
- | `has_sufficient_resources` | boolean | No | No | — |
596
- | `blocking_reason` | string | No | Yes | enum: `["PendingPayment", "InsufficientDocuments", "InsufficientCredits"]` |
597
- | `message` | string | No | Yes | — |
784
+ | Property | Type | Description |
785
+ | --- | --- | --- |
786
+ | `documents` * | integer | Documents consumed: 1, for an assignment as for an envelope, whatever its documents. Example: `1`. |
787
+ | `credits` * | number | Sum of the `breakdown` costs: notifications, digital-certificate signatures and identity checks. Does not include the extra document. Example: `0.9`. |
788
+ | `needs_extra_document` * | boolean | True when the plan's document allowance is exhausted and an extra document will be charged from credits. Example: `true`. |
789
+ | `extra_document_cost` * | number | Credits for one extra document. Charged only when `needs_extra_document` is true. Example: `1`. |
790
+ | `total_credits` * | number | Credits the send will consume: `credits`, plus `extra_document_cost` when `needs_extra_document` is true. Example: `1.9`. |
791
+ | `breakdown` * | Array<[`CostEstimateBreakdownItem`](#costestimatebreakdownitem)> | |
792
+ | `document_balance` * | number or null | Documents left in the plan. `null` when the account's documents are not limited. Example: `0`. |
793
+ | `credit_balance` * | number or null | Credits available. `null` when the account's credits are not limited. Example: `10`. |
794
+ | `has_sufficient_resources` * | boolean | 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`. Example: `true`. |
795
+ | `blocking_reason` * | string or null (`"PendingPayment"`, `"InsufficientDocuments"`, `"InsufficientCredits"`) | Example: `null`. |
796
+ | `message` * | string or null | |
598
797
 
599
798
  ### CostEstimateBreakdownItem
600
799
 
601
- | Property | Type | Required | Nullable | Constraints / description |
602
- | --- | --- | --- | --- | --- |
603
- | `code` | string | No | No | — |
604
- | `name` | string | No | No | — |
605
- | `cost` | number | No | No | — |
606
- | `quantity` | integer | No | No | — |
607
- | `unit_cost` | number | No | No | — |
800
+
801
+
802
+ | Property | Type | Description |
803
+ | --- | --- | --- |
804
+ | `code` | string | Example: `"NotificationWhatsapp"`. |
805
+ | `name` | string | Example: `"Whatsapp Notification"`. |
806
+ | `cost` | number | Example: `0.9`. |
807
+ | `quantity` | integer | Example: `2`. |
808
+ | `unit_cost` | number | Example: `0.45`. |
608
809
 
609
810
  ### DisplaySettings
610
811
 
611
812
  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.
612
813
 
613
- | Property | Type | Required | Nullable | Constraints / description |
614
- | --- | --- | --- | --- | --- |
615
- | `left` | number (float) | Yes | No | minimum: `0`; Horizontal distance from the page's left edge, in page-image pixels. |
616
- | `top` | number (float) | Yes | No | minimum: `0`; Vertical distance from the page's top edge, in page-image pixels. |
617
- | `width` | number (float) | Yes | No | minimum: `0`; Width of the placement rectangle, in page-image pixels. |
618
- | `height` | number (float) | Yes | No | minimum: `0`; Height of the placement rectangle, in page-image pixels. |
619
- | `fontFamily` | string | No | No | Font-family presentation metadata. |
620
- | `fontSize` | number (float) | Yes | No | minimum: `0`; Font size in the 150-DPI page-image coordinate system. |
621
- | `backgroundColor` | string | No | No | CSS-compatible background-color presentation metadata. |
814
+ | Property | Type | Description |
815
+ | --- | --- | --- |
816
+ | `left` * | number (format: float) (min: 0) | Horizontal distance from the page's left edge, in page-image pixels. Example: `69`. |
817
+ | `top` * | number (format: float) (min: 0) | Vertical distance from the page's top edge, in page-image pixels. Example: `282`. |
818
+ | `width` * | number (format: float) | Width of the placement rectangle, in page-image pixels. Example: `421`. |
819
+ | `height` * | number (format: float) | Height of the placement rectangle, in page-image pixels. Example: `45.86`. |
820
+ | `fontFamily` | string | Font-family presentation metadata. Example: `"Arial"`. |
821
+ | `fontSize` * | number (format: float) | Font size in the 150-DPI page-image coordinate system. Example: `22`. |
822
+ | `backgroundColor` | string | CSS-compatible background-color presentation metadata. Example: `"#D5EBFF"`. |
622
823
 
623
824
  ### Document
624
825
 
625
826
  A document and its current lifecycle state.
626
827
 
627
- | Property | Type | Required | Nullable | Constraints / description |
628
- | --- | --- | --- | --- | --- |
629
- | `resource` | string | No | No | Present in single-resource responses. |
630
- | `id` | string | No | No | — |
631
- | `account_id` | string | No | No | — |
632
- | `template_id` | string | No | Yes | — |
633
- | `name` | string | No | No | — |
634
- | `status` | string | No | No | Status code — see GET /v1/documents/statuses. |
635
- | `artifacts` | object | No | No | Artifact download URLs keyed by name. Always `original`, plus `thumbnail` once one exists. A certificated document also carries `certificated`, `certificate-page` and `bundle`, and `pades` when it was signed with a digital certificate — the PAdES version holds the signers' ICP-Brasil signatures, which certification flattens out of the certificated PDF. |
636
- | `is_closed` | boolean | No | No | — |
637
- | `signing_url` | string | No | No | — |
638
- | `verification_code` | string | No | Yes | Code printed on the certificate page; null until certificated. |
639
- | `verification_url` | string (uri) | No | Yes | Public verification page; null until certificated. |
640
- | `decline_reason` | string | No | Yes | — |
641
- | `declined_by` | any JSON value | No | Yes | — |
642
- | `tags` | Array<object> | No | No | — |
643
- | `tags[].id` | string | No | No | — |
644
- | `tags[].name` | string | No | No | — |
645
- | `assignment` | object | No | Yes | Included by list/details/signer-list/template-generation responses; search and upload omit it. Only rename follows `?expand=assignment`. |
646
- | `assignment.resource` | string | No | No | — |
647
- | `assignment.id` | string | No | No | — |
648
- | `assignment.sender_email` | string (email) | No | No | — |
649
- | `assignment.method` | string | No | No | enum: `["virtual", "collect"]` |
650
- | `assignment.expires_at` | string (date-time) | No | Yes | — |
651
- | `assignment.message` | string | No | Yes | — |
652
- | `assignment.signers` | Array<[`AssignmentSigner`](#assignmentsigner)> | No | No | — |
653
- | `assignment.copy_receivers` | Array<object> | No | No | — |
654
- | `assignment.items` | Array<[`AssignmentItem`](#assignmentitem)> | No | No | — |
655
- | `assignment.summary` | [`AssignmentSummary`](#assignmentsummary) | No | No | — |
656
- | `assignment.signing_urls` | Array<[`SigningUrl`](#signingurl)> | No | No | — |
657
- | `pages` | Array<[`DocumentPage`](#documentpage)> | No | No | — |
658
- | `has_contract` | boolean | No | No | Only on workspace `GET /documents/{documentId}` when contract tracking is available. A missing key means unknown. |
659
- | `created_at` | string (date-time) | No | No | — |
660
- | `updated_at` | string (date-time) | No | No | — |
828
+ | Property | Type | Description |
829
+ | --- | --- | --- |
830
+ | `resource` | string | Present in single-resource responses. Example: `"document"`. |
831
+ | `id` | string | Example: `"615601fab04c0a3147bb1246"`. |
832
+ | `account_id` | string | Example: `"d199996981dbd199996981db"`. |
833
+ | `template_id` | string or null | Example: `null`. |
834
+ | `name` | string | Example: `"document.pdf"`. |
835
+ | `status` | string | Status code — see GET /v1/documents/statuses. Example: `"metadata_ready"`. |
836
+ | `artifacts` | object | Artifact download URLs keyed by name. Always `original`, plus `thumbnail` once one exists. A certificated document also carries `certificated`, `certificate-page` and `bundle`, and `pades` when it was signed with a digital certificate — the PAdES version holds the signers' ICP-Brasil signatures, which certification flattens out of the certificated PDF. Example: `{"original":"https://api.assinafy.com.br/v1/documents/doc1/download/original"}`. |
837
+ | `is_closed` | boolean | Example: `false`. |
838
+ | `signing_url` | string | Example: `"https://api.assinafy.com.br/v1/sign/doc1"`. |
839
+ | `verification_code` | string or null | The code printed on the certificate page. Anyone can check it with `GET /v1/documents/{verification_code}/verify` or on `verification_url`. `null` until the document is `certificated`, and on documents certificated before verification codes existed. Example: `"a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f"`. |
840
+ | `verification_url` | string or null (format: uri) | The public verification page for this document. `null` until the document is `certificated`. Example: `"https://www.assinafy.com.br/verificador/a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f"`. |
841
+ | `decline_reason` | string or null | Example: `null`. |
842
+ | `declined_by` | [`Signer`](#signer) or null | |
843
+ | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | The workspace's labels on the document. Always empty when the signer reads it with their code.
844
+ | `tags[].id` | string | |
845
+ | `tags[].name` | string | |
846
+ | `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
847
+ | `assignment` | [`Assignment`](#assignment) or null | The document's assignment, or `null` before one is created. The server decides when it is included, whatever `expand` the request sends: the document list, `GET /v1/documents/{documentId}`, the signer's document list and document creation from a template always include it; `/documents/search` and the upload response never do. Only the rename response follows `?expand=assignment`. |
848
+ | `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
849
+ | `envelope_id` | string or null | Only on `GET /v1/documents/{documentId}?expand=envelope_id` read by the workspace, not in document lists or webhooks, so their payloads keep their shape: the envelope this document is in, or `null` for a document sent on its own, taken out of its envelope, or whose envelope was deleted. Example: `null`. |
850
+ | `envelope` | object { `id*`: string; `name*`: string } | Only on `GET /v1/documents/{documentId}?expand=envelope` read by the workspace and `GET /v1/sign?expand=envelope` or `GET /v1/signers/{signerId}/document?expand=envelope` read with the signer's code, not in document lists or webhooks: the envelope this document is in, or `null` for a document sent on its own, taken out of its envelope, or whose envelope was deleted. The signer's reads name the envelope their code belongs to even when the code's own document was taken out, since the code still reaches the rest. |
851
+ | `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
852
+ | `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
853
+ | `has_contract` | boolean | Only on `GET /v1/documents/{documentId}` read by the workspace, while the environment has contract tracking on: not with a signer's access code, not in document lists or webhooks, and left out when the lookup fails, so a missing key means unknown. Whether `GET /v1/accounts/{accountId}/documents/{documentId}/contract` answers with contract terms, the document's own or those of a contract it amends whose document still exists, so a page can lay out the contract section before reading it. Example: `true`. |
854
+ | `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
855
+ | `updated_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
661
856
 
662
857
  ### DocumentActivity
663
858
 
664
859
  A document activity event.
665
860
 
666
- | Property | Type | Required | Nullable | Constraints / description |
667
- | --- | --- | --- | --- | --- |
668
- | `id` | integer | No | No | — |
669
- | `event` | string | No | No | Event type code. |
670
- | `message` | string | No | No | — |
671
- | `payload` | object | No | Yes | Event-specific payload snapshot. Keys vary per event. |
672
- | `origin` | object | No | Yes | Request origin when available. |
673
- | `origin.ip` | string | No | No | — |
674
- | `origin.user-agent` | string | No | No | — |
675
- | `created_at` | string (date-time) | No | No | — |
861
+ | Property | Type | Description |
862
+ | --- | --- | --- |
863
+ | `id` | integer | Example: `4`. |
864
+ | `event` | string | Event type code. Example: `"assignment_created"`. |
865
+ | `message` | string | Example: `"Assignment created by John Smith."`. |
866
+ | `payload` | object or array or null | `[]` for the events that record nothing (`document_uploaded`, `document_metadata_ready`, `document_prepared`). Otherwise an event-specific snapshot taken when the event happened, with the same keys as the webhook of that event (see **Webhook Payloads**). The common ones: `user_name` (`assignment_created`, `user_rejected_document`); `signer_full_name` (every `signer_*` event and `signature_requested`); `signer_email`, `signer_whatsapp_phone_number` and `notification_method` (`signature_requested`); `reviewer_name` (identity review decisions); `error_message` (`document_processing_failed`). `message` already carries the actor's name, translated, so clients can show it as is. A `*_at` key inside the payload is returned as an ISO 8601 string here, as in every API response, but as a Unix integer in webhook bodies. |
867
+ | `origin` | object { `ip`: string or null; `user-agent`: string } | Request origin when available. |
868
+ | `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
869
+ | `origin.user-agent` | string | |
870
+ | `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
676
871
 
677
872
  ### DocumentContract
678
873
 
679
- Contract terms tracked on a document. The single-contract and related-family reads can include amendments; the
680
- workspace list can include the document when `expand=document` is requested.
874
+ The contract terms tracked on a document. Every key below is always present, `null` when it holds no value, except `resource`, `document` and `amendments`, which depend on the response.
681
875
 
682
- | Property | Type | Required | Nullable | Constraints / description |
683
- | --- | --- | --- | --- | --- |
684
- | `resource` | string | No | No | `document_contract` in single-resource responses. |
685
- | `document_id` | string | No | No | Document that owns the terms. |
686
- | `status` | string | No | No | enum: `["draft", "active", "expired", "terminated"]` |
687
- | `counterparty_name` | string | No | Yes | — |
688
- | `counterparty_taxpayer_id` | string | No | Yes | Normalized CPF/CNPJ, digits only. |
689
- | `value` | number | No | Yes | At most two decimal places. |
690
- | `currency` | string | No | Yes | ISO 4217 code; defaults to BRL when a value is set. |
691
- | `start_date` | string (date) | No | Yes | — |
692
- | `end_date` | string (date) | No | Yes | — |
693
- | `auto_renew` | boolean | No | No | — |
694
- | `renewal_term_months` | integer | No | Yes | — |
695
- | `notice_period_days` | integer | No | Yes | — |
696
- | `term` | integer | No | No | Renewal term number, starting at 1. |
697
- | `owner_id` | string | No | Yes | Active workspace member responsible for lifecycle email. |
698
- | `metadata` | object | No | Yes | Up to 50 caller-defined string values. |
699
- | `external_references` | Array<object> | No | No | IDs in outside systems, sorted by system and ID. |
700
- | `external_references[].system` | string | No | No | Outside system name. |
701
- | `external_references[].id` | string | No | No | ID in that system. |
702
- | `document` | [`Document`](#document) | No | No | Only on list results with `expand=document`. |
703
- | `amendments` | Array<[`DocumentContractAmendment`](#documentcontractamendment)> | No | No | Only on single-contract/family reads. |
704
- | `created_at` | string (date-time) | No | No | — |
705
- | `updated_at` | string (date-time) | No | No | Moves on every direct or lifecycle change. |
876
+ | Property | Type | Description |
877
+ | --- | --- | --- |
878
+ | `resource` | string | On a response that is this contract alone; list items carry none. Example: `"document_contract"`. |
879
+ | `document_id` * | string | Example: `"66b2f0e1c3a4d5e6f7a8b9c0"`. |
880
+ | `status` * | string (`"draft"`, `"active"`, `"expired"`, `"terminated"`) | Example: `"active"`. |
881
+ | `counterparty_name` * | string or null | Example: `"Acme Ltda"`. |
882
+ | `counterparty_taxpayer_id` * | string or null | CPF or CNPJ, digits only. Example: `"11222333000181"`. |
883
+ | `value` * | number or null | Two decimal places at most. Example: `120000.5`. |
884
+ | `currency` * | string or null | ISO 4217 code; `BRL` when a value is sent without one. Example: `"BRL"`. |
885
+ | `start_date` * | string or null (format: date) | Example: `"2026-11-01"`. |
886
+ | `end_date` * | string or null (format: date) | Example: `"2027-10-31"`. |
887
+ | `auto_renew` * | boolean | Example: `true`. |
888
+ | `renewal_term_months` * | integer or null | Example: `12`. |
889
+ | `notice_period_days` * | integer or null | Example: `30`. |
890
+ | `term` * | integer | Steps on every renewal, starting at 1. Example: `1`. |
891
+ | `owner_id` * | string or null | ID of the workspace member who owns the contract. When the owner is no longer a member of the workspace (removed, left, or deleted with their account), the hourly run hands the contract to the first owner who is still an active member, or leaves it without one; an inactive member stays the owner. The contract's e-mails (renewal notice, expiring, expired, renewed) go to the first of the owner and the document's creator who is an active member, as that member's notification preferences allow. Example: `"d6zqpbyog2v3xvxerwn8la94"`. |
892
+ | `metadata` * | object or null; additional values: string | Up to 50 keys of your own, each holding text of at most 500 characters; `null` when there are none. Values come back exactly as sent. A key ending in `_at`, or `stuck_since`, cannot hold a number. Example: `{"crm_stage":"won"}`. |
893
+ | `external_references` * | Array<object { `system*`: string; `id*`: string }> | IDs outside systems use for this contract, ordered by system and id; `[]` when there are none. |
894
+ | `external_references[].system` * | string | Example: `"hubspot"`. |
895
+ | `external_references[].id` * | string | Example: `"98765"`. |
896
+ | `document` | [`Document`](#document) | Only with `expand=document`: the document the terms are tracked on. |
897
+ | `amendments` | Array<[`DocumentContractAmendment`](#documentcontractamendment)> | Only on the contract read and the related read (`GET …/contract`, `GET …/contract/related`), never on the list or on the answer to a write, renewal or termination: the documents that amend, renew or terminate this contract, the applied ones first by `number`, then the pending ones. |
898
+ | `created_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
899
+ | `updated_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
706
900
 
707
901
  ### DocumentContractAmendment
708
902
 
709
- A document linked as an amendment, renewal, or termination instrument. Its terms are a delta applied to the
710
- parent after this document is certificated.
903
+ A document that amends, renews or terminates a contract: its link and the terms it changes. The parent's terms take the delta once this document is certificated; until then the parent is untouched. Every key below is always present, `null` when it holds no value, except `resource`.
711
904
 
712
- | Property | Type | Required | Nullable | Constraints / description |
713
- | --- | --- | --- | --- | --- |
714
- | `resource` | string | No | No | `document_contract_amendment` in single-resource responses. |
715
- | `document_id` | string | No | No | The instrument document. |
716
- | `document_name` | string | No | No | Instrument document name. |
717
- | `parent_document_id` | string | No | No | Root contract document. |
718
- | `relation_type` | string | No | No | enum: `["amendment", "renewal", "termination"]` |
719
- | `number` | integer | No | Yes | Applied position; null while pending. |
720
- | `status` | string | No | No | enum: `["pending", "applied"]` |
721
- | `document_status` | string | No | No | Current lifecycle status of the instrument document. |
722
- | `apply_error` | string | No | Yes | Why a signed instrument has not applied yet. |
723
- | `currency` | string | No | Yes | Currency used by amount values in `terms` and `changes`. |
724
- | `terms` | object | No | Yes | Only contract terms changed by this instrument. |
725
- | `changes` | object | No | Yes | Changed fields as `{ from:, to: }`, previewed while pending and fixed once applied. |
726
- | `applied_at` | string (date-time) | No | Yes | — |
727
- | `created_at` | string (date-time) | No | No | — |
728
- | `updated_at` | string (date-time) | No | No | — |
905
+ | Property | Type | Description |
906
+ | --- | --- | --- |
907
+ | `resource` | string | On a response that is this amendment alone; the entries of a contract's `amendments` carry none. Example: `"document_contract_amendment"`. |
908
+ | `document_id` * | string | This document, the instrument. Example: `"7c3d1e2f4a5b6c7d8e9f0a1b"`. |
909
+ | `document_name` * | string | This document's name. Example: `"Aditivo 1 - Contrato de prestação de serviços.pdf"`. |
910
+ | `parent_document_id` * | string | The contract document whose terms change. Example: `"66b2f0e1c3a4d5e6f7a8b9c0"`. |
911
+ | `relation_type` * | string (`"amendment"`, `"renewal"`, `"termination"`) | Example: `"amendment"`. |
912
+ | `number` * | integer or null | Position among the parent's applied amendments by signing date; `null` while pending. Example: `1`. |
913
+ | `status` * | string (`"pending"`, `"applied"`) | `applied` once the delta moved the parent's terms. Example: `"pending"`. |
914
+ | `document_status` * | string | This document's own status, so a declined, cancelled or expired instrument shows as such. An instrument applies only while its document is `certificated`: one whose document reads `failed` after it was signed waits, with no `apply_error`, until it is certificated again, and then applies in its place in the signing order. Example: `"pending_signature"`. |
915
+ | `apply_error` * | string or null | Why a signed instrument has not applied yet, retried every hour: the workspace's plan does not include contract tracking (it applies on the first run after the plan returns), the parent would not take the delta, an instrument signed before this one has not applied yet, one signed after it has already applied (this one then stays blocked: unlink it, and record what it still changes on a new instrument), or an unexpected failure. |
916
+ | `currency` * | string or null | The currency of the amounts in `terms` and `changes`. Once applied, the contract's currency at that moment, kept whatever the contract moves to later. While pending (and for an instrument applied before this was kept), the one this instrument moves the contract to, otherwise the contract's. `null` when neither has one. Example: `"BRL"`. |
917
+ | `terms` * | object or null | The delta: only the terms this instrument changes; `null` when it changes none (a termination on the day it is signed). Example: `{"value":130000,"end_date":"2028-06-30"}`. |
918
+ | `changes` * | object or null | Every parent field the roll-up moves, as `{from, to}`: a preview while pending, the record once applied; `null` when it moves none. Example: `{"value":{"from":120000.5,"to":130000},"end_date":{"from":"2027-10-31","to":"2028-06-30"},"term":{"from":1,"to":2}}`. |
919
+ | `applied_at` * | string or null (format: date-time) | |
920
+ | `created_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
921
+ | `updated_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
729
922
 
730
923
  ### DocumentContractInput
731
924
 
732
- Partial body for setting terms or linking an instrument. Only sent fields change. JSON null clears a nullable
733
- term; for a pending instrument it removes that term from the delta. `external_references` replaces the whole list.
925
+ Every attribute is optional and only the ones sent change. `null` clears an attribute, except `auto_renew` (back to `false`) and `currency` (back to `BRL` while a `value` is set); `status` does not accept `null`. A changed `end_date` starts a new `term`.
734
926
 
735
- | Property | Type | Required | Nullable | Constraints / description |
736
- | --- | --- | --- | --- | --- |
737
- | `status` | string | No | No | enum: `["draft", "active", "expired", "terminated"]`; closed statuses are creation-only. |
738
- | `counterparty_name` | string | No | Yes | Maximum 255 characters. |
739
- | `counterparty_taxpayer_id` | string | No | Yes | Valid formatted or unformatted CPF/CNPJ. |
740
- | `value` | number | No | Yes | 0–9,999,999,999,999.99; at most two decimal places. |
741
- | `currency` | string | No | Yes | Three-letter code, stored uppercase. |
742
- | `start_date` | string (date) | No | Yes | `YYYY-MM-DD`, year 1000 or later. |
743
- | `end_date` | string (date) | No | Yes | On or after `start_date`. |
744
- | `auto_renew` | boolean | No | Yes | Null resets to false. |
745
- | `renewal_term_months` | integer | No | Yes | 1–600; defaults to 12 when unset. |
746
- | `notice_period_days` | integer | No | Yes | 0–3650. |
747
- | `owner_id` | string | No | Yes | Active member of the workspace. |
748
- | `metadata` | object | No | Yes | Up to 50 keys of 1–40 letters, digits, `_`, `-`, or `.`, each holding at most 500 characters. |
749
- | `external_references` | Array<object> | No | Yes | At most 20; null or an empty array clears the list. |
750
- | `external_references[].system` | string | Yes | No | Up to 64 letters, digits, `_`, `-`, or `.`; stored lowercase. |
751
- | `external_references[].id` | string | Yes | No | Up to 255 characters. |
752
- | `parent_document_id` | string | No | Yes | Links to a contract family; null unlinks a pending instrument. |
753
- | `relation_type` | string | No | No | Required for the first link; enum: `["amendment", "renewal", "termination"]`. |
754
- | `updated_at` | string (date-time) | No | Yes | Optional optimistic-lock value; a stale value returns `409`. Null is last-write-wins. |
927
+ | Property | Type | Description |
928
+ | --- | --- | --- |
929
+ | `status` | string (`"draft"`, `"active"`, `"expired"`, `"terminated"`) | On creation any status, so a contract that ended before it was tracked is registered as it ended: `expired` needs an `end_date` in the past, `terminated` its `end_date`; neither is walked by the lifecycle. Afterwards only `draft` or `active` (a contract in force never goes back to `draft`): `expired` and `terminated` are set by the lifecycle and the terminate endpoint; a closed contract is reopened by renewing it. |
930
+ | `counterparty_name` | string or null (max length: 255) | Emoji are kept; other characters outside the 3-byte range are dropped. |
931
+ | `counterparty_taxpayer_id` | string or null | A valid CPF or CNPJ, formatted or not. |
932
+ | `value` | number or null (min: 0) (max: 9999999999999.99) | Two decimal places at most. |
933
+ | `currency` | string or null | Three letters, such as `BRL` or `USD`, stored in capitals; `BRL` when a `value` is set without one. Example: `"BRL"`. |
934
+ | `start_date` | string or null (format: date) | `YYYY-MM-DD`, from the year 1000. |
935
+ | `end_date` | string or null (format: date) | `YYYY-MM-DD`, on or after `start_date`. |
936
+ | `auto_renew` | boolean | Whether the hourly run starts the next term the day after `end_date`, by `renewal_term_months`, instead of expiring the contract. |
937
+ | `renewal_term_months` | integer or null (min: 1) (max: 600) | How far a renewal by the term moves `end_date`; 12 when unset. |
938
+ | `notice_period_days` | integer or null (min: 0) (max: 3650) | Days before `end_date` the notice period starts (`document_contract_renewal_notice`); none when unset. |
939
+ | `owner_id` | string or null | An active member of this workspace. |
940
+ | `metadata` | object or null; additional values: string (max length: 500) | Your own fields: up to 50 keys of 1 to 40 letters, digits, `_`, `-` or `.`, each holding plain text of at most 500 characters; no number under a key ending in `_at`, or `stuck_since`. |
941
+ | `external_references` | array or null (max items: 20) | Replaces the whole list; `[]` or `null` clears it. Two items whose `system` and `id` compare equal case aside are one reference (the first sent is kept); a pair the database takes for one beyond that (accents, `ß` and `ss`) answers `400`. |
942
+ | `parent_document_id` | string or null | Links the document as an amendment of this contract document, or of any document in its family (resolved to the root); `null` unlinks a pending amendment. With it, the other attributes are the terms the instrument changes, not terms of its own; on a pending amendment a `null` value drops that term from the delta rather than clearing it on the parent. |
943
+ | `relation_type` | string (`"amendment"`, `"renewal"`, `"termination"`) | Required on the first link. `amendment` may change `value`, `currency`, `start_date` (effective from, display only), `end_date`, `auto_renew`, `renewal_term_months`, `notice_period_days`, `counterparty_name`, `counterparty_taxpayer_id` and `metadata`; `renewal` only `end_date` and `value`; `termination` only `end_date` (the effective date). |
944
+ | `updated_at` | string (format: date-time) | Optional precondition: the `updated_at` the client read the contract (or this document's amendment link) with, as the API returned it. If the contract or link changed since, nothing is written and the answer is `409` with `code: ContractChanged`. Not sent, or `null`: the write applies whatever changed meanwhile (last write wins). Compared to the second; a fraction of a second, as a JavaScript date prints it, is read and ignored. New terms and a first link have nothing to have read, so sending one answers `409`; on a pending amendment, send the link's own `updated_at` (the GET on that document). Example: `"2026-10-23T12:00:00Z"`. |
945
+
946
+ ### DocumentEnvelope
947
+
948
+ Documents sent together to the same signers. Each document keeps its own assignment, status, certificate and downloads.
949
+
950
+ | Property | Type | Description |
951
+ | --- | --- | --- |
952
+ | `resource` | string | Present in single-resource responses. Example: `"envelope"`. |
953
+ | `id` * | string | Example: `"1a2f3c4d5e6f708192a3b4c5d6e"`. |
954
+ | `name` * | string | Example: `"Contrato de prestação de serviços"`. |
955
+ | `message` * | string or null | Example: `"Segue o contrato e seus anexos."`. |
956
+ | `documents` * | Array<object { `id*`: string; `position*`: integer (min: 1); `name*`: string; `status*`: string; `artifacts*`: object; additional values: string; `signers*`: Array<object { `id*`: string; `full_name*`: string; `email*`: string or null; `whatsapp_phone_number*`: string or null; `completed*`: boolean; `signed_at*`: string or null (format: date-time) }> }> | The envelope's documents, in the order it lists them. |
957
+ | `documents[].id` * | string | Example: `"615601fab04c0a3147bb1246"`. |
958
+ | `documents[].position` * | integer (min: 1) | The document's place in the envelope's order, from 1. Example: `1`. |
959
+ | `documents[].name` * | string | Example: `"contrato.pdf"`. |
960
+ | `documents[].status` * | string | Status code — see GET /v1/documents/statuses. Example: `"pending_signature"`. |
961
+ | `documents[].artifacts` * | object; additional values: string | 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. Example: `{"original":"https://api.assinafy.com.br/v1/documents/615601fab04c0a3147bb1246/download/original","thumbnail":"https://api.assinafy.com.br/v1/documents/615601fab04c0a3147bb1246/thumbnail"}`. |
962
+ | `documents[].signers` * | Array<object { `id*`: string; `full_name*`: string; `email*`: string or null; `whatsapp_phone_number*`: string or null; `completed*`: boolean; `signed_at*`: string or null (format: date-time) }> | The document's signers: a signer appears only on the documents they are on. |
963
+ | `documents[].signers[].id` * | string | Example: `"fa8c140cb49b79f940aab95fddd"`. |
964
+ | `documents[].signers[].full_name` * | string | Example: `"Ana Souza"`. |
965
+ | `documents[].signers[].email` * | string or null | Example: `"signer@example.com"`. |
966
+ | `documents[].signers[].whatsapp_phone_number` * | string or null | Example: `"+5548999990001"`. |
967
+ | `documents[].signers[].completed` * | boolean | Whether they have signed this document. Example: `false`. |
968
+ | `documents[].signers[].signed_at` * | string or null (format: date-time) | When they signed this document; `null` until they do. Example: `"2026-11-06T14:30:00Z"`. |
969
+ | `counts` * | object or null; additional values: integer | 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. Example: `{"certificated":1,"pending_signature":2}`. |
970
+ | `signing_urls` * | Array<[`SigningUrl`](#signingurl)> | 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). |
971
+ | `created_at` * | string (format: date-time) | Example: `"2026-11-04T12:00:00Z"`. |
755
972
 
756
973
  ### DocumentPage
757
974
 
758
- | Property | Type | Required | Nullable | Constraints / description |
759
- | --- | --- | --- | --- | --- |
760
- | `id` | string | No | No | — |
761
- | `number` | integer | No | No | — |
762
- | `height` | integer | No | No | — |
763
- | `width` | integer | No | No | — |
764
- | `download_url` | string | No | No | — |
975
+
976
+
977
+ | Property | Type | Description |
978
+ | --- | --- | --- |
979
+ | `id` | string | Example: `"615601faf166d6d1d8e7dc30"`. |
980
+ | `number` | integer | Example: `1`. |
981
+ | `height` | integer | Example: `2100`. |
982
+ | `width` | integer | Example: `1275`. |
983
+ | `download_url` | string | Example: `"https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"`. |
765
984
 
766
985
  ### DocumentStatsRow
767
986
 
768
987
  One period of the document-funnel KPI series. `period` is `YYYY-MM` (monthly) or `YYYY-MM-DD` (daily); series are zero-filled, no gaps. Signature requests come with two independent breakdowns: the `signature_requests_notification_*` counters split them by the channels the signer was notified on — a signer reached on more than one channel counts once per channel, so these add up to at least `signature_requests` — while the `signature_requests_verification_*` counters split them by how the signer's identity is verified, and since each request has exactly one verification method those four always add up to `signature_requests`.
769
988
 
770
- | Property | Type | Required | Nullable | Constraints / description |
771
- | --- | --- | --- | --- | --- |
772
- | `period` | string | No | No | `YYYY-MM` (monthly) or `YYYY-MM-DD` (daily). |
773
- | `documents_uploaded` | integer | No | No | — |
774
- | `documents_sent` | integer | No | No | — |
775
- | `signature_requests` | integer | No | No | — |
776
- | `signature_requests_notification_email` | integer | No | No | Requests notified by e-mail. |
777
- | `signature_requests_notification_whatsapp` | integer | No | No | Requests notified by WhatsApp. |
778
- | `signature_requests_notification_bypass` | integer | No | No | Requests with no notification sent (`Bypass`). |
779
- | `signature_requests_verification_email` | integer | No | No | Requests verified by an e-mail token. |
780
- | `signature_requests_verification_whatsapp` | integer | No | No | Requests verified by a WhatsApp token. |
781
- | `signature_requests_verification_bypass` | integer | No | No | Requests signed without token verification (`Bypass`). |
782
- | `signature_requests_verification_digital_certificate` | integer | No | No | Requests signed with the signer's own ICP-Brasil digital certificate. |
783
- | `signature_requests_viewed` | integer | No | No | Signature requests whose document was first viewed during the period. |
784
- | `signature_requests_completed` | integer | No | No | Signature requests completed by individual signers during the period. |
785
- | `documents_certified` | integer | No | No | — |
989
+ | Property | Type | Description |
990
+ | --- | --- | --- |
991
+ | `period` | string | `YYYY-MM` (monthly) or `YYYY-MM-DD` (daily). Example: `"2026-06"`. |
992
+ | `documents_uploaded` | integer | Example: `42`. |
993
+ | `documents_sent` | integer | Example: `37`. |
994
+ | `signature_requests` | integer | Example: `61`. |
995
+ | `signature_requests_notification_email` | integer | Requests notified by e-mail. Example: `55`. |
996
+ | `signature_requests_notification_whatsapp` | integer | Requests notified by WhatsApp. Example: `18`. |
997
+ | `signature_requests_notification_bypass` | integer | Requests with no notification sent (`Bypass`). Example: `3`. |
998
+ | `signature_requests_verification_email` | integer | Requests verified by an e-mail token. Example: `48`. |
999
+ | `signature_requests_verification_whatsapp` | integer | Requests verified by a WhatsApp token. Example: `6`. |
1000
+ | `signature_requests_verification_bypass` | integer | Requests signed without token verification (`Bypass`). Example: `3`. |
1001
+ | `signature_requests_verification_digital_certificate` | integer | Requests signed with the signer's own ICP-Brasil digital certificate. Example: `4`. |
1002
+ | `signature_requests_viewed` | integer | Signature requests whose document was first viewed during the period. Example: `44`. |
1003
+ | `signature_requests_completed` | integer | Signature requests completed by individual signers during the period. Example: `52`. |
1004
+ | `documents_certified` | integer | Example: `30`. |
786
1005
 
787
1006
  ### DocumentStatus
788
1007
 
789
- | Property | Type | Required | Nullable | Constraints / description |
790
- | --- | --- | --- | --- | --- |
791
- | `code` | string | No | No | — |
792
- | `deletable` | boolean | No | No | — |
1008
+
1009
+
1010
+ | Property | Type | Description |
1011
+ | --- | --- | --- |
1012
+ | `code` | string | Example: `"metadata_ready"`. |
1013
+ | `deletable` | boolean | Example: `true`. |
793
1014
 
794
1015
  ### DocumentVerification
795
1016
 
796
1017
  The verification result for a document looked up by signature hash. When not verified, most fields are null and `is_valid` is false.
797
1018
 
798
- | Property | Type | Required | Nullable | Constraints / description |
799
- | --- | --- | --- | --- | --- |
800
- | `hash` | string | No | No | — |
801
- | `id` | string | No | Yes | — |
802
- | `agreement_code` | string | No | Yes | Agreement code printed on the document certificate. |
803
- | `status` | string | No | Yes | — |
804
- | `page_count` | string | No | Yes | — |
805
- | `signer_count` | string | No | Yes | — |
806
- | `completed_count` | integer | No | Yes | — |
807
- | `completed_at` | string (date-time) | No | Yes | — |
808
- | `verified_at` | string (date-time) | No | No | — |
809
- | `is_valid` | boolean | No | No | — |
810
- | `message` | string | No | No | Reason when not valid. |
1019
+ | Property | Type | Description |
1020
+ | --- | --- | --- |
1021
+ | `hash` | string | Example: `"FE32EDDADE7CBDDCBB934E7402047450B0E59C02"`. |
1022
+ | `id` | string or null | Example: `"63ddb172402799bfc991d10d"`. |
1023
+ | `agreement_code` | string or null | Agreement code printed on the document certificate. Example: `"550E8400-E29B-41D4-A716-446655440000"`. |
1024
+ | `status` | string or null | Example: `"certificated"`. |
1025
+ | `page_count` | string or null | Example: `"1"`. |
1026
+ | `signer_count` | string or null | Example: `"1"`. |
1027
+ | `completed_count` | integer or null | Example: `1`. |
1028
+ | `completed_at` | string or null (format: date-time) | When the last signature was made. Example: `"2023-01-27T19:27:44Z"`. |
1029
+ | `certificated_at` | string or null (format: date-time) | When certification was first recorded by the document_ready event. Null when no certification event is available, including some historical documents. Example: `"2023-01-27T19:27:45Z"`. |
1030
+ | `verified_at` | string (format: date-time) | When this check ran (the time of the request). It says nothing about when the document was signed or certified. Example: `"2023-01-27T19:27:46Z"`. |
1031
+ | `is_valid` | boolean | Example: `true`. |
1032
+ | `message` | string | Reason when not valid. Example: `""`. |
1033
+
1034
+ ### EmbedOrigin
1035
+
1036
+ An origin allowed to embed the workspace's signing pages.
1037
+
1038
+ | Property | Type | Description |
1039
+ | --- | --- | --- |
1040
+ | `id` | string | Embed origin ID. Example: `"6f1c2a9e0b"`. |
1041
+ | `origin` | string | Exact `scheme://host[:port]`. Example: `"https://app.example.com"`. |
1042
+ | `created_at` | string (format: date-time) | Example: `"2026-11-04T12:05:00Z"`. |
1043
+
1044
+ ### EmbedSession
1045
+
1046
+ A single-use embed session for an embedded signer.
1047
+
1048
+ | Property | Type | Description |
1049
+ | --- | --- | --- |
1050
+ | `url` | string | Load this URL in an iframe within 5 minutes. Opening it spends the token. Example: `"https://app.assinafy.com.br/embed/3f2c9a1e5b7d4c68a0e1f2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7"`. |
1051
+ | `expires_at` | string (format: date-time) | Example: `"2026-11-04T12:05:00Z"`. |
1052
+
1053
+ ### EmbedSessionExchange
1054
+
1055
+ What the embed page gets for a session token.
1056
+
1057
+ | Property | Type | Description |
1058
+ | --- | --- | --- |
1059
+ | `signer_access_code` | string | The signer's access code, used by the embed page only. |
1060
+ | `signer_id` | string | Example: `"6f1c2a9e0b"`. |
1061
+ | `document_id` | string | Example: `"5e0b1c2a9f"`. |
1062
+ | `verification_method` | string | Example: `"Email"`. |
1063
+ | `embed_origins` | Array<string> | Example: `["https://app.example.com"]`. |
811
1064
 
812
1065
  ### Envelope
813
1066
 
814
1067
  Standard success wrapper. Operations add their own `data`.
815
1068
 
816
- | Property | Type | Required | Nullable | Constraints / description |
817
- | --- | --- | --- | --- | --- |
818
- | `status` | integer | No | No | HTTP status code, mirrored in the body. |
819
- | `message` | string | No | No | Human-readable message; empty on success. |
1069
+ | Property | Type | Description |
1070
+ | --- | --- | --- |
1071
+ | `status` | integer | HTTP status code, mirrored in the body. Example: `200`. |
1072
+ | `message` | string | Human-readable message; empty on success. Example: `""`. |
1073
+
1074
+ ### EnvelopeActivity
1075
+
1076
+ A document activity of an envelope's trail, naming its document.
1077
+
1078
+ | Property | Type | Description |
1079
+ | --- | --- | --- |
1080
+ | `id` | integer | Example: `4`. |
1081
+ | `event` | string | Event type code. Example: `"assignment_created"`. |
1082
+ | `message` | string | Example: `"Assignment created by John Smith."`. |
1083
+ | `payload` | object or array or null | `[]` for the events that record nothing (`document_uploaded`, `document_metadata_ready`, `document_prepared`). Otherwise an event-specific snapshot taken when the event happened, with the same keys as the webhook of that event (see **Webhook Payloads**). The common ones: `user_name` (`assignment_created`, `user_rejected_document`); `signer_full_name` (every `signer_*` event and `signature_requested`); `signer_email`, `signer_whatsapp_phone_number` and `notification_method` (`signature_requested`); `reviewer_name` (identity review decisions); `error_message` (`document_processing_failed`). `message` already carries the actor's name, translated, so clients can show it as is. A `*_at` key inside the payload is returned as an ISO 8601 string here, as in every API response, but as a Unix integer in webhook bodies. |
1084
+ | `origin` | object { `ip`: string or null; `user-agent`: string } | Request origin when available. |
1085
+ | `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
1086
+ | `origin.user-agent` | string | |
1087
+ | `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
1088
+ | `document_id` | string | The document the activity is about. Example: `"fe1c140cb49b79f940aab95fddd"`. |
1089
+ | `document_name` | string | Example: `"Contrato.pdf"`. |
1090
+
1091
+ ### EnvelopeCreateRequest
1092
+
1093
+ An envelope as sent: on creation, and to estimate what creating it would cost.
1094
+
1095
+ | Property | Type | Description |
1096
+ | --- | --- | --- |
1097
+ | `name` * | string (min length: 1) (max length: 255) | What the invitation calls what is being signed, in place of a document's name. `<` is refused (`400`). Example: `"Contrato de prestação de serviços"`. |
1098
+ | `message` | string or null | Optional message sent to every signer; their invitation adds the names of the documents they are on. Example: `"Segue o contrato e seus anexos."`. |
1099
+ | `max_total_credits` | number (min: 0) | 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: `1.5`. |
1100
+ | `signers` * | Array<object { `id*`: string (min length: 1); `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)> (max items: 1); `embedded`: boolean }> (min items: 1) (max items: 20) | Every signer of the envelope, once, by id: up to 20. They all sign at once: an envelope takes no `step`. |
1101
+ | `signers[].id` * | string (min length: 1) | An existing signer's ID. Example: `"fa8c140cb49b79f940aab95fddd"`. |
1102
+ | `signers[].verification_method` | string (`"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. Example: `"Email"`. |
1103
+ | `signers[].notification_methods` | Array<string (`"Email"`, `"Whatsapp"`)> (max items: 1) | As on an assignment: one method, inferred from `verification_method` when left out. Example: `["Email"]`. |
1104
+ | `signers[].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. |
1105
+ | `documents` * | Array<[`EnvelopeDocumentRequest`](#envelopedocumentrequest)> (min items: 1) (max items: 20) | The documents, in the order the envelope lists them: up to 20. |
1106
+
1107
+ ### EnvelopeDocumentRequest
1108
+
1109
+ A document of an envelope, as sent on creation (`documents[]`) and when added.
1110
+
1111
+ | Property | Type | Description |
1112
+ | --- | --- | --- |
1113
+ | `id` * | string (min length: 1) | A `metadata_ready` document of the workspace with no assignment. Example: `"615601fab04c0a3147bb1246"`. |
1114
+ | `method` | string (`"virtual"`, `"collect"`) | As on an assignment: `virtual` (the default), signed on its virtual page, or `collect`, signed on the fields placed in `entries`. |
1115
+ | `entries` | Array<object { `page_id*`: string; `fields*`: Array<object { `signer_id*`: string; `field_id*`: string; `display_settings*`: [`DisplaySettings`](#displaysettings) }> (min items: 1) }> (min items: 1) | 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`. |
1116
+ | `entries[].page_id` * | string | A page of the document. |
1117
+ | `entries[].fields` * | Array<object { `signer_id*`: string; `field_id*`: string; `display_settings*`: [`DisplaySettings`](#displaysettings) }> (min items: 1) | |
1118
+ | `entries[].fields[].signer_id` * | string | A signer of the document. |
1119
+ | `entries[].fields[].field_id` * | string | A field definition of the workspace. |
1120
+ | `entries[].fields[].display_settings` * | [`DisplaySettings`](#displaysettings) | |
1121
+ | `signer_ids` * | Array<string> (min items: 1) | The signers of this document, each listed once: on creation, signers listed in `signers`; when added, signers of the envelope's documents. Example: `["fa8c140cb49b79f940aab95fddd"]`. |
1122
+ | `expires_at` | string or number or null | 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`. Example: `"2026-12-31T23:59:59Z"`. |
1123
+ | `copy_receiver_ids` | Array<string> | Signer IDs that only receive a copy of this document, as on an assignment. Example: `["cr8c140cb49b79f940aab95fddd"]`. |
820
1124
 
821
1125
  ### ErrorEnvelope
822
1126
 
823
1127
  Standard error wrapper. `status` mirrors the HTTP status code.
824
1128
 
825
- | Property | Type | Required | Nullable | Constraints / description |
826
- | --- | --- | --- | --- | --- |
827
- | `status` | integer | No | No | — |
828
- | `message` | string | No | No | Human-readable error message. |
829
- | `data` | object | No | Yes | — |
1129
+ | Property | Type | Description |
1130
+ | --- | --- | --- |
1131
+ | `status` | integer | Example: `400`. |
1132
+ | `message` | string | Human-readable error message. Example: `"Bad request."`. |
1133
+ | `data` | object or null | Example: `null`. |
1134
+ | `code` | string | On the refusals a client can act on: see Reading a refusal. Other refusals have only `message`. Example: `"PlanRestricted"`. |
1135
+ | `errors` | Array<object { `field*`: string or null; `code*`: string; `message*`: string }> | On a `400` about a field (a model's validation, a missing or an unknown field): one entry per field in error; `message` stays the first entry's. Other `400`s have only `message`. See Reading a refusal. |
1136
+ | `errors[].field` * | string or null | The field as sent, a dot for a nested one (`address.line1`); `null` when the request as a whole is refused. Example: `"full_name"`. |
1137
+ | `errors[].code` * | string | `Required`, `UnknownField` or `Invalid`; the contract endpoints have codes of their own. Example: `"Required"`. |
1138
+ | `errors[].message` * | string | In the platform's language. Example: `"Full Name cannot be blank."`. |
830
1139
 
831
1140
  ### Field
832
1141
 
833
1142
  A reusable field definition.
834
1143
 
835
- | Property | Type | Required | Nullable | Constraints / description |
836
- | --- | --- | --- | --- | --- |
837
- | `resource` | string | No | No | — |
838
- | `id` | string | No | No | — |
839
- | `name` | string | No | No | — |
840
- | `type` | string | No | No | — |
841
- | `regex` | string | No | Yes | — |
842
- | `is_pre_defined` | boolean | No | No | — |
843
- | `is_active` | boolean | No | No | — |
844
- | `is_required` | boolean | No | No | — |
845
- | `is_standard` | boolean | No | No | — |
846
- | `is_read_only` | boolean | No | No | — |
847
- | `is_visible` | boolean | No | No | — |
1144
+ | Property | Type | Description |
1145
+ | --- | --- | --- |
1146
+ | `resource` | string | Example: `"field"`. |
1147
+ | `id` | string | Example: `"6152120297080d55bdd13197"`. |
1148
+ | `name` | string | Example: `"Signature"`. |
1149
+ | `type` | string | Example: `"signature"`. |
1150
+ | `regex` | string or null | |
1151
+ | `is_pre_defined` | boolean | |
1152
+ | `is_active` | boolean | Whether the field is offered for new placements: the field list leaves an inactive one out unless `include_inactive` is set. Documents and templates already using an inactive field keep working: its values are still validated and signed.
1153
+ | `is_required` | boolean | |
1154
+ | `is_standard` | boolean | |
1155
+ | `is_read_only` | boolean | |
1156
+ | `is_visible` | boolean | |
848
1157
 
849
1158
  ### FieldType
850
1159
 
851
1160
  A supported field/validation type.
852
1161
 
853
- | Property | Type | Required | Nullable | Constraints / description |
854
- | --- | --- | --- | --- | --- |
855
- | `type` | string | No | No | — |
856
- | `name` | string | No | No | — |
1162
+ | Property | Type | Description |
1163
+ | --- | --- | --- |
1164
+ | `type` | string | Example: `"cpf"`. |
1165
+ | `name` | string | Example: `"CPF"`. |
857
1166
 
858
1167
  ### FieldValidation
859
1168
 
860
1169
  The result of validating a value against a field definition.
861
1170
 
862
- | Property | Type | Required | Nullable | Constraints / description |
863
- | --- | --- | --- | --- | --- |
864
- | `type` | string | No | No | The field's validation type. |
865
- | `success` | boolean | No | No | — |
866
- | `error_message` | string | No | No | Empty when valid. |
1171
+ | Property | Type | Description |
1172
+ | --- | --- | --- |
1173
+ | `type` | string | The field's validation type. Example: `"cpf"`. |
1174
+ | `success` | boolean | Example: `true`. |
1175
+ | `error_message` | string | Empty when valid. Example: `""`. |
867
1176
 
868
1177
  ### FieldValidationResult
869
1178
 
870
1179
  A per-field result from a multi-field validation.
871
1180
 
872
- | Property | Type | Required | Nullable | Constraints / description |
873
- | --- | --- | --- | --- | --- |
874
- | `field_id` | string | No | No | — |
875
- | `type` | string | No | No | — |
876
- | `success` | boolean | No | No | — |
877
- | `error_message` | string | No | No | — |
1181
+ | Property | Type | Description |
1182
+ | --- | --- | --- |
1183
+ | `field_id` | string | Example: `"63488ffb7adf435aba319787"`. |
1184
+ | `type` | string | Example: `"cpf"`. |
1185
+ | `success` | boolean | Example: `false`. |
1186
+ | `error_message` | string | Example: `"Invalid CPF."`. |
878
1187
 
879
1188
  ### NotificationHistoryEntry
880
1189
 
881
1190
  A single notification delivery record for a signer channel.
882
1191
 
883
- | Property | Type | Required | Nullable | Constraints / description |
884
- | --- | --- | --- | --- | --- |
885
- | `event` | string | No | No | — |
886
- | `status` | string | No | No | enum: `["sent", "failed"]` |
887
- | `error_code` | string | No | Yes | — |
888
- | `error_message` | string | No | Yes | — |
889
- | `sent_at` | string (date-time) | No | Yes | — |
890
- | `failed_at` | string (date-time) | No | Yes | — |
1192
+ | Property | Type | Description |
1193
+ | --- | --- | --- |
1194
+ | `event` | string | Example: `"signature_request"`. |
1195
+ | `status` | string (`"sent"`, `"delivered"`, `"opened"`, `"failed"`) | Furthest delivery stage reached. `opened` means the email was opened/clicked or the WhatsApp message was read. Example: `"failed"`. |
1196
+ | `error_code` | string or null (`"MailboxFull"`, `"AddressNotFound"`, `"AddressSuppressed"`, `"ContentRejected"`, `"MarkedAsSpam"`, `"NotOnWhatsapp"`, `"RecipientRestricted"`, `"NotSent"`, `"Unknown"`) | Why the notification failed. Only set when `status` is `failed`. Example: `"MailboxFull"`. |
1197
+ | `error_message` | string or null | Human-readable, localized explanation of `error_code`. Only set when `status` is `failed`. Example: `"A caixa de entrada do destinatário está cheia. Peça ao signatário para liberar espaço ou use outro e-mail."`. |
1198
+ | `sent_at` | string or null (format: date-time) | Example: `"2026-07-07T12:00:00Z"`. |
1199
+ | `failed_at` | string or null (format: date-time) | Example: `"2026-07-07T12:05:00Z"`. |
1200
+
1201
+ ### NotificationPolicy
1202
+
1203
+ The workspace's notification rules, set by its owners.
1204
+
1205
+ | Property | Type | Description |
1206
+ | --- | --- | --- |
1207
+ | `editable` | boolean | Whether the requesting user is an owner and can change the policy. Example: `true`. |
1208
+ | `owners_receive_all` | boolean | Owners also get the push alerts for every member's documents. Each owner's own preferences still apply. Example: `false`. |
1209
+ | `events` | [`NotificationPolicyEvents`](#notificationpolicyevents) | |
1210
+
1211
+ ### NotificationPolicyEvents
1212
+
1213
+ Every e-mail and push alert, keyed by notification type. `false` means the workspace never sends it. New keys may be added.
1214
+
1215
+ | Property | Type | Description |
1216
+ | --- | --- | --- |
1217
+ | `DocumentCompleted` | boolean | Example: `true`. |
1218
+ | `SignerDeclined` | boolean | Example: `true`. |
1219
+ | `DocumentCancelled` | boolean | Example: `true`. |
1220
+ | `DocumentAboutToExpire` | boolean | Example: `true`. |
1221
+ | `DocumentExpired` | boolean | Example: `true`. |
1222
+ | `DocumentExpirationReset` | boolean | Example: `true`. |
1223
+ | `DocumentProcessingFailed` | boolean | Example: `true`. |
1224
+ | `TemplateProcessingFailed` | boolean | Example: `true`. |
1225
+ | `SignerWhatsappFailed` | boolean | Example: `true`. |
1226
+ | `ContractRenewalNotice` | boolean | Example: `true`. |
1227
+ | `ContractExpiring` | boolean | Example: `true`. |
1228
+ | `ContractExpired` | boolean | Example: `true`. |
1229
+ | `ContractRenewed` | boolean | Example: `true`. |
1230
+ | `SignerViewed` | boolean | Example: `false`. |
1231
+ | `SignerSigned` | boolean | Example: `true`. |
1232
+ | `SignerIdentityReviewRequired` | boolean | Turns off the push only; the identity review e-mail is always sent. Example: `true`. |
891
1233
 
892
1234
  ### NotificationPreferences
893
1235
 
894
1236
  Owner-facing document notifications, keyed by notification type. `true` means the e-mail is sent.
895
1237
 
896
- | Property | Type | Required | Nullable | Constraints / description |
897
- | --- | --- | --- | --- | --- |
898
- | `DocumentCompleted` | boolean | No | No | Every signer has signed and the document is certified. |
899
- | `SignerDeclined` | boolean | No | No | A signer declined to sign. |
900
- | `DocumentCancelled` | boolean | No | No | The document was cancelled. |
901
- | `DocumentAboutToExpire` | boolean | No | No | The signature deadline is approaching. |
902
- | `DocumentExpired` | boolean | No | No | The signature deadline passed. |
903
- | `DocumentExpirationReset` | boolean | No | No | The signature deadline was extended. |
904
- | `DocumentProcessingFailed` | boolean | No | No | An uploaded document could not be processed. |
905
- | `TemplateProcessingFailed` | boolean | No | No | A template could not be processed. |
906
- | `SignerWhatsappFailed` | boolean | No | No | A WhatsApp notification to a signer could not be delivered. |
907
- | `ContractRenewalNotice` | boolean | No | No | A tracked contract entered its notice period. |
908
- | `ContractExpiring` | boolean | No | No | A tracked contract ends in 45 or 30 days. |
909
- | `ContractExpired` | boolean | No | No | A tracked contract ended without renewal. |
910
- | `ContractRenewed` | boolean | No | No | A tracked contract was automatically renewed into its next term. |
1238
+ | Property | Type | Description |
1239
+ | --- | --- | --- |
1240
+ | `DocumentCompleted` | boolean | Every signer has signed and the document is certified. Example: `true`. |
1241
+ | `SignerDeclined` | boolean | A signer declined to sign. Example: `true`. |
1242
+ | `DocumentCancelled` | boolean | The document was cancelled. Example: `true`. |
1243
+ | `DocumentAboutToExpire` | boolean | The signature deadline is approaching. Example: `true`. |
1244
+ | `DocumentExpired` | boolean | The signature deadline passed. Example: `true`. |
1245
+ | `DocumentExpirationReset` | boolean | The signature deadline was extended. Example: `true`. |
1246
+ | `DocumentProcessingFailed` | boolean | An uploaded document could not be processed. Example: `true`. |
1247
+ | `TemplateProcessingFailed` | boolean | A template could not be processed. Example: `true`. |
1248
+ | `SignerWhatsappFailed` | boolean | A WhatsApp notification to a signer could not be delivered. Example: `true`. |
1249
+ | `ContractRenewalNotice` | boolean | A tracked contract entered its notice period: it is about to end or to renew. Example: `true`. |
1250
+ | `ContractExpiring` | boolean | A tracked contract ends in 45 or in 30 days. Example: `true`. |
1251
+ | `ContractExpired` | boolean | A tracked contract ended without renewal. Example: `true`. |
1252
+ | `ContractRenewed` | boolean | A tracked contract was auto-renewed into its next term. Example: `true`. |
911
1253
 
912
1254
  ### OAuthRevokeRequest
913
1255
 
914
1256
  Body of `POST /v1/oauth/revoke`. Sent form-encoded per RFC 7009, or as JSON.
915
1257
 
916
- | Property | Type | Required | Nullable | Constraints / description |
917
- | --- | --- | --- | --- | --- |
918
- | `token` | string | Yes | No | — |
919
- | `token_type_hint` | string | No | No | enum: `["access_token", "refresh_token"]` |
920
- | `client_id` | string | Yes | No | — |
921
- | `client_secret` | string | No | No | — |
1258
+ | Property | Type | Description |
1259
+ | --- | --- | --- |
1260
+ | `token` * | string | |
1261
+ | `token_type_hint` | string (`"access_token"`, `"refresh_token"`) | |
1262
+ | `client_id` * | string | |
1263
+ | `client_secret` | string | |
922
1264
 
923
1265
  ### OAuthTokenRequest
924
1266
 
925
1267
  Body of `POST /v1/oauth/token`. Sent form-encoded per RFC 6749, or as JSON.
926
1268
 
927
- | Property | Type | Required | Nullable | Constraints / description |
928
- | --- | --- | --- | --- | --- |
929
- | `grant_type` | string | Yes | No | enum: `["authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:token-exchange"]`; `urn:ietf:params:oauth:grant-type:token-exchange` is for internal service clients only (Assinafy's own MCP server) — an ordinary confidential or public client authenticates with it and always gets `invalid_client`, exactly as an unrecognized client would. Everyday integrators use `authorization_code` and `refresh_token`. |
930
- | `code` | string | No | No | — |
931
- | `redirect_uri` | string (uri) | No | No | — |
932
- | `code_verifier` | string | No | No | RFC 7636: 43-128 characters from [A-Za-z0-9-._~]. Shorter values are rejected with `invalid_grant`. |
933
- | `refresh_token` | string | No | No | — |
934
- | `client_id` | string | Yes | No | — |
935
- | `client_secret` | string | No | No | Confidential clients only. Public clients authenticate with PKCE and are never issued a secret; the token-exchange grant requires a confidential, internal-service client and therefore always requires this. |
936
- | `resource` | string (uri) | No | No | RFC 8707 resource indicator. For `authorization_code`/`refresh_token`, optional; when present it must be the `resource` value published by /.well-known/oauth-protected-resource and must match the one sent to /authorize, otherwise `invalid_target`. For the token-exchange grant it is REQUIRED and must equal this API's own resource identifier exactly (never a front-end resource such as the MCP server), otherwise `invalid_target`. |
937
- | `subject_token` | string | No | No | Token-exchange grant only. The front-end resource's access token being traded in. Must be a live, original (never itself exchanged) token minted for a resource this server issues tokens for, other than this API's own audience. |
938
- | `subject_token_type` | string | No | No | enum: `["urn:ietf:params:oauth:token-type:access_token"]`; Token-exchange grant only. Required; only `urn:ietf:params:oauth:token-type:access_token` is supported. |
939
- | `requested_token_type` | string | No | No | enum: `["urn:ietf:params:oauth:token-type:access_token"]`; Token-exchange grant only. Optional; when present it must agree with the only type this server issues. |
1269
+ | Property | Type | Description |
1270
+ | --- | --- | --- |
1271
+ | `grant_type` * | string (`"authorization_code"`, `"refresh_token"`, `"urn:ietf:params:oauth:grant-type:token-exchange"`) | `urn:ietf:params:oauth:grant-type:token-exchange` is for internal service clients only (Assinafy's own MCP server) — an ordinary confidential or public client authenticates with it and always gets `invalid_client`, exactly as an unrecognized client would. Everyday integrators use `authorization_code` and `refresh_token`. |
1272
+ | `code` | string | |
1273
+ | `redirect_uri` | string (format: uri) | |
1274
+ | `code_verifier` | string | RFC 7636: 43-128 characters from [A-Za-z0-9-._~]. Shorter values are rejected with `invalid_grant`. |
1275
+ | `refresh_token` | string | |
1276
+ | `client_id` * | string | |
1277
+ | `client_secret` | string | Confidential clients only. Public clients authenticate with PKCE and are never issued a secret; the token-exchange grant requires a confidential, internal-service client and therefore always requires this. |
1278
+ | `resource` | string (format: uri) | RFC 8707 resource indicator. For `authorization_code`/`refresh_token`, optional; when present it must be the `resource` value published by /.well-known/oauth-protected-resource and must match the one sent to /authorize, otherwise `invalid_target`. For the token-exchange grant it is REQUIRED and must equal this API's own resource identifier exactly (never a front-end resource such as the MCP server), otherwise `invalid_target`. |
1279
+ | `subject_token` | string | Token-exchange grant only. The front-end resource's access token being traded in. Must be a live, original (never itself exchanged) token minted for a resource this server issues tokens for, other than this API's own audience. |
1280
+ | `subject_token_type` | string (`"urn:ietf:params:oauth:token-type:access_token"`) | Token-exchange grant only. Required; only `urn:ietf:params:oauth:token-type:access_token` is supported. |
1281
+ | `requested_token_type` | string (`"urn:ietf:params:oauth:token-type:access_token"`) | Token-exchange grant only. Optional; when present it must agree with the only type this server issues. |
1282
+
1283
+ ### PushPreferences
1284
+
1285
+ Document alerts sent as push notifications to the user's phones, keyed by notification type. `true` means the push is sent. Separate from the e-mail preferences. New keys may be added.
1286
+
1287
+ | Property | Type | Description |
1288
+ | --- | --- | --- |
1289
+ | `SignerViewed` | boolean | A signer opened the document for the first time. Example: `true`. |
1290
+ | `SignerSigned` | boolean | A signer signed the document. Example: `true`. |
1291
+ | `DocumentCompleted` | boolean | Every signer has signed and the document is certified. Example: `true`. |
1292
+ | `SignerDeclined` | boolean | A signer declined to sign. Example: `true`. |
1293
+ | `DocumentAboutToExpire` | boolean | The signature deadline is approaching. Example: `true`. |
1294
+ | `DocumentExpired` | boolean | The signature deadline passed. Example: `true`. |
1295
+ | `SignerIdentityReviewRequired` | boolean | A signer's identity awaits the sender's review. The e-mail for this is always sent. Example: `true`. |
1296
+ | `SignerWhatsappFailed` | boolean | A WhatsApp notification to a signer could not be delivered. Example: `true`. |
940
1297
 
941
1298
  ### ResendCostEstimate
942
1299
 
943
- Credits needed to resend one signer's notification. A reminder consumes no document allowance.
1300
+ Credits a reminder to one signer will take, and whether the account can pay for it. A reminder uses no document.
944
1301
 
945
- | Property | Type | Required | Nullable | Constraints / description |
946
- | --- | --- | --- | --- | --- |
947
- | `total` | number | No | No | Sum of the breakdown costs. |
948
- | `breakdown` | Array<object> | No | No | Per-charge resend costs. |
949
- | `breakdown[].code` | string | No | No | For example `NotificationWhatsappResend`. |
950
- | `breakdown[].name` | string | No | No | Human-readable charge name. |
951
- | `breakdown[].cost` | number | No | No | Credits charged for this item. |
952
- | `credit_balance` | number | No | Yes | Available credits; null when credits are unlimited. |
953
- | `has_sufficient_credits` | boolean | No | No | Whether the workspace can pay for the resend. |
1302
+ | Property | Type | Description |
1303
+ | --- | --- | --- |
1304
+ | `total` | number | Sum of the `breakdown` costs. Example: `0.45`. |
1305
+ | `breakdown` | Array<object { `code`: string; `name`: string; `cost`: number }> | |
1306
+ | `breakdown[].code` | string | Example: `"NotificationWhatsappResend"`. |
1307
+ | `breakdown[].name` | string | Example: `"Whatsapp Notification Resend"`. |
1308
+ | `breakdown[].cost` | number | Example: `0.45`. |
1309
+ | `credit_balance` | number or null | Credits available. `null` when the account's credits are not limited. Example: `10`. |
1310
+ | `has_sufficient_credits` | boolean | Whether the reminder would pass its credit check now: the check the reminder itself makes, so a contract that allows overage passes with a low `credit_balance`, and a plan whose payment is pending doesn't, whatever the balance. Example: `true`. |
954
1311
 
955
1312
  ### Signer
956
1313
 
957
1314
  A signing party belonging to a workspace account.
958
1315
 
959
- | Property | Type | Required | Nullable | Constraints / description |
960
- | --- | --- | --- | --- | --- |
961
- | `resource` | string | No | No | Present in single-resource responses. |
962
- | `id` | string | No | No | — |
963
- | `full_name` | string | No | No | — |
964
- | `email` | string (email) | No | Yes | — |
965
- | `whatsapp_phone_number` | string | No | Yes | E.164 format; normalized on save. |
966
- | `has_accepted_terms` | boolean | No | No | — |
967
- | `government_id` | string | No | Yes | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). |
1316
+ | Property | Type | Description |
1317
+ | --- | --- | --- |
1318
+ | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
1319
+ | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
1320
+ | `full_name` | string | Example: `"John Signer"`. |
1321
+ | `email` | string or null (format: email) | Example: `"signer@example.com"`. |
1322
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. A number written with `+` is read with the country code it names first, and as Brazilian if it isn't valid there; one without `+` is read as a Brazilian area code and number first.
1323
+ | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
1324
+ | `has_accepted_terms` | boolean | Example: `false`. |
968
1325
 
969
1326
  ### SignerIdentityReview
970
1327
 
971
- Account review of a biometric identity verification. Images are available only during InReview.
972
1328
 
973
- | Property | Type | Required | Nullable | Constraints / description |
974
- | --- | --- | --- | --- | --- |
975
- | `id` | string | No | No | — |
976
- | `status` | string | No | No | — enum: `["Pending", "InReview", "Approved", "Declined", "Expired", "Abandoned"]` |
977
- | `provider` | string | No | No | — enum: `["AssinafyVerify"]` |
978
- | `verification_method` | string | No | No | — enum: `["IdDocumentFaceMatchBasic"]` |
979
- | `reason_codes` | Array<object> | No | No | Why the provider sent it to review, in its order. Unknown codes have the code as description. |
980
- | `reason_codes[].code` | string | No | No | — |
981
- | `reason_codes[].description` | string | No | No | — |
982
- | `evidence_available` | boolean | No | No | — |
983
- | `expected` | object | No | Yes | What the signer was registered with. |
984
- | `expected.name` | string | No | Yes | — |
985
- | `expected.cpf` | string | No | Yes | — |
986
- | `document` | object | No | Yes | What was read from the document. |
987
- | `document.type` | string | No | Yes | — |
988
- | `document.name` | string | No | Yes | — |
989
- | `document.cpf` | string | No | Yes | — |
990
- | `matches` | object | No | Yes | — |
991
- | `matches.cpf` | boolean | No | Yes | — |
992
- | `matches.name` | number | No | Yes | Name similarity, 0-1. |
993
- | `matches.birth_date` | boolean | No | Yes | — |
994
- | `checks` | Array<object> | No | No | — |
995
- | `checks[].name` | string | No | No | — |
996
- | `checks[].result` | string | No | No | pass, review, skipped, or a failure result. |
997
- | `checks[].score` | number | No | Yes | — |
998
- | `checks[].reasons` | Array<string> | No | No | — |
999
- | `images` | Array<string> | No | No | The evidence images the reviewer can open with **Signer identity review image**, in display order: `document_front`, `document_back`, `document_pdf`, `face`. Only while `status` is `InReview`; empty once decided. |
1000
- | `ruleset_version` | string | No | Yes | — |
1001
- | `evidence_sha256` | string | No | Yes | — |
1002
- | `reviewed_by` | object | No | Yes | — |
1003
- | `reviewed_by.id` | string | No | No | — |
1004
- | `reviewed_by.name` | string | No | No | — |
1005
- | `reviewed_at` | string (date-time) | No | Yes | — |
1006
- | `review_note` | string | No | Yes | — |
1007
- | `completed_at` | string (date-time) | No | Yes | — |
1329
+
1330
+ | Property | Type | Description |
1331
+ | --- | --- | --- |
1332
+ | `id` | string | Example: `"104c267f8e1e8c6855d7788b76a8"`. |
1333
+ | `status` | string (`"Pending"`, `"InReview"`, `"Approved"`, `"Declined"`, `"Expired"`, `"Abandoned"`) | Example: `"InReview"`. |
1334
+ | `provider` | string (`"AssinafyVerify"`) | Example: `"AssinafyVerify"`. |
1335
+ | `verification_method` | string (`"IdDocumentFaceMatchBasic"`) | Example: `"IdDocumentFaceMatchBasic"`. |
1336
+ | `reason_codes` | Array<object { `code`: string; `description`: string }> | Why the provider sent it to review, in its order. Unknown codes have the code as description. |
1337
+ | `reason_codes[].code` | string | Example: `"NAME_MISMATCH"`. |
1338
+ | `reason_codes[].description` | string | Example: `"Nome no documento difere do cadastrado (similaridade 52%)"`. |
1339
+ | `evidence_available` | boolean | Example: `true`. |
1340
+ | `expected` | object { `name`: string or null; `cpf`: string or null } | What the signer was registered with. |
1341
+ | `expected.name` | string or null | Example: `"Maria da Silva"`. |
1342
+ | `expected.cpf` | string or null | Example: `"52998224725"`. |
1343
+ | `document` | object { `type`: string or null; `name`: string or null; `cpf`: string or null } | What was read from the document. |
1344
+ | `document.type` | string or null | Example: `"CNH"`. |
1345
+ | `document.name` | string or null | Example: `"MARIA SILVA"`. |
1346
+ | `document.cpf` | string or null | Example: `"52998224725"`. |
1347
+ | `matches` | object { `cpf`: boolean or null; `name`: number or null; `birth_date`: boolean or null } | |
1348
+ | `matches.cpf` | boolean or null | Example: `true`. |
1349
+ | `matches.name` | number or null | Name similarity, 0-1. Example: `0.5217`. |
1350
+ | `matches.birth_date` | boolean or null | Example: `null`. |
1351
+ | `checks` | Array<object { `name`: string; `result`: string; `score`: number or null; `reasons`: Array<string> }> | |
1352
+ | `checks[].name` | string | Example: `"name"`. |
1353
+ | `checks[].result` | string | pass, review, skipped, or a failure result. Example: `"review"`. |
1354
+ | `checks[].score` | number or null | Example: `0.5217`. |
1355
+ | `checks[].reasons` | Array<string> | Example: `["NAME_MISMATCH"]`. |
1356
+ | `images` | Array<string (`"document_front"`, `"document_back"`, `"document_pdf"`, `"face"`)> | The evidence images the reviewer can open with **Signer identity review image**, in display order: `document_front`, `document_back`, `document_pdf`, `face`. Only while `status` is `InReview`; empty once decided. Example: `["document_front","document_back","face"]`. |
1357
+ | `ruleset_version` | string or null | Example: `"2026-10-12.2"`. |
1358
+ | `evidence_sha256` | string or null | Example: `"9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2"`. |
1359
+ | `reviewed_by` | object { `id`: string; `name`: string } | |
1360
+ | `reviewed_by.id` | string | Example: `"Kx9pQ2"`. |
1361
+ | `reviewed_by.name` | string | Example: `"Ana Souza"`. |
1362
+ | `reviewed_at` | string or null (format: date-time) | Example: `"2026-10-13T21:05:00Z"`. |
1363
+ | `review_note` | string or null | Example: `"Conferido por videochamada."`. |
1364
+ | `completed_at` | string or null (format: date-time) | Example: `"2026-10-13T21:05:00Z"`. |
1008
1365
 
1009
1366
  ### SignerSelf
1010
1367
 
1011
1368
  The current signer, as returned by `GET /v1/signers/self`. Extends Signer with the signature-state flags that are only computed for the authenticated signer.
1012
1369
 
1013
- | Property | Type | Required | Nullable | Constraints / description |
1014
- | --- | --- | --- | --- | --- |
1015
- | `resource` | string | No | No | Present in single-resource responses. |
1016
- | `id` | string | No | No | — |
1017
- | `full_name` | string | No | No | — |
1018
- | `email` | string (email) | No | Yes | — |
1019
- | `whatsapp_phone_number` | string | No | Yes | E.164 format; normalized on save. |
1020
- | `has_accepted_terms` | boolean | No | No | — |
1021
- | `has_signature` | boolean | No | No | Whether the signer has a saved signature image stored. |
1022
- | `has_initial` | boolean | No | No | Whether the signer has a saved initials image stored. |
1023
- | `is_signature_reusable` | boolean | No | No | Whether the signer opted to reuse their saved signature/initials in future processes. When false, clients should not pre-render the saved image even if `has_signature`/`has_initial` is true. |
1024
- | `government_id` | string | No | Yes | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). |
1025
- | `verification_method` | string | No | No | How this signature request verifies the signer. `Email`/`Whatsapp` ask for the 6-digit code; `IdDocumentFaceMatchBasic` runs the identity document check instead (see **Identity document verification status**). enum: `["Email", "Whatsapp", "DigitalCertificate", "IdDocumentFaceMatchBasic"]` |
1370
+ | Property | Type | Description |
1371
+ | --- | --- | --- |
1372
+ | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
1373
+ | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
1374
+ | `full_name` | string | Example: `"John Signer"`. |
1375
+ | `email` | string or null (format: email) | Example: `"signer@example.com"`. |
1376
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. Example: `"+5548999990000"`. |
1377
+ | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
1378
+ | `has_accepted_terms` | boolean | Example: `false`. |
1379
+ | `has_signature` | boolean | Whether the signer has a saved signature image stored. Example: `true`. |
1380
+ | `has_initial` | boolean | Whether the signer has a saved initials image stored. Example: `false`. |
1381
+ | `is_signature_reusable` | boolean | Whether the signer opted to reuse their saved signature/initials in future processes. When false, clients should not pre-render the saved image even if `has_signature`/`has_initial` is true. Example: `false`. |
1382
+ | `verification_method` | string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`) | How this signature request verifies the signer. `Email`/`Whatsapp` ask for the 6-digit code; `IdDocumentFaceMatchBasic` runs the identity document check instead (see **Identity document verification status**). Example: `"Email"`. |
1383
+
1384
+ ### SigningDocument
1385
+
1386
+ The document as its signer reads it with the access code: the document with `current_signer`, `is_signer_access_closed` and `certified_copy`. Once the code is closed, only `id`, `name`, `status` and these three, and `envelope` when asked for.
1387
+
1388
+ | Property | Type | Description |
1389
+ | --- | --- | --- |
1390
+ | `resource` | string | Present in single-resource responses. Example: `"document"`. |
1391
+ | `id` | string | Example: `"615601fab04c0a3147bb1246"`. |
1392
+ | `account_id` | string | Example: `"d199996981dbd199996981db"`. |
1393
+ | `template_id` | string or null | Example: `null`. |
1394
+ | `name` | string | Example: `"document.pdf"`. |
1395
+ | `status` | string | Status code — see GET /v1/documents/statuses. Example: `"metadata_ready"`. |
1396
+ | `artifacts` | object | Artifact download URLs keyed by name. Always `original`, plus `thumbnail` once one exists. A certificated document also carries `certificated`, `certificate-page` and `bundle`, and `pades` when it was signed with a digital certificate — the PAdES version holds the signers' ICP-Brasil signatures, which certification flattens out of the certificated PDF. Example: `{"original":"https://api.assinafy.com.br/v1/documents/doc1/download/original"}`. |
1397
+ | `is_closed` | boolean | Example: `false`. |
1398
+ | `signing_url` | string | Example: `"https://api.assinafy.com.br/v1/sign/doc1"`. |
1399
+ | `verification_code` | string or null | The code printed on the certificate page. Anyone can check it with `GET /v1/documents/{verification_code}/verify` or on `verification_url`. `null` until the document is `certificated`, and on documents certificated before verification codes existed. Example: `"a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f"`. |
1400
+ | `verification_url` | string or null (format: uri) | The public verification page for this document. `null` until the document is `certificated`. Example: `"https://www.assinafy.com.br/verificador/a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f"`. |
1401
+ | `decline_reason` | string or null | Example: `null`. |
1402
+ | `declined_by` | [`Signer`](#signer) or null | |
1403
+ | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | |
1404
+ | `tags[].id` | string | |
1405
+ | `tags[].name` | string | |
1406
+ | `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
1407
+ | `assignment` | [`Assignment`](#assignment) or null | The document's assignment, or `null` before one is created. The server decides when it is included, whatever `expand` the request sends: the document list, `GET /v1/documents/{documentId}`, the signer's document list and document creation from a template always include it; `/documents/search` and the upload response never do. Only the rename response follows `?expand=assignment`. |
1408
+ | `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
1409
+ | `envelope_id` | string or null | Only on `GET /v1/documents/{documentId}?expand=envelope_id` read by the workspace, not in document lists or webhooks, so their payloads keep their shape: the envelope this document is in, or `null` for a document sent on its own, taken out of its envelope, or whose envelope was deleted. Example: `null`. |
1410
+ | `envelope` | object { `id*`: string; `name*`: string } | Only on `GET /v1/documents/{documentId}?expand=envelope` read by the workspace and `GET /v1/sign?expand=envelope` or `GET /v1/signers/{signerId}/document?expand=envelope` read with the signer's code, not in document lists or webhooks: the envelope this document is in, or `null` for a document sent on its own, taken out of its envelope, or whose envelope was deleted. The signer's reads name the envelope their code belongs to even when the code's own document was taken out, since the code still reaches the rest. |
1411
+ | `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
1412
+ | `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
1413
+ | `has_contract` | boolean | Only on `GET /v1/documents/{documentId}` read by the workspace, while the environment has contract tracking on: not with a signer's access code, not in document lists or webhooks, and left out when the lookup fails, so a missing key means unknown. Whether `GET /v1/accounts/{accountId}/documents/{documentId}/contract` answers with contract terms, the document's own or those of a contract it amends whose document still exists, so a page can lay out the contract section before reading it. Example: `true`. |
1414
+ | `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
1415
+ | `updated_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
1416
+ | `current_signer` | [`Signer`](#signer) plus object { `verification_method`: string; `notification_methods`: array or null; `completed`: boolean } | This signer. Once the code is closed, only `id` and the last three. |
1417
+ | `is_signer_access_closed` | boolean | Whether the code is closed. Example: `false`. |
1418
+ | `certified_copy` | object { `available*`: boolean; `notification_method*`: string or null (`"Email"`, `"Whatsapp"`, `null`); `resends_left*`: integer or null } | Whether the signer can ask for the certified copy again (`POST /v1/sign/certified-copy`). |
1419
+ | `certified_copy.available` * | boolean | Example: `false`. |
1420
+ | `certified_copy.notification_method` * | string or null (`"Email"`, `"Whatsapp"`, `null`) | The channel it goes on; `null` when there is none. Example: `"Email"`. |
1421
+ | `certified_copy.resends_left` * | integer or null | WhatsApp re-sends left; `null` for e-mail. Example: `null`. |
1026
1422
 
1027
1423
  ### SigningUrl
1028
1424
 
1029
- | Property | Type | Required | Nullable | Constraints / description |
1030
- | --- | --- | --- | --- | --- |
1031
- | `signer_id` | string | No | No | — |
1032
- | `url` | string | No | No | — |
1425
+ One entry per signer whose turn has come. The link depends on how the signer gets the invitation: with `Email` it is a page that does not open the document by itself, where the signer asks for their invitation again by e-mail; with `Whatsapp` only it is `null` (the signer has their link in the WhatsApp message). An embedded signer (`embedded: true`) never gets a link: `url` is `null` and the integrator mints an embed session for them instead.
1426
+
1427
+ | Property | Type | Description |
1428
+ | --- | --- | --- |
1429
+ | `signer_id` | string | |
1430
+ | `url` | string or null | See the schema description. `null` for a signer notified only by WhatsApp and for an embedded signer. Example: `"https://api.assinafy.com.br/v1/sign/doc1?email=signer@example.com"`. |
1431
+ | `embedded` | boolean | Whether the signer was marked `embedded` when the assignment was created. Example: `false`. |
1033
1432
 
1034
1433
  ### Tag
1035
1434
 
1036
1435
  A workspace-scoped label. Names are unique per workspace (case-insensitive).
1037
1436
 
1038
- | Property | Type | Required | Nullable | Constraints / description |
1039
- | --- | --- | --- | --- | --- |
1040
- | `resource` | string | No | No | — |
1041
- | `id` | string | No | No | — |
1042
- | `name` | string | No | No | — |
1043
- | `color` | string | No | Yes | 6-char hex without leading #. |
1044
- | `created_at` | string (date-time) | No | No | — |
1045
- | `updated_at` | string (date-time) | No | No | — |
1437
+ | Property | Type | Description |
1438
+ | --- | --- | --- |
1439
+ | `resource` | string | Example: `"tag"`. |
1440
+ | `id` | string | Example: `"fa8c09f3e709a8a1c82d69b1454"`. |
1441
+ | `name` | string | Example: `"Contracts"`. |
1442
+ | `color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
1443
+ | `created_at` | string (format: date-time) | Example: `"2026-05-14T12:00:00Z"`. |
1444
+ | `updated_at` | string (format: date-time) | Example: `"2026-05-14T12:00:00Z"`. |
1046
1445
 
1047
1446
  ### Template
1048
1447
 
1049
1448
  A reusable document template.
1050
1449
 
1051
- | Property | Type | Required | Nullable | Constraints / description |
1052
- | --- | --- | --- | --- | --- |
1053
- | `resource` | string | No | No | — |
1054
- | `id` | string | No | No | — |
1055
- | `name` | string | No | No | — |
1056
- | `document_name` | string | No | Yes | Default name for documents created from this template. |
1057
- | `message` | string | No | Yes | Default invitation message. |
1058
- | `status` | string | No | No | One of uploading, uploaded, processing, ready, failed. |
1059
- | `pages` | Array<[`TemplatePage`](#templatepage)> | No | No | — |
1060
- | `roles` | Array<[`TemplateRole`](#templaterole)> | No | No | — |
1061
- | `tags` | Array<object> | No | No | — |
1062
- | `tags[].id` | string | No | No | — |
1063
- | `tags[].name` | string | No | No | — |
1064
- | `default_document_tags` | Array<object> | No | No | Applied to documents created from this template; only returned by the single-template endpoint. |
1065
- | `default_document_tags[].id` | string | No | No | — |
1066
- | `default_document_tags[].name` | string | No | No | — |
1067
- | `created_at` | string (date-time) | No | No | — |
1068
- | `updated_at` | string (date-time) | No | No | — |
1450
+ | Property | Type | Description |
1451
+ | --- | --- | --- |
1452
+ | `resource` | string | Example: `"template"`. |
1453
+ | `id` | string | Example: `"fa88b732db84d01427d4cdd1092"`. |
1454
+ | `name` | string | Example: `"template.pdf"`. |
1455
+ | `document_name` | string or null | Default name for documents created from this template. |
1456
+ | `message` | string or null | Default invitation message. |
1457
+ | `status` | string | One of uploading, uploaded, processing, ready, failed. Example: `"ready"`. |
1458
+ | `pages` | Array<[`TemplatePage`](#templatepage)> | |
1459
+ | `roles` | Array<[`TemplateRole`](#templaterole)> | |
1460
+ | `tags` | Array<object { `id`: string; `name`: string }> | |
1461
+ | `tags[].id` | string | |
1462
+ | `tags[].name` | string | |
1463
+ | `default_document_tags` | Array<object { `id`: string; `name`: string }> | Applied to documents created from this template; only returned by the single-template endpoint. |
1464
+ | `default_document_tags[].id` | string | |
1465
+ | `default_document_tags[].name` | string | |
1466
+ | `created_at` | string (format: date-time) | |
1467
+ | `updated_at` | string (format: date-time) | |
1069
1468
 
1070
1469
  ### TemplateFieldPlacement
1071
1470
 
1072
- | Property | Type | Required | Nullable | Constraints / description |
1073
- | --- | --- | --- | --- | --- |
1074
- | `id` | string | No | No | — |
1075
- | `field_id` | string | No | No | — |
1076
- | `role_id` | string | No | No | — |
1077
- | `label` | string | No | No | — |
1078
- | `display_settings` | any JSON value | No | No | Rendering metadata for the placement. |
1079
- | `created_at` | string (date-time) | No | No | — |
1080
- | `updated_at` | string (date-time) | No | No | — |
1471
+
1472
+
1473
+ | Property | Type | Description |
1474
+ | --- | --- | --- |
1475
+ | `id` | string | |
1476
+ | `field_id` | string | |
1477
+ | `role_id` | string | |
1478
+ | `label` | string | |
1479
+ | `display_settings` | any | Rendering metadata for the placement. |
1480
+ | `created_at` | string (format: date-time) | |
1481
+ | `updated_at` | string (format: date-time) | |
1081
1482
 
1082
1483
  ### TemplatePage
1083
1484
 
1084
- | Property | Type | Required | Nullable | Constraints / description |
1085
- | --- | --- | --- | --- | --- |
1086
- | `id` | string | No | No | — |
1087
- | `number` | integer | No | No | — |
1088
- | `height` | integer | No | No | — |
1089
- | `width` | integer | No | No | — |
1090
- | `download_url` | string | No | No | — |
1091
- | `fields` | Array<[`TemplateFieldPlacement`](#templatefieldplacement)> | No | No | — |
1485
+
1486
+
1487
+ | Property | Type | Description |
1488
+ | --- | --- | --- |
1489
+ | `id` | string | |
1490
+ | `number` | integer | Example: `1`. |
1491
+ | `height` | integer | Example: `2100`. |
1492
+ | `width` | integer | Example: `1275`. |
1493
+ | `download_url` | string | |
1494
+ | `fields` | Array<[`TemplateFieldPlacement`](#templatefieldplacement)> | |
1092
1495
 
1093
1496
  ### TemplateRole
1094
1497
 
1095
- | Property | Type | Required | Nullable | Constraints / description |
1096
- | --- | --- | --- | --- | --- |
1097
- | `id` | string | No | No | — |
1098
- | `name` | string | No | No | — |
1099
- | `assignment_type` | string | No | No | — |
1100
- | `created_at` | string (date-time) | No | No | — |
1101
- | `updated_at` | string (date-time) | No | No | — |
1498
+
1499
+
1500
+ | Property | Type | Description |
1501
+ | --- | --- | --- |
1502
+ | `id` | string | |
1503
+ | `name` | string | Example: `"Editor"`. |
1504
+ | `assignment_type` | string | Example: `"Editor"`. |
1505
+ | `created_at` | string (format: date-time) | |
1506
+ | `updated_at` | string (format: date-time) | |
1102
1507
 
1103
1508
  ### WebhookDispatch
1104
1509
 
1105
1510
  A single webhook delivery-history entry.
1106
1511
 
1107
- | Property | Type | Required | Nullable | Constraints / description |
1108
- | --- | --- | --- | --- | --- |
1109
- | `resource` | string | No | No | Always `activity_dispatching_history` in single-resource responses. |
1110
- | `id` | string | No | No | Dispatch entry ID. |
1111
- | `event` | string | No | No | Event type that triggered the dispatch. |
1112
- | `activity_id` | integer | No | No | Internal activity ID associated with the dispatch. |
1113
- | `endpoint_id` | string | No | Yes | ID of the webhook endpoint the delivery was sent to (`null` once that endpoint is deleted). |
1114
- | `endpoint` | string | No | Yes | URL that received the request. |
1115
- | `payload` | object | No | Yes | JSON payload sent to the endpoint. |
1116
- | `delivered` | boolean | No | No | Whether delivery succeeded. |
1117
- | `webhook_id` | string | No | Yes | Stable `webhook-id` header across attempts of this event to this endpoint. |
1118
- | `attempt` | integer | No | Yes | Attempt number, starting at 1. |
1119
- | `kind` | string | No | No | enum: `["scheduled", "probe", "manual"]` |
1120
- | `will_retry` | boolean | No | No | Whether another attempt follows this entry. |
1121
- | `http_status` | integer | No | Yes | HTTP status returned (null if connection failed). |
1122
- | `response_body` | string | No | Yes | Endpoint response body, truncated to 2000 chars. |
1123
- | `error` | string | No | Yes | Delivery error message, if any. |
1124
- | `created_at` | string (date-time) | No | No | — |
1125
- | `updated_at` | string (date-time) | No | No | — |
1512
+ | Property | Type | Description |
1513
+ | --- | --- | --- |
1514
+ | `resource` | string | Always `activity_dispatching_history` in single-resource responses. Example: `"activity_dispatching_history"`. |
1515
+ | `id` | string | Dispatch entry ID. Example: `"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"`. |
1516
+ | `event` | string | Event type that triggered the dispatch. Example: `"document_ready"`. |
1517
+ | `activity_id` | integer | Internal activity ID associated with the dispatch. Example: `456`. |
1518
+ | `endpoint_id` | string or null | ID of the webhook endpoint the delivery was sent to (`null` once that endpoint is deleted). Example: `"65f1c2a9b3e4d5f60718293a4b5c6d7e"`. |
1519
+ | `endpoint` | string or null | URL that received the request. Example: `"https://example.com/webhook"`. |
1520
+ | `payload` | object or null | JSON payload sent to the endpoint. |
1521
+ | `delivered` | boolean | Whether delivery succeeded. Example: `true`. |
1522
+ | `webhook_id` | string or null | The `webhook-id` header of the request: the same on every attempt of this event to this endpoint. Example: `"9f86d081884c7d659a2feaa0c55ad015"`. |
1523
+ | `attempt` | integer or null | Which attempt of this event to this endpoint the entry records, counted from 1. Example: `2`. |
1524
+ | `kind` | string (`"scheduled"`, `"probe"`, `"manual"`) | `scheduled`: the delivery of the event as it happened; `probe`: the one delivery we send to a paused endpoint to see whether it answers; `manual`: asked for through **Retry webhook delivery** or **Send a test delivery**. Example: `"scheduled"`. |
1525
+ | `will_retry` | boolean | Whether another attempt follows this one. `false` on a delivered entry and on the last attempt of a failed one. Example: `true`. |
1526
+ | `duration_ms` | integer or null | How long the endpoint took to answer or fail, in milliseconds. `null` when no request was sent (a host that does not resolve, an address that is not public) and on entries recorded before it was measured. Example: `184`. |
1527
+ | `http_status` | integer or null | HTTP status returned (null if connection failed). Example: `200`. |
1528
+ | `response_body` | string or null | Endpoint response body, truncated to 2000 chars. Example: `"OK"`. |
1529
+ | `error` | string or null | Delivery error message, if any. Example: `null`. |
1530
+ | `created_at` | string (format: date-time) | Example: `"2024-01-15T10:30:00Z"`. |
1531
+ | `updated_at` | string (format: date-time) | Example: `"2024-01-15T10:30:00Z"`. |
1126
1532
 
1127
1533
  ### WebhookEndpoint
1128
1534
 
1129
1535
  A URL that receives the account's webhook events. Every active endpoint subscribed to an event receives it.
1130
1536
 
1131
- | Property | Type | Required | Nullable | Constraints / description |
1132
- | --- | --- | --- | --- | --- |
1133
- | `resource` | string | No | No | Always `activity_event_subscription` in single-resource responses. |
1134
- | `id` | string | No | No | Endpoint ID. |
1135
- | `name` | string | No | Yes | Label to tell endpoints apart. |
1136
- | `url` | string (uri) | No | No | HTTPS URL that receives the events. |
1137
- | `email` | string (email) | No | No | Contact email for delivery-failure notices. |
1138
- | `events` | Array<string> | No | No | Event types delivered to this endpoint. |
1139
- | `is_active` | boolean | No | No | Whether events are delivered to this endpoint. |
1140
- | `is_held` | boolean | No | No | Whether deliveries are paused after repeated failures. |
1141
- | `held_since` | integer | No | Yes | Unix timestamp when the pause began; null while deliveries run. |
1142
- | `signing_enabled` | boolean | No | No | Whether deliveries carry a `webhook-signature` header. |
1143
- | `created_at` | string (date-time) | No | No | — |
1144
- | `updated_at` | string (date-time) | No | No | — |
1537
+ | Property | Type | Description |
1538
+ | --- | --- | --- |
1539
+ | `resource` | string | Always `activity_event_subscription` in single-resource responses. Example: `"activity_event_subscription"`. |
1540
+ | `id` | string | Endpoint ID. Example: `"65f1c2a9b3e4d5f60718293a4b5c6d7e"`. |
1541
+ | `name` | string or null | Label to tell endpoints apart. Example: `"ERP"`. |
1542
+ | `url` | string (format: uri) | URL that receives the events; `https` is required for a new or changed URL. Example: `"https://example.com/webhooks/assinafy"`. |
1543
+ | `email` | string (format: email) | Contact email for delivery-failure notices. Example: `"signer@example.com"`. |
1544
+ | `events` | Array<string> | Event types delivered to this endpoint (see **List webhook event types**). Example: `["document_ready","signer_signed_document"]`. |
1545
+ | `is_active` | boolean | Whether events are delivered to this endpoint. Example: `true`. |
1546
+ | `is_held` | boolean | Whether deliveries are paused after 10 failures in a row: we probe the endpoint on a growing schedule and deliver what it missed when it answers (see **Delivery contract**). Editing the URL, or sending `is_active: true`, lifts the pause. Example: `false`. |
1547
+ | `held_since` | integer or null | When the pause began (Unix timestamp, seconds); `null` while deliveries run. Example: `null`. |
1548
+ | `signing_enabled` | boolean | Whether deliveries carry a `webhook-signature` header (see **Webhook Payloads → Verifying signatures**). Example: `true`. |
1549
+ | `created_at` | string (format: date-time) | Example: `"2026-10-01T12:00:00Z"`. |
1550
+ | `updated_at` | string (format: date-time) | Example: `"2026-10-01T12:00:00Z"`. |
1145
1551
 
1146
1552
  ### WebhookEndpointSecret
1147
1553
 
1148
1554
  An endpoint's signing secret.
1149
1555
 
1150
- | Property | Type | Required | Nullable | Constraints / description |
1151
- | --- | --- | --- | --- | --- |
1152
- | `secret` | string | No | No | Standard Webhooks secret: `whsec_` followed by the base64-encoded key. |
1556
+ | Property | Type | Description |
1557
+ | --- | --- | --- |
1558
+ | `secret` | string | Standard Webhooks secret: `whsec_` followed by the base64-encoded key. Example: `"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"`. |
1153
1559
 
1154
1560
  ### WebhookEvent
1155
1561
 
1156
- Body of every webhook delivery. Timestamps in the body (`created_at`, and the `*_at` fields of `subject`/`object`)
1157
- are Unix timestamps in seconds. `subject` and `object` are serialized from their current state when the delivery
1158
- is sent.
1562
+ Body of every webhook delivery. Timestamps in the body (`created_at`, and the `*_at` fields of `subject`/`object`) are Unix timestamps in seconds, not the ISO strings the REST responses use. `subject` and `object` are serialized from their current state when the delivery is sent.
1159
1563
 
1160
- | Property | Type | Required | Nullable | Constraints / description |
1161
- | --- | --- | --- | --- | --- |
1162
- | `id` | integer | Yes | No | ID of the activity that produced the event. Deduplicate on the `webhook-id` header instead. |
1163
- | `event` | string | Yes | No | Event type. See `GET /v1/webhooks/event-types`. |
1164
- | `message` | string | No | Yes | Reserved; currently always `null`. |
1165
- | `payload` | object | No | Yes | Event-specific parameters; keys vary per event. |
1166
- | `origin` | object | No | Yes | Where the action came from, when triggered by a request. |
1167
- | `origin.ip` | string | No | No | — |
1168
- | `origin.user-agent` | string | No | No | — |
1169
- | `created_at` | integer | Yes | No | When the event was recorded (Unix timestamp, seconds). |
1170
- | `subject` | object | Yes | No | Who performed the action: a `User`, `Signer`, or `Account`, plus a `type` property naming it. |
1171
- | `object` | object | Yes | No | What the action was performed on: a `Document`, `Signer`, or `Template` with its relations expanded, plus a `type` property naming it. |
1172
- | `account_id` | string | Yes | No | ID of the account that owns the event. |
1564
+ | Property | Type | Description |
1565
+ | --- | --- | --- |
1566
+ | `id` * | integer | ID of the activity that produced the event. Example: `184467`. |
1567
+ | `event` * | string | Event type. See **List webhook event types**; `webhook_test` is sent only by **Send a test delivery**. Example: `"signer_viewed_document"`. |
1568
+ | `message` | string or null | Reserved; currently always `null`. Example: `null`. |
1569
+ | `payload` | object or null | Event-specific parameters; keys vary per event. |
1570
+ | `origin` | object { `ip`: string; `user-agent`: string } | Where the action came from, when it was triggered by a request. |
1571
+ | `origin.ip` | string | Example: `"203.0.113.7"`. |
1572
+ | `origin.user-agent` | string | Example: `"Mozilla/5.0"`. |
1573
+ | `created_at` * | integer | When the event was recorded (Unix timestamp, seconds). Example: `1790000000`. |
1574
+ | `subject` * | object | Who performed the action: a `User`, `Signer` or `Account` (the endpoint itself in a `webhook_test`), plus a `type` property naming it. |
1575
+ | `object` * | object | What the action was performed on: a `Document`, `Signer` or `Template` with its relations expanded (the endpoint itself in a `webhook_test`), plus a `type` property naming it. |
1576
+ | `account_id` * | string | ID of the account that owns the event. Example: `"65f1c2a9b3e4d5f6"`. |
1173
1577
 
1174
1578
  ### WebhookEventType
1175
1579
 
1176
1580
  A subscribable webhook event type.
1177
1581
 
1178
- | Property | Type | Required | Nullable | Constraints / description |
1179
- | --- | --- | --- | --- | --- |
1180
- | `id` | string | No | No | Event type code. |
1181
- | `description` | string | No | No | When the event is triggered. |
1582
+ | Property | Type | Description |
1583
+ | --- | --- | --- |
1584
+ | `id` | string | Event type code. Example: `"document_ready"`. |
1585
+ | `description` | string | When the event is triggered. Example: `"Triggered when the last Signer of the assignment signs the Document."`. |
1182
1586
 
1183
1587
  ### WebhookSubscription
1184
1588
 
1185
- An account's webhook subscription configuration: the account's oldest webhook endpoint.
1589
+ An account's webhook subscription configuration.
1186
1590
 
1187
- | Property | Type | Required | Nullable | Constraints / description |
1188
- | --- | --- | --- | --- | --- |
1189
- | `events` | Array<string> | No | No | Event types subscribed for delivery. |
1190
- | `is_active` | boolean | No | No | Whether webhook delivery is active. |
1191
- | `is_held` | boolean | No | No | Whether deliveries are paused after repeated failures. |
1192
- | `held_since` | integer | No | Yes | Unix timestamp when the pause began; null while deliveries run. |
1193
- | `url` | string | No | Yes | Webhook endpoint URL. |
1194
- | `email` | string | No | Yes | Contact email for delivery notices. |
1195
- | `updated_at` | string (date-time) | No | Yes | — |
1591
+ | Property | Type | Description |
1592
+ | --- | --- | --- |
1593
+ | `events` | Array<string> | Event types subscribed for delivery. Example: `["document_ready","document_prepared"]`. |
1594
+ | `is_active` | boolean | Whether webhook delivery is active. Example: `true`. |
1595
+ | `is_held` | boolean | Whether deliveries are paused after 10 failures in a row (see **Delivery contract**). Example: `false`. |
1596
+ | `held_since` | integer or null | When the pause began (Unix timestamp, seconds); `null` while deliveries run. Example: `null`. |
1597
+ | `url` | string or null | Webhook endpoint URL; `https` is required for a new or changed URL. Example: `"https://example.com?test=1"`. |
1598
+ | `email` | string or null | Contact email for delivery notices. Example: `"signer@example.com"`. |
1599
+ | `updated_at` | string or null (format: date-time) | Example: `"2023-05-10T14:58:24Z"`. |
1196
1600
 
1197
1601
  ### WhatsappNotification
1198
1602
 
1199
1603
  A rendered WhatsApp notification sent for an assignment, split into header/body/buttons as the signer would see them.
1200
1604
 
1201
- | Property | Type | Required | Nullable | Constraints / description |
1202
- | --- | --- | --- | --- | --- |
1203
- | `sent_at` | string (date-time) | No | No | When the message was sent. |
1204
- | `header` | string | No | No | — |
1205
- | `body` | string | No | No | — |
1206
- | `buttons` | Array<object> | No | No | — |
1207
- | `buttons[].text` | string | No | No | The button label shown to the signer. |
1208
- | `phone_number` | string | No | No | Recipient phone (E.164). |
1209
- | `signer_id` | string | No | No | — |
1605
+ | Property | Type | Description |
1606
+ | --- | --- | --- |
1607
+ | `sent_at` | string (format: date-time) | When the message was sent. Example: `"2026-07-07T12:00:00Z"`. |
1608
+ | `header` | string | Example: `"Documento para assinatura: Contrato de Servico"`. |
1609
+ | `body` | string | |
1610
+ | `buttons` | Array<object { `text`: string }> | |
1611
+ | `buttons[].text` | string | The button label shown to the signer. Example: `"Abrir documento"`. |
1612
+ | `phone_number` | string | Recipient phone (E.164). Example: `"+5511999990001"`. |
1613
+ | `signer_id` | string | Example: `"a51edaee68a7"`. |
1614
+
1615
+ ### ScheduledSend
1616
+
1617
+ A **Create assignment** or **Create envelope** request kept until `send_at`, then made as that route makes it, by the member who scheduled it. Available on staging.
1618
+
1619
+ | Property | Type | Description |
1620
+ | --- | --- | --- |
1621
+ | `resource` | string | |
1622
+ | `id` * | string | |
1623
+ | `type` * | string (`"assignment"`, `"envelope"`) | What it creates. |
1624
+ | `document_ids` * | Array<string> | The documents it sends: one for an assignment, the envelope's for an envelope. A deleted document is left out. |
1625
+ | `status` * | string (`"pending"`, `"processing"`, `"sent"`, `"cancelled"`, `"failed"`) | `pending` until `send_at` (or **Send a scheduled send now**); `processing` while its request is being made; then `sent` (the request was made; its invitations go out right after), `failed` or, if cancelled while pending, `cancelled`. A send whose run was interrupted while `processing` made nothing, and fails within about an hour. |
1626
+ | `send_at` * | string (format: date-time) | |
1627
+ | `assignment_id` * | string or null | The assignment it created, once an `assignment` is `sent`. |
1628
+ | `envelope_id` * | string or null | The envelope it created, once an `envelope` is `sent`; `null` again once the envelope is deleted. |
1629
+ | `failure_reason` * | string or null | Why it was not sent, once `failed`: the refusal the create route answered then (no documents or credits left, a signer removed, the document already sent, the plan without Envelopes), that the workspace is being deleted, or that the member who scheduled it left the workspace. Written in Portuguese. |
1630
+ | `created_at` * | string (format: date-time) | |
1631
+ | `processed_at` * | string or null (format: date-time) | When it was sent, failed or cancelled. |