assinafy 2.1.0 → 2.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.en.md +177 -29
- data/README.md +112 -1079
- data/docs/API_REFERENCE.md +993 -665
- data/lib/assinafy/client.rb +3 -0
- data/lib/assinafy/errors.rb +3 -2
- data/lib/assinafy/resources/account_resource.rb +191 -3
- data/lib/assinafy/resources/assignment_resource.rb +147 -23
- data/lib/assinafy/resources/base_resource.rb +35 -1
- data/lib/assinafy/resources/contract_resource.rb +14 -5
- data/lib/assinafy/resources/document_resource.rb +99 -31
- data/lib/assinafy/resources/envelope_resource.rb +312 -0
- data/lib/assinafy/resources/field_resource.rb +4 -3
- data/lib/assinafy/resources/oauth_resource.rb +6 -0
- data/lib/assinafy/resources/signer_document_resource.rb +93 -26
- data/lib/assinafy/resources/signer_resource.rb +66 -32
- data/lib/assinafy/resources/tag_resource.rb +5 -1
- data/lib/assinafy/resources/user_resource.rb +47 -13
- data/lib/assinafy/resources/webhook_resource.rb +38 -6
- data/lib/assinafy/utils.rb +17 -0
- data/lib/assinafy/version.rb +1 -1
- data/lib/assinafy.rb +1 -0
- data/sig/assinafy.rbs +55 -14
- metadata +2 -1
data/docs/API_REFERENCE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Assinafy Ruby SDK API Reference
|
|
2
2
|
|
|
3
|
-
> Contract source: Assinafy API v1 OpenAPI 3.1.0, retrieved 2026-
|
|
4
|
-
> `https://api.assinafy.com.br/v1/docs/openapi.json` (
|
|
3
|
+
> Contract source: Assinafy API v1 OpenAPI 3.1.0, retrieved 2026-11-11 from
|
|
4
|
+
> `https://api.assinafy.com.br/v1/docs/openapi.json` (112 paths, 147 operations, 62 schemas).
|
|
5
5
|
> `scripts/check_api_contract.rb` validates contract compatibility weekly.
|
|
6
6
|
|
|
7
7
|
This is the SDK-facing contract reference. Paths below are wire paths; Ruby methods return the unwrapped
|
|
@@ -31,8 +31,8 @@ Required parameters and object properties are marked with `*`.
|
|
|
31
31
|
- `POST /v1/login` answers with an `mfa_token` challenge instead of an access token when the user has two-factor
|
|
32
32
|
authentication enabled. `AuthResource#verify_mfa` exchanges it, without workspace credentials; the challenge is
|
|
33
33
|
single-use and expires 5 minutes after login.
|
|
34
|
-
- Webhook endpoint signing secrets (`whsec_...`) are readable
|
|
35
|
-
|
|
34
|
+
- Webhook endpoint signing secrets (`whsec_...`) are readable only with an API key or user session.
|
|
35
|
+
OAuth applications with `webhooks:write` can rotate secrets and must store the returned value. Treat them like API keys. Verify every delivery with
|
|
36
36
|
`WebhookVerifier#verify_delivery` against the raw request body.
|
|
37
37
|
- HTTP connections require TLS 1.2 or newer and use Ruby/Faraday TLS verification and the host system trust store;
|
|
38
38
|
the SDK does not pin the upstream TLS certificate.
|
|
@@ -44,124 +44,153 @@ Required parameters and object properties are marked with `*`.
|
|
|
44
44
|
|
|
45
45
|
| Method | Path | Ruby SDK method | Authentication | Parameters | Request body | Success wire response |
|
|
46
46
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
47
|
-
| GET |
|
|
48
|
-
|
|
|
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) } |
|
|
47
|
+
| 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) } |
|
|
48
|
+
| 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
49
|
| 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}/
|
|
54
|
-
| GET | `/v1/accounts/{accountId}/
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| GET | `/v1/
|
|
50
|
+
| 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) } |
|
|
51
|
+
| 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) } |
|
|
52
|
+
| GET | `/v1/accounts/{accountId}/logo` | `AccountResource#download_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `image/*` string (format: binary) |
|
|
53
|
+
| 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) |
|
|
54
|
+
| DELETE | `/v1/accounts/{accountId}/logo` | `AccountResource#delete_logo` | Bearer token or `X-Api-Key` | path `accountId*`: string | None | `200` `application/json` [`Envelope`](#envelope) |
|
|
55
|
+
| GET | `/v1/accounts` | `AccountResource#list` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Account`](#account)> } |
|
|
56
|
+
| 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) } |
|
|
57
|
+
| 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)> } |
|
|
58
|
+
| 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)> } |
|
|
59
|
+
| 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 }>; `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) } |
|
|
60
|
+
| 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"`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)> }>; `entries`: Array<object> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
|
|
61
|
+
| 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 } } |
|
|
62
|
+
| 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) } |
|
|
63
|
+
| 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) } |
|
|
64
|
+
| 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) } |
|
|
65
|
+
| 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)<br>`image/png` string (format: binary)<br>`application/pdf` string (format: binary) |
|
|
66
|
+
| 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) } |
|
|
67
|
+
| 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) } |
|
|
68
|
+
| 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) } } |
|
|
69
|
+
| 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) } } |
|
|
70
|
+
| 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) } } |
|
|
71
|
+
| 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) } |
|
|
72
|
+
| 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)> } |
|
|
73
|
+
| 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) } |
|
|
74
|
+
| 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) } |
|
|
75
|
+
| 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) } |
|
|
76
|
+
| 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) } |
|
|
77
|
+
| 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) } |
|
|
78
|
+
| 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)> } |
|
|
79
|
+
| 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) } |
|
|
80
|
+
| 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)> } |
|
|
81
|
+
| 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)> } |
|
|
82
|
+
| GET | `/v1/documents/{documentId}` | `DocumentResource#details` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `documentId*`: string<br>query `expand`: Array<string (`"envelope_id"`, `"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
|
|
83
|
+
| 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> } |
|
|
84
|
+
| 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) } |
|
|
85
|
+
| GET | `/v1/documents/{documentId}/download/{artifactName}` | `DocumentResource#download` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `documentId*`: string<br>path `artifactName*`: string (`"original"`, `"certificated"`, `"certificate-page"`, `"pades"`, `"bundle"`) | None | `200` `application/pdf` string (format: binary) |
|
|
86
|
+
| GET | `/v1/documents/{documentSignatureHash}/verify` | `DocumentResource#verify` | Public | path `documentSignatureHash*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentVerification`](#documentverification) } |
|
|
62
87
|
| 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
88
|
| 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
89
|
| 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
90
|
| 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 } } |
|
|
91
|
+
| 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)> } |
|
|
92
|
+
| 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) } |
|
|
93
|
+
| 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) } |
|
|
94
|
+
| 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> } |
|
|
95
|
+
| 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) } |
|
|
96
|
+
| 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) } |
|
|
97
|
+
| 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)> } |
|
|
98
|
+
| 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) } |
|
|
99
|
+
| 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) } |
|
|
100
|
+
| 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) } |
|
|
101
|
+
| 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> } |
|
|
102
|
+
| 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> (min items: 1) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentEnvelope`](#documentenvelope) } |
|
|
103
|
+
| 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)> } |
|
|
104
|
+
| 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) |
|
|
105
|
+
| 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 }> } |
|
|
106
|
+
| 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 } } |
|
|
107
|
+
| 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) } |
|
|
108
|
+
| 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
109
|
| 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
|
-
| 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; `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)> } |
|
|
110
|
+
| 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) } |
|
|
69
111
|
| 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
|
-
| 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; `is_active`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Field`](#field) } |
|
|
112
|
+
| 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
113
|
| 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
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
114
|
+
| POST | `/v1/accounts/{accountId}/fields/{fieldId}/validate` | `FieldResource#validate` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `accountId*`: string<br>path `fieldId*`: string | required; `application/json` object { `value*`: any } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`FieldValidation`](#fieldvalidation) } |
|
|
115
|
+
| POST | `/v1/accounts/{accountId}/fields/validate-multiple` | `FieldResource#validate_multiple` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `accountId*`: string | required; `application/json` Array<object { `field_id*`: string; `value*`: any }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldValidationResult`](#fieldvalidationresult)> } |
|
|
116
|
+
| 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)> } |
|
|
117
|
+
| 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 } } |
|
|
118
|
+
| 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 } } |
|
|
119
|
+
| 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> } } |
|
|
120
|
+
| 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> } } |
|
|
121
|
+
| 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 } } |
|
|
122
|
+
| 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) } |
|
|
123
|
+
| 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) } |
|
|
124
|
+
| 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) } |
|
|
125
|
+
| 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) } |
|
|
126
|
+
| POST | `/v1/oauth/token` | `OAuthResource#token` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthTokenRequest`](#oauthtokenrequest)<br>`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 } |
|
|
127
|
+
| POST | `/v1/oauth/revoke` | `OAuthResource#revoke` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthRevokeRequest`](#oauthrevokerequest)<br>`application/json` [`OAuthRevokeRequest`](#oauthrevokerequest) | `200` Revoked |
|
|
128
|
+
| 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 } |
|
|
129
|
+
| GET | `/v1/documents/{documentId}/thumbnail` | `DocumentResource#thumbnail` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `documentId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
|
|
130
|
+
| GET | `/v1/documents/{documentId}/pages/{pageId}/download` | `DocumentResource#download_page` | Bearer token or `X-Api-Key` or `signer-access-code` query | path `documentId*`: string<br>path `pageId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
|
|
131
|
+
| GET | `/v1/public/documents/{documentId}` | `DocumentResource#public_info` | Public | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
|
|
132
|
+
| 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 } } |
|
|
133
|
+
| 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) } |
|
|
134
|
+
| 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) } |
|
|
135
|
+
| 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)> } |
|
|
136
|
+
| 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
137
|
| 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) } |
|
|
138
|
+
| 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
139
|
| 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/
|
|
140
|
+
| GET | `/v1/signers/self` | `SignerResource#self_data` | `signer-access-code` query | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerSelf`](#signerself) } |
|
|
141
|
+
| GET | `/v1/sign/theme` | `SignerResource#theme` | `signer-access-code` query | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountTheme`](#accounttheme) } |
|
|
142
|
+
| GET | `/v1/sign/logo` | `SignerResource#download_logo` | `signer-access-code` query | None | None | `200` `image/*` string (format: binary) |
|
|
143
|
+
| GET | `/v1/signers/identity-verification` | `SignerResource#identity_verification` | `signer-access-code` query | 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) } } |
|
|
144
|
+
| POST | `/v1/signers/identity-verification` | `SignerResource#start_identity_verification` | `signer-access-code` query | 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) } } |
|
|
145
|
+
| GET | `/v1/signers/{signerId}/document` | `SignerDocumentResource#current` | `signer-access-code` query | path `signerId*`: string<br>query `expand`: Array<string (`"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SigningDocument`](#signingdocument) } |
|
|
146
|
+
| GET | `/v1/sign` | `AssignmentResource#signer_document` | `signer-access-code` query | 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) } |
|
|
147
|
+
| POST | `/v1/documents/{documentId}/assignments/{assignmentId}` | `AssignmentResource#sign` | `signer-access-code` query | 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 } |
|
|
148
|
+
| PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reject` | `AssignmentResource#decline` | `signer-access-code` query | 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> } |
|
|
149
|
+
| PUT | `/v1/signers/documents/sign-multiple` | `SignerDocumentResource#sign_multiple` | `signer-access-code` query | None | required; `application/json` object { `document_ids*`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
|
|
150
|
+
| PUT | `/v1/signers/documents/decline-multiple` | `SignerDocumentResource#decline_multiple` | `signer-access-code` query | 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> } |
|
|
151
|
+
| POST | `/v1/verify` | `SignerResource#verify_email` | `signer-access-code` query | None | required; `application/json` object { `verification-code*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
|
|
152
|
+
| PUT | `/v1/documents/{documentId}/signers/confirm-data` | `SignerResource#confirm_data` | `signer-access-code` query | 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> } |
|
|
153
|
+
| PUT | `/v1/signers/accept-terms` | `SignerResource#accept_terms` | `signer-access-code` query | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `full_name*`: string; `email*`: string or null (format: email); `has_accepted_terms*`: boolean } } |
|
|
154
|
+
| POST | `/v1/signature` | `SignerResource#upload_signature` | `signer-access-code` query | query `type`: string<br>query `reuse`: boolean | required; `image/png` string (format: binary) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
|
|
155
|
+
| GET | `/v1/signature/{signatureType}` | `SignerResource#download_signature` | `signer-access-code` query | path `signatureType*`: string | None | `200` `image/*` string (format: binary) |
|
|
156
|
+
| GET | `/v1/signers/{signerId}/documents` | `SignerDocumentResource#list` | `signer-access-code` query 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)> } |
|
|
157
|
+
| GET | `/v1/signers/{signerId}/documents/search` | `SignerDocumentResource#search` | `signer-access-code` query 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)> } |
|
|
158
|
+
| GET | `/v1/signers/{signerId}/documents/{documentId}/download/{artifactName}` | `SignerDocumentResource#download` | `signer-access-code` query | path `signerId*`: string<br>path `documentId*`: string<br>path `artifactName*`: string (`"original"`) | None | `200` `application/pdf` string (format: binary) |
|
|
159
|
+
| POST | `/v1/sign/certified-copy` | `SignerDocumentResource#send_certified_copy` | `signer-access-code` query | 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 } } |
|
|
160
|
+
| GET | `/v1/signers/downloads/{token}` | `SignerDocumentResource#download_certified_copy` | Public | path `token*`: string | None | `200` `application/pdf` string (format: binary) |
|
|
161
|
+
| 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 } } |
|
|
162
|
+
| 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) } |
|
|
163
|
+
| 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) |
|
|
164
|
+
| 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)> } |
|
|
165
|
+
| 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
166
|
| 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`: string } | `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`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Tag`](#tag) } |
|
|
167
|
+
| 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) } |
|
|
168
|
+
| 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
169
|
| 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
|
|
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/
|
|
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) |
|
|
170
|
+
| 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)> } |
|
|
171
|
+
| 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) } |
|
|
172
|
+
| 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) } |
|
|
173
|
+
| 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
174
|
| 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) } |
|
|
175
|
+
| 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
176
|
| 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/
|
|
155
|
-
|
|
|
156
|
-
|
|
|
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 | 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) |
|
|
177
|
+
| 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) } |
|
|
178
|
+
| 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) } |
|
|
179
|
+
| 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
180
|
| 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)> } |
|
|
181
|
+
| 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)> } |
|
|
182
|
+
| 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) } |
|
|
183
|
+
| 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)> } |
|
|
184
|
+
| 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 } } |
|
|
185
|
+
| 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> } |
|
|
186
|
+
| 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) } |
|
|
187
|
+
| 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 } } |
|
|
188
|
+
| 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> } |
|
|
189
|
+
| 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) } |
|
|
190
|
+
| 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) } } |
|
|
191
|
+
| 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) } |
|
|
192
|
+
| 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> } |
|
|
193
|
+
| 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)> } |
|
|
165
194
|
|
|
166
195
|
## Error responses
|
|
167
196
|
|
|
@@ -200,7 +229,9 @@ raise `Assinafy::ApiError`:
|
|
|
200
229
|
- `status_code` contains the HTTP or envelope status.
|
|
201
230
|
- `message` uses the API's `message`, `error`, or `name` value.
|
|
202
231
|
- `response_data` preserves the parsed response body.
|
|
203
|
-
- `error_name`
|
|
232
|
+
- `error_name` exposes `name`; `error_code` exposes numeric framework codes or actionable codes such as
|
|
233
|
+
`PlanRestricted`, `InsufficientScope`, `CreditCeilingExceeded`, `DocumentNotReady` and `ContractChanged`.
|
|
234
|
+
`response_data['errors']` preserves field-level `{ field, code, message }` entries.
|
|
204
235
|
- `context` contains `status_code` and `response_data` for structured logging or support diagnostics, plus
|
|
205
236
|
`www_authenticate` when the response carries that header.
|
|
206
237
|
- `rate_limit` returns `{ limit:, remaining:, reset: }` from the `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`
|
|
@@ -273,7 +304,7 @@ require `documents:write`.
|
|
|
273
304
|
### KPI statistics
|
|
274
305
|
|
|
275
306
|
`UserResource#stats` and `AccountResource#stats` validate `granularity` (`monthly` or `daily`) and `month`
|
|
276
|
-
(`YYYY-MM`) locally before sending.
|
|
307
|
+
(`YYYY-MM`) locally before sending. Daily statistics require `month`.
|
|
277
308
|
|
|
278
309
|
### OAuth response shapes
|
|
279
310
|
|
|
@@ -364,7 +395,8 @@ names from its `images` with `identity_review_image`, and submit `decide_identit
|
|
|
364
395
|
or `decision: 'Rejected'` while the document is pending_signature or pending_identity_review. Rejection cancels
|
|
365
396
|
the document and notifies signers and copy receivers. Optional `note:` (at most 2000 characters) is recorded in
|
|
366
397
|
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.
|
|
398
|
+
available only during InReview, and must not be cached. Evidence images and decisions require an API key or user session; third-party OAuth applications
|
|
399
|
+
can read the review summary with `documents:read`, but cannot fetch images or decide it. The review retains summaries, with `evidence_available`
|
|
368
400
|
false when none is retained or fetched. Direct approvals expose evidence through the signer_identity_verified
|
|
369
401
|
activity instead. Observe signer_identity_review_required, signer_identity_review_approved,
|
|
370
402
|
signer_identity_review_rejected, signer_identity_verified and signer_identity_verification_failed events.
|
|
@@ -373,8 +405,8 @@ signer_identity_review_rejected, signer_identity_verified and signer_identity_ve
|
|
|
373
405
|
|
|
374
406
|
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
407
|
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
|
|
377
|
-
|
|
408
|
+
`signing_enabled: true` returns a `secret` once: store it immediately. OAuth apps cannot read it later, but can rotate it with `webhooks:write`;
|
|
409
|
+
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
410
|
`#delete_endpoint_by_url(registered_url)` deletes that endpoint, returning `nil`. `WebhookResource#create_endpoint`
|
|
379
411
|
and `#update_endpoint` accept only `url`, `email`, `events`, `name`, `is_active`, and `signing_enabled`.
|
|
380
412
|
`#register`, `#get`, and `#inactivate` (`/webhooks/subscriptions`, `/webhooks/inactivate`) act on the account's
|
|
@@ -384,8 +416,9 @@ link-local, and other reserved destination addresses.
|
|
|
384
416
|
|
|
385
417
|
Each delivery is a JSON `POST` carrying `webhook-id` (stable across attempts of one event to one endpoint; use it to
|
|
386
418
|
deduplicate), `webhook-timestamp` (Unix seconds), and, when signing is enabled, `webhook-signature`. Any `2xx` is
|
|
387
|
-
success. An event gets up to
|
|
388
|
-
|
|
419
|
+
success. An event gets up to 6 attempts, about 10 minutes apart, for network failures, timeouts, `408`, `429` or `5xx`;
|
|
420
|
+
other failures are final. After 10 failed deliveries the endpoint pauses. Probes run after 3 minutes, then 15,
|
|
421
|
+
then 60, then every 6 hours; success resumes delivery of missed events oldest first. `WebhookResource#retry_dispatch` forces a
|
|
389
422
|
redelivery, and `#list_dispatches` filters by `endpoint_id`. The body is a [`WebhookEvent`](#webhookevent).
|
|
390
423
|
|
|
391
424
|
Signatures follow the [Standard Webhooks](https://www.standardwebhooks.com) specification: `webhook-signature`
|
|
@@ -396,6 +429,58 @@ seconds from `now`. It accepts Rails `request.headers`, a Rack env (`HTTP_WEBHOO
|
|
|
396
429
|
returns `false` rather than raising. `WebhookVerifier#verify(raw_body, hex_signature)` remains for receivers whose
|
|
397
430
|
own gateway signs bodies with a hex HMAC-SHA256.
|
|
398
431
|
|
|
432
|
+
### Envelopes, embedding and downloads
|
|
433
|
+
|
|
434
|
+
`client.envelopes` groups up to 20 existing processed documents and 20 signers. Create with `name`,
|
|
435
|
+
`signers: [{ id: ... }]` and `documents: [{ id: ..., signer_ids: [...] }]`; each document retains its own
|
|
436
|
+
assignment and status. Every listed signer must be on a document. Certificate signers are alone on each of their
|
|
437
|
+
virtual documents; collect documents require positioned fields for exactly their `signer_ids`.
|
|
438
|
+
`estimate_cost` checks the same body without sending or charging. `create(..., idempotency_key:)` deduplicates
|
|
439
|
+
lost-response retries within the workspace. Keep the key for that logical creation; deleting the envelope also
|
|
440
|
+
removes its idempotency result. `max_total_credits` belongs on the envelope creation body, or on `add_document`;
|
|
441
|
+
it is not a per-document creation field. `update(message: nil)` clears the message; `document_ids` reorders all
|
|
442
|
+
its documents. Cancel notifies recipients, remove-document cancels that open document, and delete requires the
|
|
443
|
+
envelope to be closed and preserves its documents. Downloads return ZIP bytes.
|
|
444
|
+
|
|
445
|
+
Embedded signing requires the Embed feature and API-key/user-session authentication; third-party OAuth cannot
|
|
446
|
+
manage origins or create sessions. Register exact origins through `accounts.create_embed_origin`, mark an
|
|
447
|
+
Email/Whatsapp signer `embedded: true`, then call `assignments.create_embed_session`. Load its returned URL in
|
|
448
|
+
an iframe within five minutes. `exchange_embed_session` is normally called by Assinafy's embed page; its token
|
|
449
|
+
is consumed even on a `409`. It sends no workspace credentials and is never retried by the SDK.
|
|
450
|
+
|
|
451
|
+
`signer_documents.download` requires `signer_access_code:` and defaults to `original`; the published route serves
|
|
452
|
+
only the original while the code is active. Explicit historical artifact arguments remain accepted by the SDK,
|
|
453
|
+
with the API deciding availability. Use `send_certified_copy` to send a fresh link to the signing contact,
|
|
454
|
+
`download_certified_copy` for PDF bytes (optional `pades: true`), and `resend_certified_copy` for an expired link.
|
|
455
|
+
No workspace credentials are sent. Download links last seven days initially and 30 minutes when resent;
|
|
456
|
+
expired-link `302` responses raise `ApiError` and are not followed. The signing code closes 30 minutes after the
|
|
457
|
+
signer finishes all their documents. Signing summary/branding and certified-copy delivery remain available;
|
|
458
|
+
other signer calls can answer `410`.
|
|
459
|
+
|
|
460
|
+
### Templates and spending limits
|
|
461
|
+
|
|
462
|
+
`documents.create_from_template` accepts a role's existing signer `id`, or `email` with an optional `name` and
|
|
463
|
+
WhatsApp number to reuse/create the signer. A copy receiver's method and step are ignored upstream. Editor
|
|
464
|
+
fields need non-empty values. Creation returns an uploaded document with `assignment: nil`; follow document
|
|
465
|
+
status or webhooks until `pending_signature` or `failed`. `wait_until_ready` waits for document metadata and may
|
|
466
|
+
return before a template's assignment exists. Pass `idempotency_key` in the payload or options Hash (options take precedence) to avoid
|
|
467
|
+
creating duplicate documents. Assignment, template and envelope creation accept `max_total_credits`; a price
|
|
468
|
+
above it answers `409` with `CreditCeilingExceeded`. Template processing may fail later if the cost increases,
|
|
469
|
+
without charging. `accounts.usage` reports balances and `accounts.get(expand: 'signing_features')` reports the
|
|
470
|
+
available signing features. Usage is not available to third-party OAuth apps.
|
|
471
|
+
|
|
472
|
+
### Notifications and document reads
|
|
473
|
+
|
|
474
|
+
`users.push_preferences` and `update_push_preferences` manage eight personal phone-push flags, independently of
|
|
475
|
+
email preferences. `accounts.notification_policy` reads workspace event rules; owners change partial rules with
|
|
476
|
+
`update_notification_policy`. OAuth applications cannot access these personal/workspace notification settings.
|
|
477
|
+
`webhooks.test_endpoint` sends an actual test delivery, even to a paused or inactive endpoint.
|
|
478
|
+
|
|
479
|
+
`documents.details/get(..., expand:)` accepts `envelope_id` and `envelope`; list/search accept `envelope_id`.
|
|
480
|
+
`thumbnail` and `download_page` accept `artifact: 'certificated'` for signed renders, which must not be cached.
|
|
481
|
+
Document activities accept sort/page/per_page; `activities` preserves the Array return, and `activities_page`
|
|
482
|
+
returns pagination metadata. Envelope activities are always paginated.
|
|
483
|
+
|
|
399
484
|
## SDK-only helpers and aliases
|
|
400
485
|
|
|
401
486
|
These public functions do not map one-to-one to an API operation. Their source comments provide parameter,
|
|
@@ -408,10 +493,11 @@ return-value, and usage details.
|
|
|
408
493
|
| `Assinafy::Client.from_config`, `.from_hash` | Construct a client from string- or symbol-keyed configuration. | [`client.rb`](../lib/assinafy/client.rb) |
|
|
409
494
|
| `Client#faraday_connection` | Return the configured Faraday connection for advanced integration. | [`client.rb`](../lib/assinafy/client.rb) |
|
|
410
495
|
| `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) |
|
|
496
|
+
| `Client#auth`, `#oauth`, `#accounts`, `#users`, `#documents`, `#contracts`, `#signers`, `#signer_documents`, `#assignments`, `#envelopes`, `#webhooks`, `#templates`, `#fields`, `#tags`, `#webhook_verifier` | Return the client's resource and helper instances. | [`client.rb`](../lib/assinafy/client.rb) |
|
|
412
497
|
| `Assinafy::Configuration.new`, `.from_hash` | Build configuration directly or from string/symbol keys. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
|
|
413
498
|
| `Configuration#auth_headers` | Return the selected API-key, bearer, or empty authentication header set. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
|
|
414
499
|
| 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) |
|
|
500
|
+
| `DocumentResource#activities_page` | Read activities with pagination metadata; `#activities` retains its Array return. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
|
|
415
501
|
| `DocumentResource#get` | Alias for `#details`. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
|
|
416
502
|
| `DocumentResource#wait_until_ready` | Poll document details until processing succeeds, fails, or times out. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
|
|
417
503
|
| `DocumentResource#fully_signed?`, `#signing_progress` | Derive completion state from document assignment data. | [`document_resource.rb`](../lib/assinafy/resources/document_resource.rb) |
|
|
@@ -433,7 +519,7 @@ return-value, and usage details.
|
|
|
433
519
|
| `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
520
|
| `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
521
|
| `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) |
|
|
522
|
+
| `Assinafy::Utils.handle_assinafy_response`, `.clean_params`, `.query_params`, `.body_params`, `.require_email`, `.require_expiration`, `.require_credit_ceiling`, `.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
523
|
| `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
524
|
| `Assinafy::VERSION` | Published SDK version constant. | [`version.rb`](../lib/assinafy/version.rb) |
|
|
439
525
|
| `Assinafy::USER_AGENT` | Version-derived `Assinafy-Ruby-SDK/v[VERSION]` request identifier. | [`version.rb`](../lib/assinafy/version.rb) |
|
|
@@ -445,765 +531,1007 @@ The schema catalog below describes the published response objects and their nest
|
|
|
445
531
|
|
|
446
532
|
## Schema catalog
|
|
447
533
|
|
|
448
|
-
|
|
449
|
-
schema; operation-specific requirements and grant-specific OAuth requirements still apply.
|
|
534
|
+
All 62 published schemas are listed below. `*` marks required properties. Nested fields are listed with dot notation; links identify reusable schemas. Examples use placeholder contacts.
|
|
450
535
|
|
|
451
536
|
### Account
|
|
452
537
|
|
|
453
538
|
A workspace account (organization).
|
|
454
539
|
|
|
455
|
-
| Property | Type |
|
|
456
|
-
| --- | --- | --- |
|
|
457
|
-
| `resource` | string |
|
|
458
|
-
| `id` | string |
|
|
459
|
-
| `name` | string |
|
|
460
|
-
| `primary_color` | string
|
|
461
|
-
| `secondary_color` | string
|
|
462
|
-
| `notification_sender_type` | string
|
|
463
|
-
| `roles` | Array<string> |
|
|
464
|
-
| `is_delete_allowed` | boolean |
|
|
465
|
-
| `limits` | object
|
|
466
|
-
| `limits.webhook_endpoints` | integer |
|
|
467
|
-
| `
|
|
540
|
+
| Property | Type | Description |
|
|
541
|
+
| --- | --- | --- |
|
|
542
|
+
| `resource` | string | Example: `"account"`. |
|
|
543
|
+
| `id` | string | Example: `"6401df46d6a6b0c692d9ec49"`. |
|
|
544
|
+
| `name` | string | Example: `"Acme Inc."`. |
|
|
545
|
+
| `primary_color` | string or null | Example: `"aabbcc"`. |
|
|
546
|
+
| `secondary_color` | string or null | Example: `"112233"`. |
|
|
547
|
+
| `notification_sender_type` | string (`"User"`, `"Account"`) | Example: `"User"`. |
|
|
548
|
+
| `roles` | Array<string> | Example: `["owner"]`. |
|
|
549
|
+
| `is_delete_allowed` | boolean | Example: `true`. |
|
|
550
|
+
| `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. |
|
|
551
|
+
| `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`. |
|
|
552
|
+
| `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. |
|
|
553
|
+
| `signing_features.DigitalCertificate` * | boolean | Signing with the signer's own ICP-Brasil certificate. Example: `true`. |
|
|
554
|
+
| `signing_features.VerificationIdDocumentFaceMatchBasic` * | boolean | Identity check by ID document and face match. Example: `false`. |
|
|
555
|
+
| `signing_features.WhatsappNotification` * | boolean | Sending signature requests by WhatsApp. Example: `true`. |
|
|
556
|
+
| `signing_features.VerificationBypass` * | boolean | Signing without a verification code (the `Bypass` verification method). Example: `false`. |
|
|
557
|
+
| `signing_features.Embed` * | boolean | Embedded signing: the signing screen inside your own app (see **Embedded Signing Guide**). Example: `false`. |
|
|
558
|
+
| `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
468
559
|
|
|
469
560
|
### AccountTheme
|
|
470
561
|
|
|
471
562
|
An account's branding theme.
|
|
472
563
|
|
|
473
|
-
| Property | Type |
|
|
474
|
-
| --- | --- | --- |
|
|
475
|
-
| `account_name` | string |
|
|
476
|
-
| `primary_color` | string |
|
|
477
|
-
| `secondary_color` | string |
|
|
478
|
-
| `logo` | string
|
|
564
|
+
| Property | Type | Description |
|
|
565
|
+
| --- | --- | --- |
|
|
566
|
+
| `account_name` | string | Example: `"Account Name"`. |
|
|
567
|
+
| `primary_color` | string | Button background: hex color without leading `#`. The platform default when the account set none. Example: `"aabbcc"`. |
|
|
568
|
+
| `secondary_color` | string | Button text: hex color without leading `#`. The platform default when the account set none. Example: `"ffffff"`. |
|
|
569
|
+
| `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"`. |
|
|
570
|
+
|
|
571
|
+
### AccountUsage
|
|
572
|
+
|
|
573
|
+
The workspace's plan and what is left of it.
|
|
574
|
+
|
|
575
|
+
| Property | Type | Description |
|
|
576
|
+
| --- | --- | --- |
|
|
577
|
+
| `plan` | string or null | The plan's name. `null` when the subscription has no plan or its plan was retired. Example: `"Pro"`. |
|
|
578
|
+
| `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"`. |
|
|
579
|
+
| `balances` | object { `documents`: [`Balance`](#balance); `credits`: [`Balance`](#balance) } | Document and credit balances, as in **Get current subscription**. |
|
|
580
|
+
| `balances.documents` | [`Balance`](#balance) | |
|
|
581
|
+
| `balances.credits` | [`Balance`](#balance) | |
|
|
479
582
|
|
|
480
583
|
### ApiKey
|
|
481
584
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
| Property | Type | Description |
|
|
588
|
+
| --- | --- | --- |
|
|
589
|
+
| `api_key` | string or null | Example: `"mIpe_zdJfKUpMK9Va3XuYgzPXMxz49fIaRCWXseVkpVAX608A9j3i_D67qU5qW3M"`. |
|
|
485
590
|
|
|
486
591
|
### Assignment
|
|
487
592
|
|
|
488
593
|
A request for signers to sign a document.
|
|
489
594
|
|
|
490
|
-
| Property | Type |
|
|
491
|
-
| --- | --- | --- |
|
|
492
|
-
| `resource` | string |
|
|
493
|
-
| `id` | string |
|
|
494
|
-
| `document_id` | string
|
|
495
|
-
| `created_at` | string (date-time) |
|
|
496
|
-
| `sender_email` | string (email) |
|
|
497
|
-
| `method` | string
|
|
498
|
-
| `expires_at` | string (date-time) |
|
|
499
|
-
| `message` | string
|
|
500
|
-
| `signers` | Array<[`AssignmentSigner`](#assignmentsigner)> |
|
|
501
|
-
| `copy_receivers` | Array<object> |
|
|
502
|
-
| `items` | Array<[`AssignmentItem`](#assignmentitem)> |
|
|
503
|
-
| `summary` | [`AssignmentSummary`](#assignmentsummary) |
|
|
504
|
-
| `signing_urls` | Array<[`SigningUrl`](#signingurl)> |
|
|
595
|
+
| Property | Type | Description |
|
|
596
|
+
| --- | --- | --- |
|
|
597
|
+
| `resource` | string | Example: `"assignment"`. |
|
|
598
|
+
| `id` | string | Example: `"615606ef81d199996981dbce"`. |
|
|
599
|
+
| `document_id` | string or null | The document this assignment belongs to. `null` only if the document was deleted. Example: `"615601fab04c0a3147bb1246"`. |
|
|
600
|
+
| `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
601
|
+
| `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"`. |
|
|
602
|
+
| `method` | string (`"virtual"`, `"collect"`) | Example: `"virtual"`. |
|
|
603
|
+
| `expires_at` | string or null (format: date-time) | Example: `null`. |
|
|
604
|
+
| `message` | string or null | |
|
|
605
|
+
| `signers` | Array<[`AssignmentSigner`](#assignmentsigner)> | |
|
|
606
|
+
| `copy_receivers` | Array<object> | |
|
|
607
|
+
| `items` | Array<[`AssignmentItem`](#assignmentitem)> | |
|
|
608
|
+
| `summary` | [`AssignmentSummary`](#assignmentsummary) | |
|
|
609
|
+
| `signing_urls` | Array<[`SigningUrl`](#signingurl)> | |
|
|
505
610
|
|
|
506
611
|
### AssignmentItem
|
|
507
612
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
|
511
|
-
|
|
|
512
|
-
| `
|
|
513
|
-
| `
|
|
514
|
-
| `
|
|
515
|
-
| `
|
|
516
|
-
| `
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
| Property | Type | Description |
|
|
616
|
+
| --- | --- | --- |
|
|
617
|
+
| `id` | string | |
|
|
618
|
+
| `page` | [`DocumentPage`](#documentpage) or null | |
|
|
619
|
+
| `signer` | object | Signer responsible for this item. |
|
|
620
|
+
| `field` | object or null | Field definition associated with the item. |
|
|
621
|
+
| `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. |
|
|
622
|
+
| `value` | any | Captured value when completed; `null` until then. |
|
|
623
|
+
| `completed` | boolean | |
|
|
517
624
|
|
|
518
625
|
### AssignmentSigner
|
|
519
626
|
|
|
520
627
|
A signer within an assignment: the base Signer plus per-assignment verification/notification details.
|
|
521
628
|
|
|
522
|
-
| Property | Type |
|
|
523
|
-
| --- | --- | --- |
|
|
524
|
-
| `resource` | string |
|
|
525
|
-
| `id` | string |
|
|
526
|
-
| `full_name` | string |
|
|
527
|
-
| `email` | string (email) |
|
|
528
|
-
| `whatsapp_phone_number` | string
|
|
529
|
-
| `
|
|
530
|
-
| `
|
|
531
|
-
| `
|
|
532
|
-
| `
|
|
533
|
-
| `
|
|
534
|
-
| `
|
|
535
|
-
| `
|
|
536
|
-
| `
|
|
537
|
-
| `
|
|
629
|
+
| Property | Type | Description |
|
|
630
|
+
| --- | --- | --- |
|
|
631
|
+
| `resource` | string | Present in single-resource responses. Example: `"signer"`. |
|
|
632
|
+
| `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
|
|
633
|
+
| `full_name` | string | Example: `"John Signer"`. |
|
|
634
|
+
| `email` | string or null (format: email) | Example: `"signer@example.com"`. |
|
|
635
|
+
| `whatsapp_phone_number` | string or null | E.164 format; normalized on save. Example: `"+5548999990000"`. |
|
|
636
|
+
| `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
|
|
637
|
+
| `has_accepted_terms` | boolean | Example: `false`. |
|
|
638
|
+
| `verification_method` | string or null | Example: `"Email"`. |
|
|
639
|
+
| `notification_methods` | array or null | Example: `["Email"]`. |
|
|
640
|
+
| `step` | integer or null | Sequential signing step (defaults to 1). Example: `1`. |
|
|
641
|
+
| `notified` | boolean or null | |
|
|
642
|
+
| `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"`. |
|
|
643
|
+
| `completed` | boolean or null | Only present in account-owner contexts. |
|
|
644
|
+
| `notification_history` | array or null | Per-channel delivery history for this signer (email + WhatsApp), most-recent send order. |
|
|
538
645
|
|
|
539
646
|
### AssignmentSummary
|
|
540
647
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
|
544
|
-
|
|
|
545
|
-
| `
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
| Property | Type | Description |
|
|
651
|
+
| --- | --- | --- |
|
|
652
|
+
| `signer_count` | integer | |
|
|
653
|
+
| `completed_count` | integer | |
|
|
654
|
+
| `signers` | Array<object> | |
|
|
546
655
|
|
|
547
656
|
### AuthAccount
|
|
548
657
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
|
552
|
-
|
|
|
553
|
-
| `
|
|
554
|
-
| `
|
|
555
|
-
| `
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
| Property | Type | Description |
|
|
661
|
+
| --- | --- | --- |
|
|
662
|
+
| `id` | string | Example: `"6401df46d6a6b0c692d9ec49"`. |
|
|
663
|
+
| `name` | string | Example: `"JS"`. |
|
|
664
|
+
| `roles` | Array<string> | Example: `["owner"]`. |
|
|
665
|
+
| `is_delete_allowed` | boolean | Example: `true`. |
|
|
666
|
+
| `created_at` | string (format: date-time) | Example: `"2023-03-03T11:51:34Z"`. |
|
|
556
667
|
|
|
557
668
|
### AuthSession
|
|
558
669
|
|
|
559
670
|
A JWT access token plus the authenticated user and the accounts they belong to.
|
|
560
671
|
|
|
561
|
-
| Property | Type |
|
|
562
|
-
| --- | --- | --- |
|
|
563
|
-
| `access_token` | string |
|
|
564
|
-
| `user` | [`AuthUser`](#authuser) |
|
|
565
|
-
| `accounts` | Array<[`AuthAccount`](#authaccount)> |
|
|
672
|
+
| Property | Type | Description |
|
|
673
|
+
| --- | --- | --- |
|
|
674
|
+
| `access_token` | string | Example: `"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."`. |
|
|
675
|
+
| `user` | [`AuthUser`](#authuser) | |
|
|
676
|
+
| `accounts` | Array<[`AuthAccount`](#authaccount)> | |
|
|
566
677
|
|
|
567
678
|
### AuthUser
|
|
568
679
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
|
572
|
-
|
|
|
573
|
-
| `
|
|
574
|
-
| `
|
|
575
|
-
| `
|
|
576
|
-
| `
|
|
577
|
-
| `
|
|
578
|
-
| `
|
|
579
|
-
| `
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
| Property | Type | Description |
|
|
683
|
+
| --- | --- | --- |
|
|
684
|
+
| `id` | string | Example: `"bgjazeo5r9v2lq7l36dx48np"`. |
|
|
685
|
+
| `name` | string | Example: `"John Smith"`. |
|
|
686
|
+
| `email` | string (format: email) | Example: `"signer@example.com"`. |
|
|
687
|
+
| `telephone` | string or null | Example: `"17989206641"`. |
|
|
688
|
+
| `government_id` | string or null | Example: `"15774136604"`. |
|
|
689
|
+
| `is_email_verified` | boolean | Example: `false`. |
|
|
690
|
+
| `has_accepted_terms` | boolean | Example: `true`. |
|
|
691
|
+
| `created_at` | string (format: date-time) | Example: `"2023-03-03T11:51:34Z"`. |
|
|
692
|
+
| `to_be_deleted_at` | string or null (format: date-time) | Example: `null`. |
|
|
693
|
+
|
|
694
|
+
### Balance
|
|
695
|
+
|
|
696
|
+
A document or credit balance for the current billing cycle.
|
|
697
|
+
|
|
698
|
+
| Property | Type | Description |
|
|
699
|
+
| --- | --- | --- |
|
|
700
|
+
| `balance` | number or null | Remaining quantity; null for unlimited. Example: `100`. |
|
|
701
|
+
| `limit` | number or null | Allowance per cycle/pool; null when not cycle-limited or unlimited. Example: `100`. |
|
|
702
|
+
| `spent` | number | Quantity consumed in the current cycle. Example: `0`. |
|
|
580
703
|
|
|
581
704
|
### CostEstimate
|
|
582
705
|
|
|
583
|
-
Cost breakdown for an assignment plus current account balances.
|
|
706
|
+
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
707
|
|
|
585
|
-
| Property | Type |
|
|
586
|
-
| --- | --- | --- |
|
|
587
|
-
| `documents` | integer |
|
|
588
|
-
| `credits` | number |
|
|
589
|
-
| `needs_extra_document` | boolean |
|
|
590
|
-
| `extra_document_cost` | number |
|
|
591
|
-
| `total_credits` | number |
|
|
592
|
-
| `breakdown` | Array<[`CostEstimateBreakdownItem`](#costestimatebreakdownitem)> |
|
|
593
|
-
| `document_balance` | number
|
|
594
|
-
| `credit_balance` | number
|
|
595
|
-
| `has_sufficient_resources` | boolean |
|
|
596
|
-
| `blocking_reason` | string
|
|
597
|
-
| `message` | string
|
|
708
|
+
| Property | Type | Description |
|
|
709
|
+
| --- | --- | --- |
|
|
710
|
+
| `documents` * | integer | Documents consumed: 1, for an assignment as for an envelope, whatever its documents. Example: `1`. |
|
|
711
|
+
| `credits` * | number | Sum of the `breakdown` costs: notifications, digital-certificate signatures and identity checks. Does not include the extra document. Example: `0.9`. |
|
|
712
|
+
| `needs_extra_document` * | boolean | True when the plan's document allowance is exhausted and an extra document will be charged from credits. Example: `true`. |
|
|
713
|
+
| `extra_document_cost` * | number | Credits for one extra document. Charged only when `needs_extra_document` is true. Example: `1`. |
|
|
714
|
+
| `total_credits` * | number | Credits the send will consume: `credits`, plus `extra_document_cost` when `needs_extra_document` is true. Example: `1.9`. |
|
|
715
|
+
| `breakdown` * | Array<[`CostEstimateBreakdownItem`](#costestimatebreakdownitem)> | |
|
|
716
|
+
| `document_balance` * | number or null | Documents left in the plan. `null` when the account's documents are not limited. Example: `0`. |
|
|
717
|
+
| `credit_balance` * | number or null | Credits available. `null` when the account's credits are not limited. Example: `10`. |
|
|
718
|
+
| `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`. |
|
|
719
|
+
| `blocking_reason` * | string or null (`"PendingPayment"`, `"InsufficientDocuments"`, `"InsufficientCredits"`) | Example: `null`. |
|
|
720
|
+
| `message` * | string or null | |
|
|
598
721
|
|
|
599
722
|
### CostEstimateBreakdownItem
|
|
600
723
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
|
604
|
-
|
|
|
605
|
-
| `
|
|
606
|
-
| `
|
|
607
|
-
| `
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
| Property | Type | Description |
|
|
727
|
+
| --- | --- | --- |
|
|
728
|
+
| `code` | string | Example: `"NotificationWhatsapp"`. |
|
|
729
|
+
| `name` | string | Example: `"Whatsapp Notification"`. |
|
|
730
|
+
| `cost` | number | Example: `0.9`. |
|
|
731
|
+
| `quantity` | integer | Example: `2`. |
|
|
732
|
+
| `unit_cost` | number | Example: `0.45`. |
|
|
608
733
|
|
|
609
734
|
### DisplaySettings
|
|
610
735
|
|
|
611
736
|
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
737
|
|
|
613
|
-
| Property | Type |
|
|
614
|
-
| --- | --- | --- |
|
|
615
|
-
| `left` | number (float)
|
|
616
|
-
| `top` | number (float)
|
|
617
|
-
| `width` | number (float) |
|
|
618
|
-
| `height` | number (float) |
|
|
619
|
-
| `fontFamily` | string |
|
|
620
|
-
| `fontSize` | number (float) |
|
|
621
|
-
| `backgroundColor` | string |
|
|
738
|
+
| Property | Type | Description |
|
|
739
|
+
| --- | --- | --- |
|
|
740
|
+
| `left` * | number (format: float) (min: 0) | Horizontal distance from the page's left edge, in page-image pixels. Example: `69`. |
|
|
741
|
+
| `top` * | number (format: float) (min: 0) | Vertical distance from the page's top edge, in page-image pixels. Example: `282`. |
|
|
742
|
+
| `width` * | number (format: float) | Width of the placement rectangle, in page-image pixels. Example: `421`. |
|
|
743
|
+
| `height` * | number (format: float) | Height of the placement rectangle, in page-image pixels. Example: `45.86`. |
|
|
744
|
+
| `fontFamily` | string | Font-family presentation metadata. Example: `"Arial"`. |
|
|
745
|
+
| `fontSize` * | number (format: float) | Font size in the 150-DPI page-image coordinate system. Example: `22`. |
|
|
746
|
+
| `backgroundColor` | string | CSS-compatible background-color presentation metadata. Example: `"#D5EBFF"`. |
|
|
622
747
|
|
|
623
748
|
### Document
|
|
624
749
|
|
|
625
750
|
A document and its current lifecycle state.
|
|
626
751
|
|
|
627
|
-
| Property | Type |
|
|
628
|
-
| --- | --- | --- |
|
|
629
|
-
| `resource` | string |
|
|
630
|
-
| `id` | string |
|
|
631
|
-
| `account_id` | string |
|
|
632
|
-
| `template_id` | string
|
|
633
|
-
| `name` | string |
|
|
634
|
-
| `status` | string |
|
|
635
|
-
| `artifacts` | object |
|
|
636
|
-
| `is_closed` | boolean |
|
|
637
|
-
| `signing_url` | string |
|
|
638
|
-
| `verification_code` | string
|
|
639
|
-
| `verification_url` | string (uri) |
|
|
640
|
-
| `decline_reason` | string
|
|
641
|
-
| `declined_by` |
|
|
642
|
-
| `tags` | Array<object
|
|
643
|
-
| `tags[].id` | string |
|
|
644
|
-
| `tags[].name` | string |
|
|
645
|
-
| `
|
|
646
|
-
| `assignment
|
|
647
|
-
| `
|
|
648
|
-
| `
|
|
649
|
-
| `
|
|
650
|
-
| `
|
|
651
|
-
| `
|
|
652
|
-
| `
|
|
653
|
-
| `
|
|
654
|
-
| `
|
|
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 | — |
|
|
752
|
+
| Property | Type | Description |
|
|
753
|
+
| --- | --- | --- |
|
|
754
|
+
| `resource` | string | Present in single-resource responses. Example: `"document"`. |
|
|
755
|
+
| `id` | string | Example: `"615601fab04c0a3147bb1246"`. |
|
|
756
|
+
| `account_id` | string | Example: `"d199996981dbd199996981db"`. |
|
|
757
|
+
| `template_id` | string or null | Example: `null`. |
|
|
758
|
+
| `name` | string | Example: `"document.pdf"`. |
|
|
759
|
+
| `status` | string | Status code — see GET /v1/documents/statuses. Example: `"metadata_ready"`. |
|
|
760
|
+
| `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"}`. |
|
|
761
|
+
| `is_closed` | boolean | Example: `false`. |
|
|
762
|
+
| `signing_url` | string | Example: `"https://api.assinafy.com.br/v1/sign/doc1"`. |
|
|
763
|
+
| `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"`. |
|
|
764
|
+
| `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"`. |
|
|
765
|
+
| `decline_reason` | string or null | Example: `null`. |
|
|
766
|
+
| `declined_by` | [`Signer`](#signer) or null | |
|
|
767
|
+
| `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | |
|
|
768
|
+
| `tags[].id` | string | |
|
|
769
|
+
| `tags[].name` | string | |
|
|
770
|
+
| `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
|
|
771
|
+
| `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`. |
|
|
772
|
+
| `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
|
|
773
|
+
| `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`. |
|
|
774
|
+
| `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. |
|
|
775
|
+
| `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
|
|
776
|
+
| `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
|
|
777
|
+
| `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`. |
|
|
778
|
+
| `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
779
|
+
| `updated_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
661
780
|
|
|
662
781
|
### DocumentActivity
|
|
663
782
|
|
|
664
783
|
A document activity event.
|
|
665
784
|
|
|
666
|
-
| Property | Type |
|
|
667
|
-
| --- | --- | --- |
|
|
668
|
-
| `id` | integer |
|
|
669
|
-
| `event` | string |
|
|
670
|
-
| `message` | string |
|
|
671
|
-
| `payload` | object
|
|
672
|
-
| `origin` | object
|
|
673
|
-
| `origin.ip` | string
|
|
674
|
-
| `origin.user-agent` | string |
|
|
675
|
-
| `created_at` | string (date-time) |
|
|
785
|
+
| Property | Type | Description |
|
|
786
|
+
| --- | --- | --- |
|
|
787
|
+
| `id` | integer | Example: `4`. |
|
|
788
|
+
| `event` | string | Event type code. Example: `"assignment_created"`. |
|
|
789
|
+
| `message` | string | Example: `"Assignment created by John Smith."`. |
|
|
790
|
+
| `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. |
|
|
791
|
+
| `origin` | object { `ip`: string or null; `user-agent`: string } | Request origin when available. |
|
|
792
|
+
| `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
|
|
793
|
+
| `origin.user-agent` | string | |
|
|
794
|
+
| `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
|
|
676
795
|
|
|
677
796
|
### DocumentContract
|
|
678
797
|
|
|
679
|
-
|
|
680
|
-
workspace list can include the document when `expand=document` is requested.
|
|
798
|
+
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
799
|
|
|
682
|
-
| Property | Type |
|
|
683
|
-
| --- | --- | --- |
|
|
684
|
-
| `resource` | string |
|
|
685
|
-
| `document_id` | string |
|
|
686
|
-
| `status` | string
|
|
687
|
-
| `counterparty_name` | string
|
|
688
|
-
| `counterparty_taxpayer_id` | string
|
|
689
|
-
| `value` | number
|
|
690
|
-
| `currency` | string
|
|
691
|
-
| `start_date` | string (date) |
|
|
692
|
-
| `end_date` | string (date) |
|
|
693
|
-
| `auto_renew` | boolean |
|
|
694
|
-
| `renewal_term_months` | integer
|
|
695
|
-
| `notice_period_days` | integer
|
|
696
|
-
| `term` | integer |
|
|
697
|
-
| `owner_id` | string
|
|
698
|
-
| `metadata` | object
|
|
699
|
-
| `external_references` | Array<object
|
|
700
|
-
| `external_references[].system` | string |
|
|
701
|
-
| `external_references[].id` | string |
|
|
702
|
-
| `document` | [`Document`](#document) |
|
|
703
|
-
| `amendments` | Array<[`DocumentContractAmendment`](#documentcontractamendment)> |
|
|
704
|
-
| `created_at` | string (date-time) |
|
|
705
|
-
| `updated_at` | string (date-time) |
|
|
800
|
+
| Property | Type | Description |
|
|
801
|
+
| --- | --- | --- |
|
|
802
|
+
| `resource` | string | On a response that is this contract alone; list items carry none. Example: `"document_contract"`. |
|
|
803
|
+
| `document_id` * | string | Example: `"66b2f0e1c3a4d5e6f7a8b9c0"`. |
|
|
804
|
+
| `status` * | string (`"draft"`, `"active"`, `"expired"`, `"terminated"`) | Example: `"active"`. |
|
|
805
|
+
| `counterparty_name` * | string or null | Example: `"Acme Ltda"`. |
|
|
806
|
+
| `counterparty_taxpayer_id` * | string or null | CPF or CNPJ, digits only. Example: `"11222333000181"`. |
|
|
807
|
+
| `value` * | number or null | Two decimal places at most. Example: `120000.5`. |
|
|
808
|
+
| `currency` * | string or null | ISO 4217 code; `BRL` when a value is sent without one. Example: `"BRL"`. |
|
|
809
|
+
| `start_date` * | string or null (format: date) | Example: `"2026-11-01"`. |
|
|
810
|
+
| `end_date` * | string or null (format: date) | Example: `"2027-10-31"`. |
|
|
811
|
+
| `auto_renew` * | boolean | Example: `true`. |
|
|
812
|
+
| `renewal_term_months` * | integer or null | Example: `12`. |
|
|
813
|
+
| `notice_period_days` * | integer or null | Example: `30`. |
|
|
814
|
+
| `term` * | integer | Steps on every renewal, starting at 1. Example: `1`. |
|
|
815
|
+
| `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"`. |
|
|
816
|
+
| `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"}`. |
|
|
817
|
+
| `external_references` * | Array<object { `system*`: string; `id*`: string }> | IDs outside systems use for this contract, ordered by system and id; `[]` when there are none. |
|
|
818
|
+
| `external_references[].system` * | string | Example: `"hubspot"`. |
|
|
819
|
+
| `external_references[].id` * | string | Example: `"98765"`. |
|
|
820
|
+
| `document` | [`Document`](#document) | Only with `expand=document`: the document the terms are tracked on. |
|
|
821
|
+
| `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. |
|
|
822
|
+
| `created_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
|
|
823
|
+
| `updated_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
|
|
706
824
|
|
|
707
825
|
### DocumentContractAmendment
|
|
708
826
|
|
|
709
|
-
A document
|
|
710
|
-
parent after this document is certificated.
|
|
827
|
+
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
828
|
|
|
712
|
-
| Property | Type |
|
|
713
|
-
| --- | --- | --- |
|
|
714
|
-
| `resource` | string |
|
|
715
|
-
| `document_id` | string |
|
|
716
|
-
| `document_name` | string |
|
|
717
|
-
| `parent_document_id` | string |
|
|
718
|
-
| `relation_type` | string
|
|
719
|
-
| `number` | integer
|
|
720
|
-
| `status` | string
|
|
721
|
-
| `document_status` | string |
|
|
722
|
-
| `apply_error` | string
|
|
723
|
-
| `currency` | string
|
|
724
|
-
| `terms` | object
|
|
725
|
-
| `changes` | object
|
|
726
|
-
| `applied_at` | string (date-time) |
|
|
727
|
-
| `created_at` | string (date-time) |
|
|
728
|
-
| `updated_at` | string (date-time) |
|
|
829
|
+
| Property | Type | Description |
|
|
830
|
+
| --- | --- | --- |
|
|
831
|
+
| `resource` | string | On a response that is this amendment alone; the entries of a contract's `amendments` carry none. Example: `"document_contract_amendment"`. |
|
|
832
|
+
| `document_id` * | string | This document, the instrument. Example: `"7c3d1e2f4a5b6c7d8e9f0a1b"`. |
|
|
833
|
+
| `document_name` * | string | This document's name. Example: `"Aditivo 1 - Contrato de prestação de serviços.pdf"`. |
|
|
834
|
+
| `parent_document_id` * | string | The contract document whose terms change. Example: `"66b2f0e1c3a4d5e6f7a8b9c0"`. |
|
|
835
|
+
| `relation_type` * | string (`"amendment"`, `"renewal"`, `"termination"`) | Example: `"amendment"`. |
|
|
836
|
+
| `number` * | integer or null | Position among the parent's applied amendments by signing date; `null` while pending. Example: `1`. |
|
|
837
|
+
| `status` * | string (`"pending"`, `"applied"`) | `applied` once the delta moved the parent's terms. Example: `"pending"`. |
|
|
838
|
+
| `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"`. |
|
|
839
|
+
| `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. |
|
|
840
|
+
| `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"`. |
|
|
841
|
+
| `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"}`. |
|
|
842
|
+
| `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}}`. |
|
|
843
|
+
| `applied_at` * | string or null (format: date-time) | |
|
|
844
|
+
| `created_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
|
|
845
|
+
| `updated_at` * | string (format: date-time) | Example: `"2026-10-23T12:00:00Z"`. |
|
|
729
846
|
|
|
730
847
|
### DocumentContractInput
|
|
731
848
|
|
|
732
|
-
|
|
733
|
-
term; for a pending instrument it removes that term from the delta. `external_references` replaces the whole list.
|
|
849
|
+
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
850
|
|
|
735
|
-
| Property | Type |
|
|
736
|
-
| --- | --- | --- |
|
|
737
|
-
| `status` | string
|
|
738
|
-
| `counterparty_name` | string
|
|
739
|
-
| `counterparty_taxpayer_id` | string
|
|
740
|
-
| `value` | number
|
|
741
|
-
| `currency` | string
|
|
742
|
-
| `start_date` | string (date) |
|
|
743
|
-
| `end_date` | string (date) |
|
|
744
|
-
| `auto_renew` | boolean |
|
|
745
|
-
| `renewal_term_months` | integer
|
|
746
|
-
| `notice_period_days` | integer
|
|
747
|
-
| `owner_id` | string
|
|
748
|
-
| `metadata` | object
|
|
749
|
-
| `external_references` |
|
|
750
|
-
| `
|
|
751
|
-
| `
|
|
752
|
-
| `
|
|
753
|
-
|
|
754
|
-
|
|
851
|
+
| Property | Type | Description |
|
|
852
|
+
| --- | --- | --- |
|
|
853
|
+
| `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. |
|
|
854
|
+
| `counterparty_name` | string or null (max length: 255) | Emoji are kept; other characters outside the 3-byte range are dropped. |
|
|
855
|
+
| `counterparty_taxpayer_id` | string or null | A valid CPF or CNPJ, formatted or not. |
|
|
856
|
+
| `value` | number or null (min: 0) (max: 9999999999999.99) | Two decimal places at most. |
|
|
857
|
+
| `currency` | string or null | Three letters, such as `BRL` or `USD`, stored in capitals; `BRL` when a `value` is set without one. Example: `"BRL"`. |
|
|
858
|
+
| `start_date` | string or null (format: date) | `YYYY-MM-DD`, from the year 1000. |
|
|
859
|
+
| `end_date` | string or null (format: date) | `YYYY-MM-DD`, on or after `start_date`. |
|
|
860
|
+
| `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. |
|
|
861
|
+
| `renewal_term_months` | integer or null (min: 1) (max: 600) | How far a renewal by the term moves `end_date`; 12 when unset. |
|
|
862
|
+
| `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. |
|
|
863
|
+
| `owner_id` | string or null | An active member of this workspace. |
|
|
864
|
+
| `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`. |
|
|
865
|
+
| `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`. |
|
|
866
|
+
| `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. |
|
|
867
|
+
| `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). |
|
|
868
|
+
| `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"`. |
|
|
869
|
+
|
|
870
|
+
### DocumentEnvelope
|
|
871
|
+
|
|
872
|
+
Documents sent together to the same signers. Each document keeps its own assignment, status, certificate and downloads.
|
|
873
|
+
|
|
874
|
+
| Property | Type | Description |
|
|
875
|
+
| --- | --- | --- |
|
|
876
|
+
| `resource` | string | Present in single-resource responses. Example: `"envelope"`. |
|
|
877
|
+
| `id` * | string | Example: `"1a2f3c4d5e6f708192a3b4c5d6e"`. |
|
|
878
|
+
| `name` * | string | Example: `"Contrato de prestação de serviços"`. |
|
|
879
|
+
| `message` * | string or null | Example: `"Segue o contrato e seus anexos."`. |
|
|
880
|
+
| `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. |
|
|
881
|
+
| `documents[].id` * | string | Example: `"615601fab04c0a3147bb1246"`. |
|
|
882
|
+
| `documents[].position` * | integer (min: 1) | The document's place in the envelope's order, from 1. Example: `1`. |
|
|
883
|
+
| `documents[].name` * | string | Example: `"contrato.pdf"`. |
|
|
884
|
+
| `documents[].status` * | string | Status code — see GET /v1/documents/statuses. Example: `"pending_signature"`. |
|
|
885
|
+
| `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"}`. |
|
|
886
|
+
| `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. |
|
|
887
|
+
| `documents[].signers[].id` * | string | Example: `"fa8c140cb49b79f940aab95fddd"`. |
|
|
888
|
+
| `documents[].signers[].full_name` * | string | Example: `"Ana Souza"`. |
|
|
889
|
+
| `documents[].signers[].email` * | string or null | Example: `"signer@example.com"`. |
|
|
890
|
+
| `documents[].signers[].whatsapp_phone_number` * | string or null | Example: `"+5548999990001"`. |
|
|
891
|
+
| `documents[].signers[].completed` * | boolean | Whether they have signed this document. Example: `false`. |
|
|
892
|
+
| `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"`. |
|
|
893
|
+
| `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}`. |
|
|
894
|
+
| `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). |
|
|
895
|
+
| `created_at` * | string (format: date-time) | Example: `"2026-11-04T12:00:00Z"`. |
|
|
755
896
|
|
|
756
897
|
### DocumentPage
|
|
757
898
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
|
761
|
-
|
|
|
762
|
-
| `
|
|
763
|
-
| `
|
|
764
|
-
| `
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
| Property | Type | Description |
|
|
902
|
+
| --- | --- | --- |
|
|
903
|
+
| `id` | string | Example: `"615601faf166d6d1d8e7dc30"`. |
|
|
904
|
+
| `number` | integer | Example: `1`. |
|
|
905
|
+
| `height` | integer | Example: `2100`. |
|
|
906
|
+
| `width` | integer | Example: `1275`. |
|
|
907
|
+
| `download_url` | string | Example: `"https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"`. |
|
|
765
908
|
|
|
766
909
|
### DocumentStatsRow
|
|
767
910
|
|
|
768
911
|
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
912
|
|
|
770
|
-
| Property | Type |
|
|
771
|
-
| --- | --- | --- |
|
|
772
|
-
| `period` | string |
|
|
773
|
-
| `documents_uploaded` | integer |
|
|
774
|
-
| `documents_sent` | integer |
|
|
775
|
-
| `signature_requests` | integer |
|
|
776
|
-
| `signature_requests_notification_email` | integer |
|
|
777
|
-
| `signature_requests_notification_whatsapp` | integer |
|
|
778
|
-
| `signature_requests_notification_bypass` | integer |
|
|
779
|
-
| `signature_requests_verification_email` | integer |
|
|
780
|
-
| `signature_requests_verification_whatsapp` | integer |
|
|
781
|
-
| `signature_requests_verification_bypass` | integer |
|
|
782
|
-
| `signature_requests_verification_digital_certificate` | integer |
|
|
783
|
-
| `signature_requests_viewed` | integer |
|
|
784
|
-
| `signature_requests_completed` | integer |
|
|
785
|
-
| `documents_certified` | integer |
|
|
913
|
+
| Property | Type | Description |
|
|
914
|
+
| --- | --- | --- |
|
|
915
|
+
| `period` | string | `YYYY-MM` (monthly) or `YYYY-MM-DD` (daily). Example: `"2026-06"`. |
|
|
916
|
+
| `documents_uploaded` | integer | Example: `42`. |
|
|
917
|
+
| `documents_sent` | integer | Example: `37`. |
|
|
918
|
+
| `signature_requests` | integer | Example: `61`. |
|
|
919
|
+
| `signature_requests_notification_email` | integer | Requests notified by e-mail. Example: `55`. |
|
|
920
|
+
| `signature_requests_notification_whatsapp` | integer | Requests notified by WhatsApp. Example: `18`. |
|
|
921
|
+
| `signature_requests_notification_bypass` | integer | Requests with no notification sent (`Bypass`). Example: `3`. |
|
|
922
|
+
| `signature_requests_verification_email` | integer | Requests verified by an e-mail token. Example: `48`. |
|
|
923
|
+
| `signature_requests_verification_whatsapp` | integer | Requests verified by a WhatsApp token. Example: `6`. |
|
|
924
|
+
| `signature_requests_verification_bypass` | integer | Requests signed without token verification (`Bypass`). Example: `3`. |
|
|
925
|
+
| `signature_requests_verification_digital_certificate` | integer | Requests signed with the signer's own ICP-Brasil digital certificate. Example: `4`. |
|
|
926
|
+
| `signature_requests_viewed` | integer | Signature requests whose document was first viewed during the period. Example: `44`. |
|
|
927
|
+
| `signature_requests_completed` | integer | Signature requests completed by individual signers during the period. Example: `52`. |
|
|
928
|
+
| `documents_certified` | integer | Example: `30`. |
|
|
786
929
|
|
|
787
930
|
### DocumentStatus
|
|
788
931
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
|
792
|
-
|
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
| Property | Type | Description |
|
|
935
|
+
| --- | --- | --- |
|
|
936
|
+
| `code` | string | Example: `"metadata_ready"`. |
|
|
937
|
+
| `deletable` | boolean | Example: `true`. |
|
|
793
938
|
|
|
794
939
|
### DocumentVerification
|
|
795
940
|
|
|
796
941
|
The verification result for a document looked up by signature hash. When not verified, most fields are null and `is_valid` is false.
|
|
797
942
|
|
|
798
|
-
| Property | Type |
|
|
799
|
-
| --- | --- | --- |
|
|
800
|
-
| `hash` | string |
|
|
801
|
-
| `id` | string
|
|
802
|
-
| `agreement_code` | string
|
|
803
|
-
| `status` | string
|
|
804
|
-
| `page_count` | string
|
|
805
|
-
| `signer_count` | string
|
|
806
|
-
| `completed_count` | integer
|
|
807
|
-
| `completed_at` | string (date-time) |
|
|
808
|
-
| `
|
|
809
|
-
| `
|
|
810
|
-
| `
|
|
943
|
+
| Property | Type | Description |
|
|
944
|
+
| --- | --- | --- |
|
|
945
|
+
| `hash` | string | Example: `"FE32EDDADE7CBDDCBB934E7402047450B0E59C02"`. |
|
|
946
|
+
| `id` | string or null | Example: `"63ddb172402799bfc991d10d"`. |
|
|
947
|
+
| `agreement_code` | string or null | Agreement code printed on the document certificate. Example: `"550E8400-E29B-41D4-A716-446655440000"`. |
|
|
948
|
+
| `status` | string or null | Example: `"certificated"`. |
|
|
949
|
+
| `page_count` | string or null | Example: `"1"`. |
|
|
950
|
+
| `signer_count` | string or null | Example: `"1"`. |
|
|
951
|
+
| `completed_count` | integer or null | Example: `1`. |
|
|
952
|
+
| `completed_at` | string or null (format: date-time) | When the last signature was made. Example: `"2023-01-27T19:27:44Z"`. |
|
|
953
|
+
| `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"`. |
|
|
954
|
+
| `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"`. |
|
|
955
|
+
| `is_valid` | boolean | Example: `true`. |
|
|
956
|
+
| `message` | string | Reason when not valid. Example: `""`. |
|
|
957
|
+
|
|
958
|
+
### EmbedOrigin
|
|
959
|
+
|
|
960
|
+
An origin allowed to embed the workspace's signing pages.
|
|
961
|
+
|
|
962
|
+
| Property | Type | Description |
|
|
963
|
+
| --- | --- | --- |
|
|
964
|
+
| `id` | string | Embed origin ID. Example: `"6f1c2a9e0b"`. |
|
|
965
|
+
| `origin` | string | Exact `scheme://host[:port]`. Example: `"https://app.example.com"`. |
|
|
966
|
+
| `created_at` | string (format: date-time) | Example: `"2026-11-04T12:05:00Z"`. |
|
|
967
|
+
|
|
968
|
+
### EmbedSession
|
|
969
|
+
|
|
970
|
+
A single-use embed session for an embedded signer.
|
|
971
|
+
|
|
972
|
+
| Property | Type | Description |
|
|
973
|
+
| --- | --- | --- |
|
|
974
|
+
| `url` | string | Load this URL in an iframe within 5 minutes. Opening it spends the token. Example: `"https://app.assinafy.com.br/embed/3f2c9a1e5b7d4c68a0e1f2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7"`. |
|
|
975
|
+
| `expires_at` | string (format: date-time) | Example: `"2026-11-04T12:05:00Z"`. |
|
|
976
|
+
|
|
977
|
+
### EmbedSessionExchange
|
|
978
|
+
|
|
979
|
+
What the embed page gets for a session token.
|
|
980
|
+
|
|
981
|
+
| Property | Type | Description |
|
|
982
|
+
| --- | --- | --- |
|
|
983
|
+
| `signer_access_code` | string | The signer's access code, used by the embed page only. |
|
|
984
|
+
| `signer_id` | string | Example: `"6f1c2a9e0b"`. |
|
|
985
|
+
| `document_id` | string | Example: `"5e0b1c2a9f"`. |
|
|
986
|
+
| `verification_method` | string | Example: `"Email"`. |
|
|
987
|
+
| `embed_origins` | Array<string> | Example: `["https://app.example.com"]`. |
|
|
811
988
|
|
|
812
989
|
### Envelope
|
|
813
990
|
|
|
814
991
|
Standard success wrapper. Operations add their own `data`.
|
|
815
992
|
|
|
816
|
-
| Property | Type |
|
|
817
|
-
| --- | --- | --- |
|
|
818
|
-
| `status` | integer |
|
|
819
|
-
| `message` | string |
|
|
993
|
+
| Property | Type | Description |
|
|
994
|
+
| --- | --- | --- |
|
|
995
|
+
| `status` | integer | HTTP status code, mirrored in the body. Example: `200`. |
|
|
996
|
+
| `message` | string | Human-readable message; empty on success. Example: `""`. |
|
|
997
|
+
|
|
998
|
+
### EnvelopeActivity
|
|
999
|
+
|
|
1000
|
+
A document activity of an envelope's trail, naming its document.
|
|
1001
|
+
|
|
1002
|
+
| Property | Type | Description |
|
|
1003
|
+
| --- | --- | --- |
|
|
1004
|
+
| `id` | integer | Example: `4`. |
|
|
1005
|
+
| `event` | string | Event type code. Example: `"assignment_created"`. |
|
|
1006
|
+
| `message` | string | Example: `"Assignment created by John Smith."`. |
|
|
1007
|
+
| `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. |
|
|
1008
|
+
| `origin` | object { `ip`: string or null; `user-agent`: string } | Request origin when available. |
|
|
1009
|
+
| `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
|
|
1010
|
+
| `origin.user-agent` | string | |
|
|
1011
|
+
| `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
|
|
1012
|
+
| `document_id` | string | The document the activity is about. Example: `"fe1c140cb49b79f940aab95fddd"`. |
|
|
1013
|
+
| `document_name` | string | Example: `"Contrato.pdf"`. |
|
|
1014
|
+
|
|
1015
|
+
### EnvelopeCreateRequest
|
|
1016
|
+
|
|
1017
|
+
An envelope as sent: on creation, and to estimate what creating it would cost.
|
|
1018
|
+
|
|
1019
|
+
| Property | Type | Description |
|
|
1020
|
+
| --- | --- | --- |
|
|
1021
|
+
| `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"`. |
|
|
1022
|
+
| `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."`. |
|
|
1023
|
+
| `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`. |
|
|
1024
|
+
| `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`. |
|
|
1025
|
+
| `signers[].id` * | string (min length: 1) | An existing signer's ID. Example: `"fa8c140cb49b79f940aab95fddd"`. |
|
|
1026
|
+
| `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"`. |
|
|
1027
|
+
| `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"]`. |
|
|
1028
|
+
| `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. |
|
|
1029
|
+
| `documents` * | Array<[`EnvelopeDocumentRequest`](#envelopedocumentrequest)> (min items: 1) (max items: 20) | The documents, in the order the envelope lists them: up to 20. |
|
|
1030
|
+
|
|
1031
|
+
### EnvelopeDocumentRequest
|
|
1032
|
+
|
|
1033
|
+
A document of an envelope, as sent on creation (`documents[]`) and when added.
|
|
1034
|
+
|
|
1035
|
+
| Property | Type | Description |
|
|
1036
|
+
| --- | --- | --- |
|
|
1037
|
+
| `id` * | string (min length: 1) | A `metadata_ready` document of the workspace with no assignment. Example: `"615601fab04c0a3147bb1246"`. |
|
|
1038
|
+
| `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`. |
|
|
1039
|
+
| `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`. |
|
|
1040
|
+
| `entries[].page_id` * | string | A page of the document. |
|
|
1041
|
+
| `entries[].fields` * | Array<object { `signer_id*`: string; `field_id*`: string; `display_settings*`: [`DisplaySettings`](#displaysettings) }> (min items: 1) | |
|
|
1042
|
+
| `entries[].fields[].signer_id` * | string | A signer of the document. |
|
|
1043
|
+
| `entries[].fields[].field_id` * | string | A field definition of the workspace. |
|
|
1044
|
+
| `entries[].fields[].display_settings` * | [`DisplaySettings`](#displaysettings) | |
|
|
1045
|
+
| `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"]`. |
|
|
1046
|
+
| `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"`. |
|
|
1047
|
+
| `copy_receiver_ids` | Array<string> | Signer IDs that only receive a copy of this document, as on an assignment. Example: `["cr8c140cb49b79f940aab95fddd"]`. |
|
|
820
1048
|
|
|
821
1049
|
### ErrorEnvelope
|
|
822
1050
|
|
|
823
1051
|
Standard error wrapper. `status` mirrors the HTTP status code.
|
|
824
1052
|
|
|
825
|
-
| Property | Type |
|
|
826
|
-
| --- | --- | --- |
|
|
827
|
-
| `status` | integer |
|
|
828
|
-
| `message` | string |
|
|
829
|
-
| `data` | object
|
|
1053
|
+
| Property | Type | Description |
|
|
1054
|
+
| --- | --- | --- |
|
|
1055
|
+
| `status` | integer | Example: `400`. |
|
|
1056
|
+
| `message` | string | Human-readable error message. Example: `"Bad request."`. |
|
|
1057
|
+
| `data` | object or null | Example: `null`. |
|
|
1058
|
+
| `code` | string | On the refusals a client can act on: see Reading a refusal. Other refusals have only `message`. Example: `"PlanRestricted"`. |
|
|
1059
|
+
| `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. |
|
|
1060
|
+
| `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"`. |
|
|
1061
|
+
| `errors[].code` * | string | `Required`, `UnknownField` or `Invalid`; the contract endpoints have codes of their own. Example: `"Required"`. |
|
|
1062
|
+
| `errors[].message` * | string | In the platform's language. Example: `"Full Name cannot be blank."`. |
|
|
830
1063
|
|
|
831
1064
|
### Field
|
|
832
1065
|
|
|
833
1066
|
A reusable field definition.
|
|
834
1067
|
|
|
835
|
-
| Property | Type |
|
|
836
|
-
| --- | --- | --- |
|
|
837
|
-
| `resource` | string |
|
|
838
|
-
| `id` | string |
|
|
839
|
-
| `name` | string |
|
|
840
|
-
| `type` | string |
|
|
841
|
-
| `regex` | string
|
|
842
|
-
| `is_pre_defined` | boolean |
|
|
843
|
-
| `is_active` | boolean |
|
|
844
|
-
| `is_required` | boolean |
|
|
845
|
-
| `is_standard` | boolean |
|
|
846
|
-
| `is_read_only` | boolean |
|
|
847
|
-
| `is_visible` | boolean |
|
|
1068
|
+
| Property | Type | Description |
|
|
1069
|
+
| --- | --- | --- |
|
|
1070
|
+
| `resource` | string | Example: `"field"`. |
|
|
1071
|
+
| `id` | string | Example: `"6152120297080d55bdd13197"`. |
|
|
1072
|
+
| `name` | string | Example: `"Signature"`. |
|
|
1073
|
+
| `type` | string | Example: `"signature"`. |
|
|
1074
|
+
| `regex` | string or null | |
|
|
1075
|
+
| `is_pre_defined` | boolean | |
|
|
1076
|
+
| `is_active` | boolean | |
|
|
1077
|
+
| `is_required` | boolean | |
|
|
1078
|
+
| `is_standard` | boolean | |
|
|
1079
|
+
| `is_read_only` | boolean | |
|
|
1080
|
+
| `is_visible` | boolean | |
|
|
848
1081
|
|
|
849
1082
|
### FieldType
|
|
850
1083
|
|
|
851
1084
|
A supported field/validation type.
|
|
852
1085
|
|
|
853
|
-
| Property | Type |
|
|
854
|
-
| --- | --- | --- |
|
|
855
|
-
| `type` | string |
|
|
856
|
-
| `name` | string |
|
|
1086
|
+
| Property | Type | Description |
|
|
1087
|
+
| --- | --- | --- |
|
|
1088
|
+
| `type` | string | Example: `"cpf"`. |
|
|
1089
|
+
| `name` | string | Example: `"CPF"`. |
|
|
857
1090
|
|
|
858
1091
|
### FieldValidation
|
|
859
1092
|
|
|
860
1093
|
The result of validating a value against a field definition.
|
|
861
1094
|
|
|
862
|
-
| Property | Type |
|
|
863
|
-
| --- | --- | --- |
|
|
864
|
-
| `type` | string |
|
|
865
|
-
| `success` | boolean |
|
|
866
|
-
| `error_message` | string |
|
|
1095
|
+
| Property | Type | Description |
|
|
1096
|
+
| --- | --- | --- |
|
|
1097
|
+
| `type` | string | The field's validation type. Example: `"cpf"`. |
|
|
1098
|
+
| `success` | boolean | Example: `true`. |
|
|
1099
|
+
| `error_message` | string | Empty when valid. Example: `""`. |
|
|
867
1100
|
|
|
868
1101
|
### FieldValidationResult
|
|
869
1102
|
|
|
870
1103
|
A per-field result from a multi-field validation.
|
|
871
1104
|
|
|
872
|
-
| Property | Type |
|
|
873
|
-
| --- | --- | --- |
|
|
874
|
-
| `field_id` | string |
|
|
875
|
-
| `type` | string |
|
|
876
|
-
| `success` | boolean |
|
|
877
|
-
| `error_message` | string |
|
|
1105
|
+
| Property | Type | Description |
|
|
1106
|
+
| --- | --- | --- |
|
|
1107
|
+
| `field_id` | string | Example: `"63488ffb7adf435aba319787"`. |
|
|
1108
|
+
| `type` | string | Example: `"cpf"`. |
|
|
1109
|
+
| `success` | boolean | Example: `false`. |
|
|
1110
|
+
| `error_message` | string | Example: `"Invalid CPF."`. |
|
|
878
1111
|
|
|
879
1112
|
### NotificationHistoryEntry
|
|
880
1113
|
|
|
881
1114
|
A single notification delivery record for a signer channel.
|
|
882
1115
|
|
|
883
|
-
| Property | Type |
|
|
884
|
-
| --- | --- | --- |
|
|
885
|
-
| `event` | string |
|
|
886
|
-
| `status` | string
|
|
887
|
-
| `error_code` | string
|
|
888
|
-
| `error_message` | string
|
|
889
|
-
| `sent_at` | string (date-time) |
|
|
890
|
-
| `failed_at` | string (date-time) |
|
|
1116
|
+
| Property | Type | Description |
|
|
1117
|
+
| --- | --- | --- |
|
|
1118
|
+
| `event` | string | Example: `"signature_request"`. |
|
|
1119
|
+
| `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"`. |
|
|
1120
|
+
| `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"`. |
|
|
1121
|
+
| `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."`. |
|
|
1122
|
+
| `sent_at` | string or null (format: date-time) | Example: `"2026-07-07T12:00:00Z"`. |
|
|
1123
|
+
| `failed_at` | string or null (format: date-time) | Example: `"2026-07-07T12:05:00Z"`. |
|
|
1124
|
+
|
|
1125
|
+
### NotificationPolicy
|
|
1126
|
+
|
|
1127
|
+
The workspace's notification rules, set by its owners.
|
|
1128
|
+
|
|
1129
|
+
| Property | Type | Description |
|
|
1130
|
+
| --- | --- | --- |
|
|
1131
|
+
| `editable` | boolean | Whether the requesting user is an owner and can change the policy. Example: `true`. |
|
|
1132
|
+
| `owners_receive_all` | boolean | Owners also get the push alerts for every member's documents. Each owner's own preferences still apply. Example: `false`. |
|
|
1133
|
+
| `events` | [`NotificationPolicyEvents`](#notificationpolicyevents) | |
|
|
1134
|
+
|
|
1135
|
+
### NotificationPolicyEvents
|
|
1136
|
+
|
|
1137
|
+
Every e-mail and push alert, keyed by notification type. `false` means the workspace never sends it. New keys may be added.
|
|
1138
|
+
|
|
1139
|
+
| Property | Type | Description |
|
|
1140
|
+
| --- | --- | --- |
|
|
1141
|
+
| `DocumentCompleted` | boolean | Example: `true`. |
|
|
1142
|
+
| `SignerDeclined` | boolean | Example: `true`. |
|
|
1143
|
+
| `DocumentCancelled` | boolean | Example: `true`. |
|
|
1144
|
+
| `DocumentAboutToExpire` | boolean | Example: `true`. |
|
|
1145
|
+
| `DocumentExpired` | boolean | Example: `true`. |
|
|
1146
|
+
| `DocumentExpirationReset` | boolean | Example: `true`. |
|
|
1147
|
+
| `DocumentProcessingFailed` | boolean | Example: `true`. |
|
|
1148
|
+
| `TemplateProcessingFailed` | boolean | Example: `true`. |
|
|
1149
|
+
| `SignerWhatsappFailed` | boolean | Example: `true`. |
|
|
1150
|
+
| `ContractRenewalNotice` | boolean | Example: `true`. |
|
|
1151
|
+
| `ContractExpiring` | boolean | Example: `true`. |
|
|
1152
|
+
| `ContractExpired` | boolean | Example: `true`. |
|
|
1153
|
+
| `ContractRenewed` | boolean | Example: `true`. |
|
|
1154
|
+
| `SignerViewed` | boolean | Example: `false`. |
|
|
1155
|
+
| `SignerSigned` | boolean | Example: `true`. |
|
|
1156
|
+
| `SignerIdentityReviewRequired` | boolean | Turns off the push only; the identity review e-mail is always sent. Example: `true`. |
|
|
891
1157
|
|
|
892
1158
|
### NotificationPreferences
|
|
893
1159
|
|
|
894
1160
|
Owner-facing document notifications, keyed by notification type. `true` means the e-mail is sent.
|
|
895
1161
|
|
|
896
|
-
| Property | Type |
|
|
897
|
-
| --- | --- | --- |
|
|
898
|
-
| `DocumentCompleted` | boolean |
|
|
899
|
-
| `SignerDeclined` | boolean |
|
|
900
|
-
| `DocumentCancelled` | boolean |
|
|
901
|
-
| `DocumentAboutToExpire` | boolean |
|
|
902
|
-
| `DocumentExpired` | boolean |
|
|
903
|
-
| `DocumentExpirationReset` | boolean |
|
|
904
|
-
| `DocumentProcessingFailed` | boolean |
|
|
905
|
-
| `TemplateProcessingFailed` | boolean |
|
|
906
|
-
| `SignerWhatsappFailed` | boolean |
|
|
907
|
-
| `ContractRenewalNotice` | boolean |
|
|
908
|
-
| `ContractExpiring` | boolean |
|
|
909
|
-
| `ContractExpired` | boolean |
|
|
910
|
-
| `ContractRenewed` | boolean |
|
|
1162
|
+
| Property | Type | Description |
|
|
1163
|
+
| --- | --- | --- |
|
|
1164
|
+
| `DocumentCompleted` | boolean | Every signer has signed and the document is certified. Example: `true`. |
|
|
1165
|
+
| `SignerDeclined` | boolean | A signer declined to sign. Example: `true`. |
|
|
1166
|
+
| `DocumentCancelled` | boolean | The document was cancelled. Example: `true`. |
|
|
1167
|
+
| `DocumentAboutToExpire` | boolean | The signature deadline is approaching. Example: `true`. |
|
|
1168
|
+
| `DocumentExpired` | boolean | The signature deadline passed. Example: `true`. |
|
|
1169
|
+
| `DocumentExpirationReset` | boolean | The signature deadline was extended. Example: `true`. |
|
|
1170
|
+
| `DocumentProcessingFailed` | boolean | An uploaded document could not be processed. Example: `true`. |
|
|
1171
|
+
| `TemplateProcessingFailed` | boolean | A template could not be processed. Example: `true`. |
|
|
1172
|
+
| `SignerWhatsappFailed` | boolean | A WhatsApp notification to a signer could not be delivered. Example: `true`. |
|
|
1173
|
+
| `ContractRenewalNotice` | boolean | A tracked contract entered its notice period: it is about to end or to renew. Example: `true`. |
|
|
1174
|
+
| `ContractExpiring` | boolean | A tracked contract ends in 45 or in 30 days. Example: `true`. |
|
|
1175
|
+
| `ContractExpired` | boolean | A tracked contract ended without renewal. Example: `true`. |
|
|
1176
|
+
| `ContractRenewed` | boolean | A tracked contract was auto-renewed into its next term. Example: `true`. |
|
|
911
1177
|
|
|
912
1178
|
### OAuthRevokeRequest
|
|
913
1179
|
|
|
914
1180
|
Body of `POST /v1/oauth/revoke`. Sent form-encoded per RFC 7009, or as JSON.
|
|
915
1181
|
|
|
916
|
-
| Property | Type |
|
|
917
|
-
| --- | --- | --- |
|
|
918
|
-
| `token` | string |
|
|
919
|
-
| `token_type_hint` | string
|
|
920
|
-
| `client_id` | string |
|
|
921
|
-
| `client_secret` | string |
|
|
1182
|
+
| Property | Type | Description |
|
|
1183
|
+
| --- | --- | --- |
|
|
1184
|
+
| `token` * | string | |
|
|
1185
|
+
| `token_type_hint` | string (`"access_token"`, `"refresh_token"`) | |
|
|
1186
|
+
| `client_id` * | string | |
|
|
1187
|
+
| `client_secret` | string | |
|
|
922
1188
|
|
|
923
1189
|
### OAuthTokenRequest
|
|
924
1190
|
|
|
925
1191
|
Body of `POST /v1/oauth/token`. Sent form-encoded per RFC 6749, or as JSON.
|
|
926
1192
|
|
|
927
|
-
| Property | Type |
|
|
928
|
-
| --- | --- | --- |
|
|
929
|
-
| `grant_type` | string
|
|
930
|
-
| `code` | string |
|
|
931
|
-
| `redirect_uri` | string (uri) |
|
|
932
|
-
| `code_verifier` | string |
|
|
933
|
-
| `refresh_token` | string |
|
|
934
|
-
| `client_id` | string |
|
|
935
|
-
| `client_secret` | string |
|
|
936
|
-
| `resource` | string (uri) |
|
|
937
|
-
| `subject_token` | string |
|
|
938
|
-
| `subject_token_type` | string
|
|
939
|
-
| `requested_token_type` | string
|
|
1193
|
+
| Property | Type | Description |
|
|
1194
|
+
| --- | --- | --- |
|
|
1195
|
+
| `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`. |
|
|
1196
|
+
| `code` | string | |
|
|
1197
|
+
| `redirect_uri` | string (format: uri) | |
|
|
1198
|
+
| `code_verifier` | string | RFC 7636: 43-128 characters from [A-Za-z0-9-._~]. Shorter values are rejected with `invalid_grant`. |
|
|
1199
|
+
| `refresh_token` | string | |
|
|
1200
|
+
| `client_id` * | string | |
|
|
1201
|
+
| `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. |
|
|
1202
|
+
| `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`. |
|
|
1203
|
+
| `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. |
|
|
1204
|
+
| `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. |
|
|
1205
|
+
| `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. |
|
|
1206
|
+
|
|
1207
|
+
### PushPreferences
|
|
1208
|
+
|
|
1209
|
+
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.
|
|
1210
|
+
|
|
1211
|
+
| Property | Type | Description |
|
|
1212
|
+
| --- | --- | --- |
|
|
1213
|
+
| `SignerViewed` | boolean | A signer opened the document for the first time. Example: `true`. |
|
|
1214
|
+
| `SignerSigned` | boolean | A signer signed the document. Example: `true`. |
|
|
1215
|
+
| `DocumentCompleted` | boolean | Every signer has signed and the document is certified. Example: `true`. |
|
|
1216
|
+
| `SignerDeclined` | boolean | A signer declined to sign. Example: `true`. |
|
|
1217
|
+
| `DocumentAboutToExpire` | boolean | The signature deadline is approaching. Example: `true`. |
|
|
1218
|
+
| `DocumentExpired` | boolean | The signature deadline passed. Example: `true`. |
|
|
1219
|
+
| `SignerIdentityReviewRequired` | boolean | A signer's identity awaits the sender's review. The e-mail for this is always sent. Example: `true`. |
|
|
1220
|
+
| `SignerWhatsappFailed` | boolean | A WhatsApp notification to a signer could not be delivered. Example: `true`. |
|
|
940
1221
|
|
|
941
1222
|
### ResendCostEstimate
|
|
942
1223
|
|
|
943
|
-
Credits
|
|
1224
|
+
Credits a reminder to one signer will take, and whether the account can pay for it. A reminder uses no document.
|
|
944
1225
|
|
|
945
|
-
| Property | Type |
|
|
946
|
-
| --- | --- | --- |
|
|
947
|
-
| `total` | number |
|
|
948
|
-
| `breakdown` | Array<object
|
|
949
|
-
| `breakdown[].code` | string |
|
|
950
|
-
| `breakdown[].name` | string |
|
|
951
|
-
| `breakdown[].cost` | number |
|
|
952
|
-
| `credit_balance` | number
|
|
953
|
-
| `has_sufficient_credits` | boolean |
|
|
1226
|
+
| Property | Type | Description |
|
|
1227
|
+
| --- | --- | --- |
|
|
1228
|
+
| `total` | number | Sum of the `breakdown` costs. Example: `0.45`. |
|
|
1229
|
+
| `breakdown` | Array<object { `code`: string; `name`: string; `cost`: number }> | |
|
|
1230
|
+
| `breakdown[].code` | string | Example: `"NotificationWhatsappResend"`. |
|
|
1231
|
+
| `breakdown[].name` | string | Example: `"Whatsapp Notification Resend"`. |
|
|
1232
|
+
| `breakdown[].cost` | number | Example: `0.45`. |
|
|
1233
|
+
| `credit_balance` | number or null | Credits available. `null` when the account's credits are not limited. Example: `10`. |
|
|
1234
|
+
| `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
1235
|
|
|
955
1236
|
### Signer
|
|
956
1237
|
|
|
957
1238
|
A signing party belonging to a workspace account.
|
|
958
1239
|
|
|
959
|
-
| Property | Type |
|
|
960
|
-
| --- | --- | --- |
|
|
961
|
-
| `resource` | string |
|
|
962
|
-
| `id` | string |
|
|
963
|
-
| `full_name` | string |
|
|
964
|
-
| `email` | string (email) |
|
|
965
|
-
| `whatsapp_phone_number` | string
|
|
966
|
-
| `
|
|
967
|
-
| `
|
|
1240
|
+
| Property | Type | Description |
|
|
1241
|
+
| --- | --- | --- |
|
|
1242
|
+
| `resource` | string | Present in single-resource responses. Example: `"signer"`. |
|
|
1243
|
+
| `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
|
|
1244
|
+
| `full_name` | string | Example: `"John Signer"`. |
|
|
1245
|
+
| `email` | string or null (format: email) | Example: `"signer@example.com"`. |
|
|
1246
|
+
| `whatsapp_phone_number` | string or null | E.164 format; normalized on save. Example: `"+5548999990000"`. |
|
|
1247
|
+
| `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
|
|
1248
|
+
| `has_accepted_terms` | boolean | Example: `false`. |
|
|
968
1249
|
|
|
969
1250
|
### SignerIdentityReview
|
|
970
1251
|
|
|
971
|
-
Account review of a biometric identity verification. Images are available only during InReview.
|
|
972
1252
|
|
|
973
|
-
|
|
974
|
-
|
|
|
975
|
-
|
|
|
976
|
-
| `
|
|
977
|
-
| `
|
|
978
|
-
| `
|
|
979
|
-
| `
|
|
980
|
-
| `reason_codes
|
|
981
|
-
| `reason_codes[].
|
|
982
|
-
| `
|
|
983
|
-
| `
|
|
984
|
-
| `expected
|
|
985
|
-
| `expected.
|
|
986
|
-
| `
|
|
987
|
-
| `document
|
|
988
|
-
| `document.
|
|
989
|
-
| `document.
|
|
990
|
-
| `
|
|
991
|
-
| `matches
|
|
992
|
-
| `matches.
|
|
993
|
-
| `matches.
|
|
994
|
-
| `
|
|
995
|
-
| `checks
|
|
996
|
-
| `checks[].
|
|
997
|
-
| `checks[].
|
|
998
|
-
| `checks[].
|
|
999
|
-
| `
|
|
1000
|
-
| `
|
|
1001
|
-
| `
|
|
1002
|
-
| `
|
|
1003
|
-
| `reviewed_by
|
|
1004
|
-
| `reviewed_by.
|
|
1005
|
-
| `
|
|
1006
|
-
| `
|
|
1007
|
-
| `
|
|
1253
|
+
|
|
1254
|
+
| Property | Type | Description |
|
|
1255
|
+
| --- | --- | --- |
|
|
1256
|
+
| `id` | string | Example: `"104c267f8e1e8c6855d7788b76a8"`. |
|
|
1257
|
+
| `status` | string (`"Pending"`, `"InReview"`, `"Approved"`, `"Declined"`, `"Expired"`, `"Abandoned"`) | Example: `"InReview"`. |
|
|
1258
|
+
| `provider` | string (`"AssinafyVerify"`) | Example: `"AssinafyVerify"`. |
|
|
1259
|
+
| `verification_method` | string (`"IdDocumentFaceMatchBasic"`) | Example: `"IdDocumentFaceMatchBasic"`. |
|
|
1260
|
+
| `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. |
|
|
1261
|
+
| `reason_codes[].code` | string | Example: `"NAME_MISMATCH"`. |
|
|
1262
|
+
| `reason_codes[].description` | string | Example: `"Nome no documento difere do cadastrado (similaridade 52%)"`. |
|
|
1263
|
+
| `evidence_available` | boolean | Example: `true`. |
|
|
1264
|
+
| `expected` | object { `name`: string or null; `cpf`: string or null } | What the signer was registered with. |
|
|
1265
|
+
| `expected.name` | string or null | Example: `"Maria da Silva"`. |
|
|
1266
|
+
| `expected.cpf` | string or null | Example: `"52998224725"`. |
|
|
1267
|
+
| `document` | object { `type`: string or null; `name`: string or null; `cpf`: string or null } | What was read from the document. |
|
|
1268
|
+
| `document.type` | string or null | Example: `"CNH"`. |
|
|
1269
|
+
| `document.name` | string or null | Example: `"MARIA SILVA"`. |
|
|
1270
|
+
| `document.cpf` | string or null | Example: `"52998224725"`. |
|
|
1271
|
+
| `matches` | object { `cpf`: boolean or null; `name`: number or null; `birth_date`: boolean or null } | |
|
|
1272
|
+
| `matches.cpf` | boolean or null | Example: `true`. |
|
|
1273
|
+
| `matches.name` | number or null | Name similarity, 0-1. Example: `0.5217`. |
|
|
1274
|
+
| `matches.birth_date` | boolean or null | Example: `null`. |
|
|
1275
|
+
| `checks` | Array<object { `name`: string; `result`: string; `score`: number or null; `reasons`: Array<string> }> | |
|
|
1276
|
+
| `checks[].name` | string | Example: `"name"`. |
|
|
1277
|
+
| `checks[].result` | string | pass, review, skipped, or a failure result. Example: `"review"`. |
|
|
1278
|
+
| `checks[].score` | number or null | Example: `0.5217`. |
|
|
1279
|
+
| `checks[].reasons` | Array<string> | Example: `["NAME_MISMATCH"]`. |
|
|
1280
|
+
| `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"]`. |
|
|
1281
|
+
| `ruleset_version` | string or null | Example: `"2026-10-12.2"`. |
|
|
1282
|
+
| `evidence_sha256` | string or null | Example: `"9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2"`. |
|
|
1283
|
+
| `reviewed_by` | object { `id`: string; `name`: string } | |
|
|
1284
|
+
| `reviewed_by.id` | string | Example: `"Kx9pQ2"`. |
|
|
1285
|
+
| `reviewed_by.name` | string | Example: `"Ana Souza"`. |
|
|
1286
|
+
| `reviewed_at` | string or null (format: date-time) | Example: `"2026-10-13T21:05:00Z"`. |
|
|
1287
|
+
| `review_note` | string or null | Example: `"Conferido por videochamada."`. |
|
|
1288
|
+
| `completed_at` | string or null (format: date-time) | Example: `"2026-10-13T21:05:00Z"`. |
|
|
1008
1289
|
|
|
1009
1290
|
### SignerSelf
|
|
1010
1291
|
|
|
1011
1292
|
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
1293
|
|
|
1013
|
-
| Property | Type |
|
|
1014
|
-
| --- | --- | --- |
|
|
1015
|
-
| `resource` | string |
|
|
1016
|
-
| `id` | string |
|
|
1017
|
-
| `full_name` | string |
|
|
1018
|
-
| `email` | string (email) |
|
|
1019
|
-
| `whatsapp_phone_number` | string
|
|
1020
|
-
| `
|
|
1021
|
-
| `
|
|
1022
|
-
| `
|
|
1023
|
-
| `
|
|
1024
|
-
| `
|
|
1025
|
-
| `verification_method` | string
|
|
1294
|
+
| Property | Type | Description |
|
|
1295
|
+
| --- | --- | --- |
|
|
1296
|
+
| `resource` | string | Present in single-resource responses. Example: `"signer"`. |
|
|
1297
|
+
| `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
|
|
1298
|
+
| `full_name` | string | Example: `"John Signer"`. |
|
|
1299
|
+
| `email` | string or null (format: email) | Example: `"signer@example.com"`. |
|
|
1300
|
+
| `whatsapp_phone_number` | string or null | E.164 format; normalized on save. Example: `"+5548999990000"`. |
|
|
1301
|
+
| `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
|
|
1302
|
+
| `has_accepted_terms` | boolean | Example: `false`. |
|
|
1303
|
+
| `has_signature` | boolean | Whether the signer has a saved signature image stored. Example: `true`. |
|
|
1304
|
+
| `has_initial` | boolean | Whether the signer has a saved initials image stored. Example: `false`. |
|
|
1305
|
+
| `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`. |
|
|
1306
|
+
| `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"`. |
|
|
1307
|
+
|
|
1308
|
+
### SigningDocument
|
|
1309
|
+
|
|
1310
|
+
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.
|
|
1311
|
+
|
|
1312
|
+
| Property | Type | Description |
|
|
1313
|
+
| --- | --- | --- |
|
|
1314
|
+
| `resource` | string | Present in single-resource responses. Example: `"document"`. |
|
|
1315
|
+
| `id` | string | Example: `"615601fab04c0a3147bb1246"`. |
|
|
1316
|
+
| `account_id` | string | Example: `"d199996981dbd199996981db"`. |
|
|
1317
|
+
| `template_id` | string or null | Example: `null`. |
|
|
1318
|
+
| `name` | string | Example: `"document.pdf"`. |
|
|
1319
|
+
| `status` | string | Status code — see GET /v1/documents/statuses. Example: `"metadata_ready"`. |
|
|
1320
|
+
| `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"}`. |
|
|
1321
|
+
| `is_closed` | boolean | Example: `false`. |
|
|
1322
|
+
| `signing_url` | string | Example: `"https://api.assinafy.com.br/v1/sign/doc1"`. |
|
|
1323
|
+
| `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"`. |
|
|
1324
|
+
| `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"`. |
|
|
1325
|
+
| `decline_reason` | string or null | Example: `null`. |
|
|
1326
|
+
| `declined_by` | [`Signer`](#signer) or null | |
|
|
1327
|
+
| `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | |
|
|
1328
|
+
| `tags[].id` | string | |
|
|
1329
|
+
| `tags[].name` | string | |
|
|
1330
|
+
| `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
|
|
1331
|
+
| `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`. |
|
|
1332
|
+
| `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
|
|
1333
|
+
| `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`. |
|
|
1334
|
+
| `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. |
|
|
1335
|
+
| `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
|
|
1336
|
+
| `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
|
|
1337
|
+
| `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`. |
|
|
1338
|
+
| `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
1339
|
+
| `updated_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
|
|
1340
|
+
| `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. |
|
|
1341
|
+
| `is_signer_access_closed` | boolean | Whether the code is closed. Example: `false`. |
|
|
1342
|
+
| `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`). |
|
|
1343
|
+
| `certified_copy.available` * | boolean | Example: `false`. |
|
|
1344
|
+
| `certified_copy.notification_method` * | string or null (`"Email"`, `"Whatsapp"`, `null`) | The channel it goes on; `null` when there is none. Example: `"Email"`. |
|
|
1345
|
+
| `certified_copy.resends_left` * | integer or null | WhatsApp re-sends left; `null` for e-mail. Example: `null`. |
|
|
1026
1346
|
|
|
1027
1347
|
### SigningUrl
|
|
1028
1348
|
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
|
1032
|
-
|
|
|
1349
|
+
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.
|
|
1350
|
+
|
|
1351
|
+
| Property | Type | Description |
|
|
1352
|
+
| --- | --- | --- |
|
|
1353
|
+
| `signer_id` | string | |
|
|
1354
|
+
| `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"`. |
|
|
1355
|
+
| `embedded` | boolean | Whether the signer was marked `embedded` when the assignment was created. Example: `false`. |
|
|
1033
1356
|
|
|
1034
1357
|
### Tag
|
|
1035
1358
|
|
|
1036
1359
|
A workspace-scoped label. Names are unique per workspace (case-insensitive).
|
|
1037
1360
|
|
|
1038
|
-
| Property | Type |
|
|
1039
|
-
| --- | --- | --- |
|
|
1040
|
-
| `resource` | string |
|
|
1041
|
-
| `id` | string |
|
|
1042
|
-
| `name` | string |
|
|
1043
|
-
| `color` | string
|
|
1044
|
-
| `created_at` | string (date-time) |
|
|
1045
|
-
| `updated_at` | string (date-time) |
|
|
1361
|
+
| Property | Type | Description |
|
|
1362
|
+
| --- | --- | --- |
|
|
1363
|
+
| `resource` | string | Example: `"tag"`. |
|
|
1364
|
+
| `id` | string | Example: `"fa8c09f3e709a8a1c82d69b1454"`. |
|
|
1365
|
+
| `name` | string | Example: `"Contracts"`. |
|
|
1366
|
+
| `color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
|
|
1367
|
+
| `created_at` | string (format: date-time) | Example: `"2026-05-14T12:00:00Z"`. |
|
|
1368
|
+
| `updated_at` | string (format: date-time) | Example: `"2026-05-14T12:00:00Z"`. |
|
|
1046
1369
|
|
|
1047
1370
|
### Template
|
|
1048
1371
|
|
|
1049
1372
|
A reusable document template.
|
|
1050
1373
|
|
|
1051
|
-
| Property | Type |
|
|
1052
|
-
| --- | --- | --- |
|
|
1053
|
-
| `resource` | string |
|
|
1054
|
-
| `id` | string |
|
|
1055
|
-
| `name` | string |
|
|
1056
|
-
| `document_name` | string
|
|
1057
|
-
| `message` | string
|
|
1058
|
-
| `status` | string |
|
|
1059
|
-
| `pages` | Array<[`TemplatePage`](#templatepage)> |
|
|
1060
|
-
| `roles` | Array<[`TemplateRole`](#templaterole)> |
|
|
1061
|
-
| `tags` | Array<object
|
|
1062
|
-
| `tags[].id` | string |
|
|
1063
|
-
| `tags[].name` | string |
|
|
1064
|
-
| `default_document_tags` | Array<object
|
|
1065
|
-
| `default_document_tags[].id` | string |
|
|
1066
|
-
| `default_document_tags[].name` | string |
|
|
1067
|
-
| `created_at` | string (date-time) |
|
|
1068
|
-
| `updated_at` | string (date-time) |
|
|
1374
|
+
| Property | Type | Description |
|
|
1375
|
+
| --- | --- | --- |
|
|
1376
|
+
| `resource` | string | Example: `"template"`. |
|
|
1377
|
+
| `id` | string | Example: `"fa88b732db84d01427d4cdd1092"`. |
|
|
1378
|
+
| `name` | string | Example: `"template.pdf"`. |
|
|
1379
|
+
| `document_name` | string or null | Default name for documents created from this template. |
|
|
1380
|
+
| `message` | string or null | Default invitation message. |
|
|
1381
|
+
| `status` | string | One of uploading, uploaded, processing, ready, failed. Example: `"ready"`. |
|
|
1382
|
+
| `pages` | Array<[`TemplatePage`](#templatepage)> | |
|
|
1383
|
+
| `roles` | Array<[`TemplateRole`](#templaterole)> | |
|
|
1384
|
+
| `tags` | Array<object { `id`: string; `name`: string }> | |
|
|
1385
|
+
| `tags[].id` | string | |
|
|
1386
|
+
| `tags[].name` | string | |
|
|
1387
|
+
| `default_document_tags` | Array<object { `id`: string; `name`: string }> | Applied to documents created from this template; only returned by the single-template endpoint. |
|
|
1388
|
+
| `default_document_tags[].id` | string | |
|
|
1389
|
+
| `default_document_tags[].name` | string | |
|
|
1390
|
+
| `created_at` | string (format: date-time) | |
|
|
1391
|
+
| `updated_at` | string (format: date-time) | |
|
|
1069
1392
|
|
|
1070
1393
|
### TemplateFieldPlacement
|
|
1071
1394
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
|
1075
|
-
|
|
|
1076
|
-
| `
|
|
1077
|
-
| `
|
|
1078
|
-
| `
|
|
1079
|
-
| `
|
|
1080
|
-
| `
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
| Property | Type | Description |
|
|
1398
|
+
| --- | --- | --- |
|
|
1399
|
+
| `id` | string | |
|
|
1400
|
+
| `field_id` | string | |
|
|
1401
|
+
| `role_id` | string | |
|
|
1402
|
+
| `label` | string | |
|
|
1403
|
+
| `display_settings` | any | Rendering metadata for the placement. |
|
|
1404
|
+
| `created_at` | string (format: date-time) | |
|
|
1405
|
+
| `updated_at` | string (format: date-time) | |
|
|
1081
1406
|
|
|
1082
1407
|
### TemplatePage
|
|
1083
1408
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
|
1087
|
-
|
|
|
1088
|
-
| `
|
|
1089
|
-
| `
|
|
1090
|
-
| `
|
|
1091
|
-
| `
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
| Property | Type | Description |
|
|
1412
|
+
| --- | --- | --- |
|
|
1413
|
+
| `id` | string | |
|
|
1414
|
+
| `number` | integer | Example: `1`. |
|
|
1415
|
+
| `height` | integer | Example: `2100`. |
|
|
1416
|
+
| `width` | integer | Example: `1275`. |
|
|
1417
|
+
| `download_url` | string | |
|
|
1418
|
+
| `fields` | Array<[`TemplateFieldPlacement`](#templatefieldplacement)> | |
|
|
1092
1419
|
|
|
1093
1420
|
### TemplateRole
|
|
1094
1421
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
|
1098
|
-
|
|
|
1099
|
-
| `
|
|
1100
|
-
| `
|
|
1101
|
-
| `
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
| Property | Type | Description |
|
|
1425
|
+
| --- | --- | --- |
|
|
1426
|
+
| `id` | string | |
|
|
1427
|
+
| `name` | string | Example: `"Editor"`. |
|
|
1428
|
+
| `assignment_type` | string | Example: `"Editor"`. |
|
|
1429
|
+
| `created_at` | string (format: date-time) | |
|
|
1430
|
+
| `updated_at` | string (format: date-time) | |
|
|
1102
1431
|
|
|
1103
1432
|
### WebhookDispatch
|
|
1104
1433
|
|
|
1105
1434
|
A single webhook delivery-history entry.
|
|
1106
1435
|
|
|
1107
|
-
| Property | Type |
|
|
1108
|
-
| --- | --- | --- |
|
|
1109
|
-
| `resource` | string |
|
|
1110
|
-
| `id` | string |
|
|
1111
|
-
| `event` | string |
|
|
1112
|
-
| `activity_id` | integer |
|
|
1113
|
-
| `endpoint_id` | string
|
|
1114
|
-
| `endpoint` | string
|
|
1115
|
-
| `payload` | object
|
|
1116
|
-
| `delivered` | boolean |
|
|
1117
|
-
| `webhook_id` | string
|
|
1118
|
-
| `attempt` | integer
|
|
1119
|
-
| `kind` | string
|
|
1120
|
-
| `will_retry` | boolean |
|
|
1121
|
-
| `
|
|
1122
|
-
| `
|
|
1123
|
-
| `
|
|
1124
|
-
| `
|
|
1125
|
-
| `
|
|
1436
|
+
| Property | Type | Description |
|
|
1437
|
+
| --- | --- | --- |
|
|
1438
|
+
| `resource` | string | Always `activity_dispatching_history` in single-resource responses. Example: `"activity_dispatching_history"`. |
|
|
1439
|
+
| `id` | string | Dispatch entry ID. Example: `"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"`. |
|
|
1440
|
+
| `event` | string | Event type that triggered the dispatch. Example: `"document_ready"`. |
|
|
1441
|
+
| `activity_id` | integer | Internal activity ID associated with the dispatch. Example: `456`. |
|
|
1442
|
+
| `endpoint_id` | string or null | ID of the webhook endpoint the delivery was sent to (`null` once that endpoint is deleted). Example: `"65f1c2a9b3e4d5f60718293a4b5c6d7e"`. |
|
|
1443
|
+
| `endpoint` | string or null | URL that received the request. Example: `"https://example.com/webhook"`. |
|
|
1444
|
+
| `payload` | object or null | JSON payload sent to the endpoint. |
|
|
1445
|
+
| `delivered` | boolean | Whether delivery succeeded. Example: `true`. |
|
|
1446
|
+
| `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"`. |
|
|
1447
|
+
| `attempt` | integer or null | Which attempt of this event to this endpoint the entry records, counted from 1. Example: `2`. |
|
|
1448
|
+
| `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"`. |
|
|
1449
|
+
| `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`. |
|
|
1450
|
+
| `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`. |
|
|
1451
|
+
| `http_status` | integer or null | HTTP status returned (null if connection failed). Example: `200`. |
|
|
1452
|
+
| `response_body` | string or null | Endpoint response body, truncated to 2000 chars. Example: `"OK"`. |
|
|
1453
|
+
| `error` | string or null | Delivery error message, if any. Example: `null`. |
|
|
1454
|
+
| `created_at` | string (format: date-time) | Example: `"2024-01-15T10:30:00Z"`. |
|
|
1455
|
+
| `updated_at` | string (format: date-time) | Example: `"2024-01-15T10:30:00Z"`. |
|
|
1126
1456
|
|
|
1127
1457
|
### WebhookEndpoint
|
|
1128
1458
|
|
|
1129
1459
|
A URL that receives the account's webhook events. Every active endpoint subscribed to an event receives it.
|
|
1130
1460
|
|
|
1131
|
-
| Property | Type |
|
|
1132
|
-
| --- | --- | --- |
|
|
1133
|
-
| `resource` | string |
|
|
1134
|
-
| `id` | string |
|
|
1135
|
-
| `name` | string
|
|
1136
|
-
| `url` | string (uri) |
|
|
1137
|
-
| `email` | string (email) |
|
|
1138
|
-
| `events` | Array<string> |
|
|
1139
|
-
| `is_active` | boolean |
|
|
1140
|
-
| `is_held` | boolean |
|
|
1141
|
-
| `held_since` | integer
|
|
1142
|
-
| `signing_enabled` | boolean |
|
|
1143
|
-
| `created_at` | string (date-time) |
|
|
1144
|
-
| `updated_at` | string (date-time) |
|
|
1461
|
+
| Property | Type | Description |
|
|
1462
|
+
| --- | --- | --- |
|
|
1463
|
+
| `resource` | string | Always `activity_event_subscription` in single-resource responses. Example: `"activity_event_subscription"`. |
|
|
1464
|
+
| `id` | string | Endpoint ID. Example: `"65f1c2a9b3e4d5f60718293a4b5c6d7e"`. |
|
|
1465
|
+
| `name` | string or null | Label to tell endpoints apart. Example: `"ERP"`. |
|
|
1466
|
+
| `url` | string (format: uri) | URL that receives the events; `https` is required for a new or changed URL. Example: `"https://example.com/webhooks/assinafy"`. |
|
|
1467
|
+
| `email` | string (format: email) | Contact email for delivery-failure notices. Example: `"signer@example.com"`. |
|
|
1468
|
+
| `events` | Array<string> | Event types delivered to this endpoint (see **List webhook event types**). Example: `["document_ready","signer_signed_document"]`. |
|
|
1469
|
+
| `is_active` | boolean | Whether events are delivered to this endpoint. Example: `true`. |
|
|
1470
|
+
| `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`. |
|
|
1471
|
+
| `held_since` | integer or null | When the pause began (Unix timestamp, seconds); `null` while deliveries run. Example: `null`. |
|
|
1472
|
+
| `signing_enabled` | boolean | Whether deliveries carry a `webhook-signature` header (see **Webhook Payloads → Verifying signatures**). Example: `true`. |
|
|
1473
|
+
| `created_at` | string (format: date-time) | Example: `"2026-10-01T12:00:00Z"`. |
|
|
1474
|
+
| `updated_at` | string (format: date-time) | Example: `"2026-10-01T12:00:00Z"`. |
|
|
1145
1475
|
|
|
1146
1476
|
### WebhookEndpointSecret
|
|
1147
1477
|
|
|
1148
1478
|
An endpoint's signing secret.
|
|
1149
1479
|
|
|
1150
|
-
| Property | Type |
|
|
1151
|
-
| --- | --- | --- |
|
|
1152
|
-
| `secret` | string |
|
|
1480
|
+
| Property | Type | Description |
|
|
1481
|
+
| --- | --- | --- |
|
|
1482
|
+
| `secret` | string | Standard Webhooks secret: `whsec_` followed by the base64-encoded key. Example: `"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"`. |
|
|
1153
1483
|
|
|
1154
1484
|
### WebhookEvent
|
|
1155
1485
|
|
|
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.
|
|
1486
|
+
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
1487
|
|
|
1160
|
-
| Property | Type |
|
|
1161
|
-
| --- | --- | --- |
|
|
1162
|
-
| `id` | integer |
|
|
1163
|
-
| `event` | string |
|
|
1164
|
-
| `message` | string
|
|
1165
|
-
| `payload` | object
|
|
1166
|
-
| `origin` | object
|
|
1167
|
-
| `origin.ip` | string |
|
|
1168
|
-
| `origin.user-agent` | string |
|
|
1169
|
-
| `created_at` | integer |
|
|
1170
|
-
| `subject` | object |
|
|
1171
|
-
| `object` | object |
|
|
1172
|
-
| `account_id` | string |
|
|
1488
|
+
| Property | Type | Description |
|
|
1489
|
+
| --- | --- | --- |
|
|
1490
|
+
| `id` * | integer | ID of the activity that produced the event. Example: `184467`. |
|
|
1491
|
+
| `event` * | string | Event type. See **List webhook event types**; `webhook_test` is sent only by **Send a test delivery**. Example: `"signer_viewed_document"`. |
|
|
1492
|
+
| `message` | string or null | Reserved; currently always `null`. Example: `null`. |
|
|
1493
|
+
| `payload` | object or null | Event-specific parameters; keys vary per event. |
|
|
1494
|
+
| `origin` | object { `ip`: string; `user-agent`: string } | Where the action came from, when it was triggered by a request. |
|
|
1495
|
+
| `origin.ip` | string | Example: `"203.0.113.7"`. |
|
|
1496
|
+
| `origin.user-agent` | string | Example: `"Mozilla/5.0"`. |
|
|
1497
|
+
| `created_at` * | integer | When the event was recorded (Unix timestamp, seconds). Example: `1790000000`. |
|
|
1498
|
+
| `subject` * | object | Who performed the action: a `User`, `Signer` or `Account` (the endpoint itself in a `webhook_test`), plus a `type` property naming it. |
|
|
1499
|
+
| `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. |
|
|
1500
|
+
| `account_id` * | string | ID of the account that owns the event. Example: `"65f1c2a9b3e4d5f6"`. |
|
|
1173
1501
|
|
|
1174
1502
|
### WebhookEventType
|
|
1175
1503
|
|
|
1176
1504
|
A subscribable webhook event type.
|
|
1177
1505
|
|
|
1178
|
-
| Property | Type |
|
|
1179
|
-
| --- | --- | --- |
|
|
1180
|
-
| `id` | string |
|
|
1181
|
-
| `description` | string |
|
|
1506
|
+
| Property | Type | Description |
|
|
1507
|
+
| --- | --- | --- |
|
|
1508
|
+
| `id` | string | Event type code. Example: `"document_ready"`. |
|
|
1509
|
+
| `description` | string | When the event is triggered. Example: `"Triggered when the last Signer of the assignment signs the Document."`. |
|
|
1182
1510
|
|
|
1183
1511
|
### WebhookSubscription
|
|
1184
1512
|
|
|
1185
|
-
An account's webhook subscription configuration
|
|
1513
|
+
An account's webhook subscription configuration.
|
|
1186
1514
|
|
|
1187
|
-
| Property | Type |
|
|
1188
|
-
| --- | --- | --- |
|
|
1189
|
-
| `events` | Array<string> |
|
|
1190
|
-
| `is_active` | boolean |
|
|
1191
|
-
| `is_held` | boolean |
|
|
1192
|
-
| `held_since` | integer
|
|
1193
|
-
| `url` | string
|
|
1194
|
-
| `email` | string
|
|
1195
|
-
| `updated_at` | string (date-time) |
|
|
1515
|
+
| Property | Type | Description |
|
|
1516
|
+
| --- | --- | --- |
|
|
1517
|
+
| `events` | Array<string> | Event types subscribed for delivery. Example: `["document_ready","document_prepared"]`. |
|
|
1518
|
+
| `is_active` | boolean | Whether webhook delivery is active. Example: `true`. |
|
|
1519
|
+
| `is_held` | boolean | Whether deliveries are paused after 10 failures in a row (see **Delivery contract**). Example: `false`. |
|
|
1520
|
+
| `held_since` | integer or null | When the pause began (Unix timestamp, seconds); `null` while deliveries run. Example: `null`. |
|
|
1521
|
+
| `url` | string or null | Webhook endpoint URL; `https` is required for a new or changed URL. Example: `"https://example.com?test=1"`. |
|
|
1522
|
+
| `email` | string or null | Contact email for delivery notices. Example: `"signer@example.com"`. |
|
|
1523
|
+
| `updated_at` | string or null (format: date-time) | Example: `"2023-05-10T14:58:24Z"`. |
|
|
1196
1524
|
|
|
1197
1525
|
### WhatsappNotification
|
|
1198
1526
|
|
|
1199
1527
|
A rendered WhatsApp notification sent for an assignment, split into header/body/buttons as the signer would see them.
|
|
1200
1528
|
|
|
1201
|
-
| Property | Type |
|
|
1202
|
-
| --- | --- | --- |
|
|
1203
|
-
| `sent_at` |
|
|
1204
|
-
| `header` | string |
|
|
1205
|
-
| `body` | string |
|
|
1206
|
-
| `buttons` | Array<object
|
|
1207
|
-
| `buttons[].text` | string |
|
|
1208
|
-
| `phone_number` | string |
|
|
1209
|
-
| `signer_id` | string |
|
|
1529
|
+
| Property | Type | Description |
|
|
1530
|
+
| --- | --- | --- |
|
|
1531
|
+
| `sent_at` | string (format: date-time) | When the message was sent. Example: `"2026-07-07T12:00:00Z"`. |
|
|
1532
|
+
| `header` | string | Example: `"Documento para assinatura: Contrato de Servico"`. |
|
|
1533
|
+
| `body` | string | |
|
|
1534
|
+
| `buttons` | Array<object { `text`: string }> | |
|
|
1535
|
+
| `buttons[].text` | string | The button label shown to the signer. Example: `"Abrir documento"`. |
|
|
1536
|
+
| `phone_number` | string | Recipient phone (E.164). Example: `"+5511999990001"`. |
|
|
1537
|
+
| `signer_id` | string | Example: `"a51edaee68a7"`. |
|