assinafy 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,10 @@
1
1
  # Assinafy Ruby SDK API Reference
2
2
 
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
- > `scripts/check_api_contract.rb` validates contract compatibility weekly.
3
+ > Contract source: Assinafy API v1 OpenAPI 3.1.0, retrieved 2026-11-30 from
4
+ > `https://api.assinafy.com.br/v1/docs/openapi.json` (121 paths, 158 operations, 63 schemas).
5
+ > `scripts/check_api_contract.rb` validates contract compatibility weekly. The 15 Authentication operations
6
+ > (login, passwords, two-factor, social login and API keys) are intentionally not wrapped: integrations
7
+ > authenticate with an API key or an OAuth client created in the Assinafy app.
6
8
 
7
9
  This is the SDK-facing contract reference. Paths below are wire paths; Ruby methods return the unwrapped
8
10
  `data` member for Assinafy response envelopes, pagination helpers return `{ data:, meta: }`, binary methods
@@ -12,26 +14,22 @@ Required parameters and object properties are marked with `*`.
12
14
 
13
15
  ## Authentication and safety
14
16
 
15
- - `X-Api-Key` is the recommended server-side credential. A bearer token is either a login session token or an
16
- OAuth 2.1 access token. If both an API key and a token are configured, the current SDK sends only `X-Api-Key`;
17
+ - `X-Api-Key` is the recommended server-side credential. A bearer token is an OAuth 2.1 access token. If both an API key and a token are configured, the current SDK sends only `X-Api-Key`;
17
18
  prefer configuring exactly one credential.
18
19
  - OAuth 2.1 authenticates an application acting *in a user's workspace with that user's permission*, as opposed
19
- to `X-Api-Key`/bearer, which authenticate the workspace or user directly. The flow is authorization-code with
20
+ to `X-Api-Key`, which authenticates the workspace directly. The flow is authorization-code with
20
21
  mandatory PKCE `S256`; `Assinafy::OAuth` builds the verifier, challenge, `state`, and authorization URL, and
21
22
  `client.oauth` covers the token lifecycle. A token is scoped to one workspace and carries only the scopes the
22
23
  user approved, and it never reaches billing, account lifecycle, credential management, or admin surfaces
23
24
  regardless of scope. A missing scope answers `403` with a `WWW-Authenticate` challenge naming it, which the
24
25
  SDK exposes as `ApiError#context[:www_authenticate]` on every resource: reconnect with that scope added rather
25
26
  than retrying. Store the `code_verifier`, `state`, and expected issuer with each authorization attempt — the
26
- issuer of the authorization server it uses: `https://auth.assinafy.com.br` in production,
27
- `https://auth-sandbox.assinafy.com.br` in the sandbox. Check `state` and `iss` against those stored values on
27
+ issuer of the authorization server it uses (`https://auth.assinafy.com.br` in production; another environment
28
+ publishes its own in its discovery metadata). Check `state` and `iss` against those stored values on
28
29
  the callback before anything else, including an `error=` return, and keep refresh tokens out of logs.
29
30
  - Signer-facing operations use the one-time `signer-access-code` query parameter where shown. Never log, commit,
30
31
  or place API keys, bearer tokens, signer codes, or real recipient addresses in examples or fixtures.
31
- - `POST /v1/login` answers with an `mfa_token` challenge instead of an access token when the user has two-factor
32
- authentication enabled. `AuthResource#verify_mfa` exchanges it, without workspace credentials; the challenge is
33
- single-use and expires 5 minutes after login.
34
- - Webhook endpoint signing secrets (`whsec_...`) are readable only with an API key or user session.
32
+ - Webhook endpoint signing secrets (`whsec_...`) are readable only with an API key.
35
33
  OAuth applications with `webhooks:write` can rotate secrets and must store the returned value. Treat them like API keys. Verify every delivery with
36
34
  `WebhookVerifier#verify_delivery` against the raw request body.
37
35
  - HTTP connections require TLS 1.2 or newer and use Ruby/Faraday TLS verification and the host system trust store;
@@ -56,19 +54,15 @@ Required parameters and object properties are marked with `*`.
56
54
  | 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
55
  | 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
56
  | 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) } |
57
+ | POST | `/v1/documents/{documentId}/assignments` | `AssignmentResource#create` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method*`: string (`"virtual"`, `"collect"`); `signers*`: Array<object { `id*`: string; `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)>; `embedded`: boolean; `step`: integer; `sign_as`: string or null (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`) }>; `entries`: Array<object { `page_id`: string; `fields`: Array<object> }>; `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) } |
58
+ | POST | `/v1/documents/{documentId}/assignments/estimate-cost` | `AssignmentResource#estimate_cost` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `method`: string (`"virtual"`, `"collect"`); `signers`: Array<object { `verification_method`: string (`"Email"`, `"Whatsapp"`, `"DigitalCertificate"`, `"IdDocumentFaceMatchBasic"`); `sign_as`: string or null (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`); `notification_methods`: Array<string (`"Email"`, `"Whatsapp"`)> }>; `entries`: Array<object> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`CostEstimate`](#costestimate) } |
61
59
  | 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
60
  | 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
61
  | 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
62
  | 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) |
63
+ | 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); `200` `image/png` string (format: binary); `200` `application/pdf` string (format: binary) |
66
64
  | 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) } |
65
+ | GET | `/v1/documents/{documentId}/signer-capacities` | `DocumentResource#signer_capacities` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<object { `signer_id*`: string; `sign_as*`: string (`"Sign"`, `"Approve"`, `"Acknowledge"`, `"Party"`, `"Witness"`, `"Intervening"`, `"Receipt"`, `"IssuerEndorserGuarantor"`, `"IssuerEndorserGuarantorSurety"`, `"Surety"`, `"PartySurety"`, `"JointDebtor"`, `"PartyJointDebtor"`, `"ContractingParty"`, `"ContractedParty"`, `"Landlord"`, `"Tenant"`, `"Buyer"`, `"Seller"`, `"AttorneyInFact"`, `"LegalRepresentative"`, `"Employer"`, `"Employee"`) }> } |
72
66
  | 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
67
  | 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
68
  | 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) } |
@@ -79,15 +73,18 @@ Required parameters and object properties are marked with `*`.
79
73
  | 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
74
  | 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
75
  | 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) } |
76
+ | GET | `/v1/documents/{documentId}` | `DocumentResource#details` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>query `expand`: Array<string (`"envelope_id"`, `"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
83
77
  | 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
78
  | 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) |
79
+ | PUT | `/v1/documents/{documentId}/cancel` | `DocumentResource#cancel` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`Document`](#document) } |
80
+ | GET | `/v1/documents/{documentId}/download/{artifactName}` | `DocumentResource#download` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>path `artifactName*`: string (`"original"`, `"certificated"`, `"certificate-page"`, `"pades"`, `"bundle"`) | None | `200` `application/pdf` string (format: binary) |
86
81
  | GET | `/v1/documents/{documentSignatureHash}/verify` | `DocumentResource#verify` | Public | path `documentSignatureHash*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`DocumentVerification`](#documentverification) } |
87
82
  | 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)> } |
88
83
  | 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)> } |
89
84
  | 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)> } |
90
85
  | 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 } } |
86
+ | GET | `/v1/documents/{documentId}/watchers` | `DocumentResource#watchers` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
87
+ | PUT | `/v1/documents/{documentId}/watchers` | `DocumentResource#set_watchers` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `watcher_ids*`: Array<string (min length: 1)> (max items: 10) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Signer`](#signer)> } |
91
88
  | 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
89
  | 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
90
  | 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) } |
@@ -104,6 +101,7 @@ Required parameters and object properties are marked with `*`.
104
101
  | 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
102
  | 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
103
  | 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 } } |
104
+ | POST | `/v1/accounts/{accountId}/envelopes/{envelopeId}/signers/{signerId}/estimate-resend-cost` | `EnvelopeResource#estimate_resend_cost` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `envelopeId*`: string<br>path `signerId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ResendCostEstimate`](#resendcostestimate) } |
107
105
  | 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
106
  | 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) } |
109
107
  | 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)> } |
@@ -111,56 +109,55 @@ Required parameters and object properties are marked with `*`.
111
109
  | 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) } |
112
110
  | 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) } |
113
111
  | 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> } |
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)> } |
112
+ | POST | `/v1/accounts/{accountId}/fields/{fieldId}/validate` | `FieldResource#validate` | Bearer token or `X-Api-Key` or signer access code | path `accountId*`: string<br>path `fieldId*`: string | required; `application/json` object { `value*`: any } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`FieldValidation`](#fieldvalidation) } |
113
+ | POST | `/v1/accounts/{accountId}/fields/validate-multiple` | `FieldResource#validate_multiple` | Bearer token or `X-Api-Key` or signer access code | path `accountId*`: string | required; `application/json` Array<object { `field_id*`: string; `value*`: any }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`FieldValidationResult`](#fieldvalidationresult)> } |
116
114
  | 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 } } |
115
+ | GET | `/v1/documents/{documentId}/notification-history` | `DocumentResource#notification_history` | Bearer token or `X-Api-Key` | path `documentId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<object { `signer_id*`: string; `notification_history*`: Array<[`NotificationHistoryEntry`](#notificationhistoryentry) plus object> }> } |
122
116
  | 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
117
  | 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
118
  | 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
119
  | 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 |
120
+ | POST | `/v1/oauth/token` | `OAuthResource#token` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthTokenRequest`](#oauthtokenrequest); `application/json` [`OAuthTokenRequest`](#oauthtokenrequest) | `200` `application/json` object { `access_token`: string; `issued_token_type`: string; `token_type`: string; `expires_in`: integer; `refresh_token`: string or null; `scope`: string; `id_token`: string or null } |
121
+ | POST | `/v1/oauth/revoke` | `OAuthResource#revoke` | Public | None | required; `application/x-www-form-urlencoded` [`OAuthRevokeRequest`](#oauthrevokerequest); `application/json` [`OAuthRevokeRequest`](#oauthrevokerequest) | `200` no body |
128
122
  | 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) |
123
+ | GET | `/v1/documents/{documentId}/thumbnail` | `DocumentResource#thumbnail` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
124
+ | GET | `/v1/documents/{documentId}/pages/{pageId}/download` | `DocumentResource#download_page` | Bearer token or `X-Api-Key` or signer access code | path `documentId*`: string<br>path `pageId*`: string<br>query `artifact`: string | None | `200` `image/*` string (format: binary) |
131
125
  | 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 } } |
126
+ | 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; `channel`: string; `recipient`: string } } |
133
127
  | 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
128
  | 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) } |
129
+ | POST | `/v1/documents/{documentId}/scheduled-sends` | `AssignmentResource#schedule` | Bearer token or `X-Api-Key` | path `documentId*`: string | required; `application/json` object { `send_at*`: string (format: date-time) or integer; `method`: string (`"virtual"`, `"collect"`); `signers*`: Array<object>; `expires_at`: string (format: date-time) or integer or null } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
130
+ | GET | `/v1/accounts/{accountId}/scheduled-sends` | `ScheduledSendResource#list` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50)<br>query `document_id`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`ScheduledSend`](#scheduledsend)> } |
131
+ | POST | `/v1/accounts/{accountId}/scheduled-sends` | `EnvelopeResource#schedule` | Bearer token or `X-Api-Key` | path `accountId*`: string | required; `application/json` [`EnvelopeCreateRequest`](#envelopecreaterequest) plus object { `send_at*`: string (format: date-time) or integer } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
132
+ | PUT | `/v1/accounts/{accountId}/scheduled-sends/{scheduledSendId}/cancel` | `ScheduledSendResource#cancel` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `scheduledSendId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
133
+ | PUT | `/v1/accounts/{accountId}/scheduled-sends/{scheduledSendId}/send` | `ScheduledSendResource#send_now` | Bearer token or `X-Api-Key` | path `accountId*`: string<br>path `scheduledSendId*`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`ScheduledSend`](#scheduledsend) } |
135
134
  | 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
135
  | 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) } |
137
136
  | 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) } |
138
137
  | 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) } |
139
138
  | 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> } |
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 } } |
139
+ | GET | `/v1/signers/self` | `SignerResource#self_data` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SignerSelf`](#signerself) } |
140
+ | GET | `/v1/sign/theme` | `SignerResource#theme` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AccountTheme`](#accounttheme) } |
141
+ | GET | `/v1/sign/logo` | `SignerResource#download_logo` | signer access code | None | None | `200` `image/*` string (format: binary) |
142
+ | GET | `/v1/signers/identity-verification` | `SignerResource#identity_verification` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `can_start`: boolean; `status`: string or null; `url`: string or null; `expires_at`: string or null (format: date-time); `completed_at`: string or null (format: date-time) } } |
143
+ | POST | `/v1/signers/identity-verification` | `SignerResource#start_identity_verification` | signer access code | None | required; `application/json` object { `consent*`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `id`: string; `url`: string; `expires_at`: string or null (format: date-time) } } |
144
+ | GET | `/v1/signers/{signerId}/document` | `SignerDocumentResource#current` | signer access code | path `signerId*`: string<br>query `expand`: Array<string (`"envelope"`)> | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SigningDocument`](#signingdocument) } |
145
+ | GET | `/v1/sign` | `AssignmentResource#signer_document` | signer access code | query `has_accepted_terms`: boolean<br>query `expand`: Array<string (`"envelope"`)><br>query `document_id`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`SigningDocument`](#signingdocument) } |
146
+ | POST | `/v1/documents/{documentId}/assignments/{assignmentId}` | `AssignmentResource#sign` | signer access code | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` Array<object { `itemId*`: string; `fieldId*`: string; `pageId*`: string; `value*`: string }> | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object } |
147
+ | PUT | `/v1/documents/{documentId}/assignments/{assignmentId}/reject` | `AssignmentResource#decline` | signer access code | path `documentId*`: string<br>path `assignmentId*`: string | required; `application/json` object { `decline_reason*`: string (max length: 2000) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
148
+ | PUT | `/v1/signers/documents/sign-multiple` | `SignerDocumentResource#sign_multiple` | signer access code | None | required; `application/json` object { `document_ids*`: Array<string> } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
149
+ | PUT | `/v1/signers/documents/decline-multiple` | `SignerDocumentResource#decline_multiple` | signer access code | None | required; `application/json` object { `document_ids*`: Array<string>; `decline_reason*`: string (max length: 2000) } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
150
+ | POST | `/v1/verify` | `SignerResource#verify_email` | signer access code | None | required; `application/json` object { `verification-code*`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
151
+ | PUT | `/v1/documents/{documentId}/signers/confirm-data` | `SignerResource#confirm_data` | signer access code | path `documentId*`: string | required; `application/json` object { `email`: string (format: email); `whatsapp_phone_number`: string; `has_accepted_terms`: boolean } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
152
+ | PUT | `/v1/signers/accept-terms` | `SignerResource#accept_terms` | signer access code | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `full_name*`: string; `email*`: string or null (format: email); `has_accepted_terms*`: boolean } } |
153
+ | POST | `/v1/signature` | `SignerResource#upload_signature` | signer access code | query `type`: string<br>query `reuse`: boolean | required; `image/png` string (format: binary); `image/jpeg` string (format: binary) | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<any> } |
154
+ | GET | `/v1/signature/{signatureType}` | `SignerResource#download_signature` | signer access code | path `signatureType*`: string | None | `200` `image/*` string (format: binary) |
155
+ | GET | `/v1/signers/{signerId}/documents` | `SignerDocumentResource#list` | signer access code or Bearer token or `X-Api-Key` | path `signerId*`: string<br>query `envelope_id`: string<br>query `page`: integer (min: 1)<br>query `per-page`: integer (min: 1) (max: 50) | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
156
+ | GET | `/v1/signers/{signerId}/documents/search` | `SignerDocumentResource#search` | signer access code or Bearer token or `X-Api-Key` | path `signerId*`: string<br>query `envelope_id`: string<br>query `search`: string | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: Array<[`Document`](#document)> } |
157
+ | GET | `/v1/signers/{signerId}/documents/{documentId}/download/{artifactName}` | `SignerDocumentResource#download` | signer access code | path `signerId*`: string<br>path `documentId*`: string<br>path `artifactName*`: string (`"original"`) | None | `200` `application/pdf` string (format: binary) |
158
+ | POST | `/v1/sign/certified-copy` | `SignerDocumentResource#send_certified_copy` | signer access code | None | optional; `application/json` object { `document_id`: string } | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: object { `available`: boolean; `notification_method`: string (`"Email"`, `"Whatsapp"`); `resends_left`: integer or null; `sent_to`: string } } |
160
159
  | GET | `/v1/signers/downloads/{token}` | `SignerDocumentResource#download_certified_copy` | Public | path `token*`: string | None | `200` `application/pdf` string (format: binary) |
161
160
  | 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
161
  | 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
162
  | 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)> } |
166
163
  | 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)> } |
@@ -171,9 +168,6 @@ Required parameters and object properties are marked with `*`.
171
168
  | 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
169
  | 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
170
  | GET | `/v1/users/self` | `UserResource#me` | Bearer token or `X-Api-Key` | None | None | `200` `application/json` [`Envelope`](#envelope) plus object { `data`: [`AuthUser`](#authuser) } |
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) } |
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) } |
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> } |
177
171
  | 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
172
  | 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
173
  | 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) } |
@@ -246,9 +240,8 @@ Transport, timeout, and TLS failures raise `Assinafy::NetworkError`; caller-side
246
240
 
247
241
  ### Template operations
248
242
 
249
- The sandbox and SDK support these five template operations. Their request and response behavior is documented
250
- here so applications can use the complete template lifecycle. Confirm availability in the target Assinafy
251
- environment before making these operations part of a critical workflow.
243
+ The deployed API and the SDK support these five template operations, which the OpenAPI document does not list.
244
+ Their request and response behavior is documented here so applications can use the complete template lifecycle.
252
245
 
253
246
  | Method | Path | Ruby SDK method | Authentication | Request / response |
254
247
  | --- | --- | --- | --- | --- |
@@ -279,8 +272,13 @@ request.
279
272
  ### Document upload and tags
280
273
 
281
274
  `DocumentResource#upload` sends only the multipart `file` part; the API names the document after the uploaded
282
- file name. Rename it with `DocumentResource#rename`. Documents and templates are limited to 25 MB, checked
283
- locally together with the `.pdf` extension and `%PDF-` header.
275
+ file name. Rename it with `DocumentResource#rename`. Uploads accept PDF, DOC, DOCX and ODT; Word and OpenDocument
276
+ files are converted to PDF. Documents and templates are limited to 25 MB, checked locally together with the
277
+ extension and, for PDFs, the `%PDF-` header. Templates accept PDF only.
278
+
279
+ `DocumentResource#cancel` stops a `pending_signature` or `pending_identity_review` document and keeps it as
280
+ `rejected_by_user`; `#delete` runs the same cancellation before deleting. Both answer `409` `EnvelopeOpen` for a
281
+ document of an open envelope, and `cancel` answers `409` `DocumentClosed` once every signer has signed.
284
282
 
285
283
  `DocumentResource#list` accepts `tags` as a comma-separated String or an Array of tag IDs, which the SDK joins
286
284
  with commas; matching documents carry every listed tag. `DocumentResource#replace_tags` and `#append_tags` accept
@@ -352,9 +350,13 @@ look successful while the connection stays active.
352
350
 
353
351
  Verification and notification methods are coupled per signer: the omitted side is inferred from the other, and
354
352
  when both are omitted both are `Email`. Exactly one notification method is allowed. Allowed pairs: `Email` with
355
- `Email`, `Whatsapp` with `Whatsapp`, and `DigitalCertificate` or `IdDocumentFaceMatchBasic` with either. `Email` costs 0 credits; `Whatsapp`
356
- costs 0.45 credits (its WhatsApp notification, paid plans only); `DigitalCertificate` costs 0.5 credits per signer
357
- on top of its notification, shown in cost estimates under the breakdown code `SignatureDigitalCertificate`.
353
+ `Email`, `Whatsapp` with `Whatsapp`, and `DigitalCertificate` or `IdDocumentFaceMatchBasic` with either. `Email`
354
+ costs 0 credits; `Whatsapp` costs its WhatsApp notification (0.4 credits on Pro, 0.45 on other paid plans);
355
+ `DigitalCertificate` adds the plan's certificate price per signer (`SignatureDigitalCertificate`, on every envelope
356
+ document the signer signs); `IdDocumentFaceMatchBasic` adds Free 1.5, Standard 1, Pro 0.5 or 0.25 credits on other
357
+ plans (`VerificationIdDocumentFaceMatchBasic`, once per envelope signer). `estimate_cost` returns the exact charge.
358
+ On the free plan, creation answers `429` `FreePlanEmailLimit` with `Retry-After` once the daily signer email
359
+ limit is reached.
358
360
 
359
361
  ### Digital-certificate signing
360
362
 
@@ -395,7 +397,7 @@ names from its `images` with `identity_review_image`, and submit `decide_identit
395
397
  or `decision: 'Rejected'` while the document is pending_signature or pending_identity_review. Rejection cancels
396
398
  the document and notifies signers and copy receivers. Optional `note:` (at most 2000 characters) is recorded in
397
399
  activities and sent to the provider; it is never shown to the signer. Images are fetched from the provider,
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
400
+ available only during InReview, and must not be cached. Evidence images and decisions require an API key; third-party OAuth applications
399
401
  can read the review summary with `documents:read`, but cannot fetch images or decide it. The review retains summaries, with `evidence_available`
400
402
  false when none is retained or fetched. Direct approvals expose evidence through the signer_identity_verified
401
403
  activity instead. Observe signer_identity_review_required, signer_identity_review_approved,
@@ -442,7 +444,7 @@ it is not a per-document creation field. `update(message: nil)` clears the messa
442
444
  its documents. Cancel notifies recipients, remove-document cancels that open document, and delete requires the
443
445
  envelope to be closed and preserves its documents. Downloads return ZIP bytes.
444
446
 
445
- Embedded signing requires the Embed feature and API-key/user-session authentication; third-party OAuth cannot
447
+ Embedded signing requires the Embed feature and API-key authentication; third-party OAuth cannot
446
448
  manage origins or create sessions. Register exact origins through `accounts.create_embed_origin`, mark an
447
449
  Email/Whatsapp signer `embedded: true`, then call `assignments.create_embed_session`. Load its returned URL in
448
450
  an iframe within five minutes. `exchange_embed_session` is normally called by Assinafy's embed page; its token
@@ -481,6 +483,60 @@ email preferences. `accounts.notification_policy` reads workspace event rules; o
481
483
  Document activities accept sort/page/per_page; `activities` preserves the Array return, and `activities_page`
482
484
  returns pagination metadata. Envelope activities are always paginated.
483
485
 
486
+ ### Scheduled sends, capacities and watchers
487
+
488
+ `assignments.schedule(document_id, payload, send_at:)` and
489
+ `envelopes.schedule(payload, send_at:)`. Both reuse the corresponding creation payload validators and return
490
+ `ScheduledSend` without sending or charging now. `send_at` is ISO 8601 (no offset means UTC) or Unix seconds,
491
+ from one hour to 90 days ahead; every explicit document deadline must be at least two hours after it.
492
+ A document can have only one pending/processing send. The worker runs about every five minutes and applies
493
+ the original member's permissions, balance, plan and credit ceiling at delivery time. Failure leaves a `failed`
494
+ record and emails that member, or active owners if the member left. Scheduling does not reserve balances or
495
+ prevent immediate assignment creation, and does not support an idempotency key.
496
+
497
+ `scheduled_sends.list(document_id:, page:, per_page:)` returns all states, newest first; all scheduled-send
498
+ operations require `documents:write`, including listing. `cancel(id)` cancels only pending sends;
499
+ `send_now(id)` creates the assignment/envelope immediately. A refused send-now remains pending, so cancel it
500
+ if a later attempt is unwanted. On the free plan a send can stay `pending` with `next_attempt_at` for up to
501
+ seven days while the daily signer email limit is full, and `send_now` answers `429` `FreePlanEmailLimit`. Repeating send/cancel after a terminal state raises `ApiError` with 409.
502
+
503
+ Assignments accept `sign_as` on each signer, defaulting to `Sign` when omitted or nil. The exact supported
504
+ values are `AssignmentResource::SIGNER_CAPACITIES`; they identify the sender's stated signing capacity,
505
+ printed on the certificate only. They are immutable after creation and read through
506
+ `documents.signer_capacities(id)`, not ordinary assignment reads or webhooks. Envelope/template signer
507
+ schemas do not publish this field.
508
+
509
+ `documents.set_watchers(id, watcher_ids)` replaces up to ten workspace contacts with email addresses;
510
+ `[]` clears them. `documents.watchers(id)` reads them in order. Watchers receive a completion, decline or
511
+ expiry email with the document name and sender, without a link/file, independent of workspace notification
512
+ policy. Change them only while the document is open. A signer who is also a watcher receives both emails.
513
+
514
+ `documents.notification_history(id)` adds nullable delivery/open timestamps to each signer's records.
515
+ Opens can come from link scanners or mail clients and are not proof of human reading. Envelope reminders
516
+ have `envelopes.estimate_resend_cost(id, signer_id)`; one reminder covers the whole envelope and returns
517
+ `ResendCostEstimate` (`total`, not `total_credits`). An estimate does not check timing eligibility.
518
+ Reminders refuse expired requests, repeats within two minutes, or more than ten reminders in 24 hours;
519
+ reminders through the envelope and its documents share that limit.
520
+
521
+ ### Signing and explicit empty values
522
+
523
+ Use `assignments.sign(document_id, assignment_id, [], signer_access_code:)` for virtual assignments after
524
+ terms, contact confirmation and OTP verification. For collect assignments, store both `signature` and
525
+ `initial` images (PNG or JPEG) first, even if no initial field is placed. Supply the required item values; omitted
526
+ read-only dates are filled by the server, optional fields may remain empty, and an omitted required field
527
+ fails. Image fields use stored images and `signatureDate` uses the server's signing timestamp. The SDK passes
528
+ empty String values through; the API still rejects them for required fields, including signature fields.
529
+ The API returns the signer's assignment, without signing URLs, with only their items and other parties' contact
530
+ details and government IDs null. A completed request may be repeated safely, but the SDK never retries it
531
+ automatically.
532
+
533
+ `signers.update` preserves explicit nil or empty String for email, WhatsApp number and government ID, so
534
+ callers can clear them. Omitted fields remain unchanged; full_name cannot be cleared. Verified contact
535
+ channels on unfinished requests cannot be changed, and changes to unverified channels invalidate old links.
536
+ `signers.confirm_data` only changes email, WhatsApp number and accepted terms; use workspace signer updates
537
+ for name and government ID. Field validation sends an explicit nil as JSON null and leaves required/optional
538
+ validation to the API; zero remains a value. A missing batch `value` key is rejected locally.
539
+
484
540
  ## SDK-only helpers and aliases
485
541
 
486
542
  These public functions do not map one-to-one to an API operation. Their source comments provide parameter,
@@ -493,7 +549,7 @@ return-value, and usage details.
493
549
  | `Assinafy::Client.from_config`, `.from_hash` | Construct a client from string- or symbol-keyed configuration. | [`client.rb`](../lib/assinafy/client.rb) |
494
550
  | `Client#faraday_connection` | Return the configured Faraday connection for advanced integration. | [`client.rb`](../lib/assinafy/client.rb) |
495
551
  | `Client#upload_and_request_signatures` | Upload, optionally wait, create signers, and create a virtual assignment. | [`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) |
552
+ | `Client#oauth`, `#accounts`, `#users`, `#documents`, `#contracts`, `#signers`, `#signer_documents`, `#assignments`, `#envelopes`, `#scheduled_sends`, `#webhooks`, `#templates`, `#fields`, `#tags`, `#webhook_verifier` | Return the client's resource and helper instances. | [`client.rb`](../lib/assinafy/client.rb) |
497
553
  | `Assinafy::Configuration.new`, `.from_hash` | Build configuration directly or from string/symbol keys. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
498
554
  | `Configuration#auth_headers` | Return the selected API-key, bearer, or empty authentication header set. | [`configuration.rb`](../lib/assinafy/configuration.rb) |
499
555
  | 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) |
@@ -505,11 +561,10 @@ return-value, and usage details.
505
561
  | `SignerResource#find_by_email` | Page through a successful search and return a case-insensitive match or `nil`. | [`signer_resource.rb`](../lib/assinafy/resources/signer_resource.rb) |
506
562
  | `SignerDocumentResource#document` | Alias for `#current`. | [`signer_document_resource.rb`](../lib/assinafy/resources/signer_document_resource.rb) |
507
563
  | `SignerDocumentResource#list_as_workspace`, `#search_as_workspace` | List/search a signer's documents with workspace credentials; `#list`/`#search` require the signer access code and send only it. | [`signer_document_resource.rb`](../lib/assinafy/resources/signer_document_resource.rb) |
508
- | `AuthResource#api_key` | Alias for `#get_api_key`. | [`auth_resource.rb`](../lib/assinafy/resources/auth_resource.rb) |
509
564
  | `WebhookResource#update` | Alias for `#register` (acts on the oldest endpoint). | [`webhook_resource.rb`](../lib/assinafy/resources/webhook_resource.rb) |
510
565
  | `AssignmentResource.build_payload` | Validate and normalize virtual or collect assignment bodies locally. | [`assignment_resource.rb`](../lib/assinafy/resources/assignment_resource.rb) |
511
- | `WebhookVerifier.new`, `#verify_delivery` | Verify a Standard Webhooks delivery (`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the endpoint's `whsec_` secret, rejecting timestamps outside the tolerance (default 300 seconds). |
512
- | `WebhookVerifier#verify` | Verify a hex HMAC-SHA256 signature added by the receiver's own gateway. |
566
+ | `WebhookVerifier.new`, `#verify_delivery` | Verify a Standard Webhooks delivery (`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the endpoint's `whsec_` secret, rejecting timestamps outside the tolerance (default 300 seconds). | [`webhook_verifier.rb`](../lib/assinafy/support/webhook_verifier.rb) |
567
+ | `WebhookVerifier#verify` | Verify a hex HMAC-SHA256 signature added by the receiver's own gateway. | [`webhook_verifier.rb`](../lib/assinafy/support/webhook_verifier.rb) |
513
568
  | `WebhookVerifier::SECRET_PREFIX`, `::DEFAULT_TOLERANCE` | The `whsec_` secret prefix and the default 300-second timestamp tolerance. | [`webhook_verifier.rb`](../lib/assinafy/support/webhook_verifier.rb) |
514
569
  | `WebhookVerifier#extract_event`, `#event_type`, `#event_payload`, `#event_object`, `#event_subject`, `#event_data` | Parse and access webhook envelope fields; `event_data` is retained as a compatibility helper. | [`webhook_verifier.rb`](../lib/assinafy/support/webhook_verifier.rb) |
515
570
  | `Assinafy::Error.new`, `#context` | Construct/read the SDK base error and its structured context. | [`errors.rb`](../lib/assinafy/errors.rb) |
@@ -519,11 +574,15 @@ return-value, and usage details.
519
574
  | `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) |
520
575
  | `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) |
521
576
  | `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) |
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) |
577
+ | `Assinafy::Utils.handle_assinafy_response`, `.clean_params`, `.query_params`, `.body_params`, `.require_email`, `.require_expiration`, `.require_credit_ceiling` | Internal public helpers used by resources for envelope and parameter normalization; applications should prefer resource methods. | [`utils.rb`](../lib/assinafy/utils.rb) |
523
578
  | `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) |
524
579
  | `Assinafy::VERSION` | Published SDK version constant. | [`version.rb`](../lib/assinafy/version.rb) |
525
580
  | `Assinafy::USER_AGENT` | Version-derived `Assinafy-Ruby-SDK/v[VERSION]` request identifier. | [`version.rb`](../lib/assinafy/version.rb) |
526
581
 
582
+ `ScheduledSendResource.require_send_at` validates the delivery window and returns a Time;
583
+ `.scheduled_expiration` validates a deadline against it and returns zoned ISO 8601. Resources use these helpers
584
+ before scheduling; callers normally use `assignments.schedule` or `envelopes.schedule`.
585
+
527
586
  ## Request and response examples
528
587
 
529
588
  The resource methods linked above include request and response examples in their YARD documentation.
@@ -531,7 +590,7 @@ The schema catalog below describes the published response objects and their nest
531
590
 
532
591
  ## Schema catalog
533
592
 
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.
593
+ All 63 published schemas are listed below. `*` marks required properties. Nested fields are listed with dot notation; links identify reusable schemas. Examples use placeholder contacts.
535
594
 
536
595
  ### Account
537
596
 
@@ -598,7 +657,7 @@ A request for signers to sign a document.
598
657
  | `id` | string | Example: `"615606ef81d199996981dbce"`. |
599
658
  | `document_id` | string or null | The document this assignment belongs to. `null` only if the document was deleted. Example: `"615601fab04c0a3147bb1246"`. |
600
659
  | `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"`. |
660
+ | `sender_email` | string or null (format: email) | Email of the user who sent the document; null once that user has deleted their account. Example: `"sender@example.com"`. |
602
661
  | `method` | string (`"virtual"`, `"collect"`) | Example: `"virtual"`. |
603
662
  | `expires_at` | string or null (format: date-time) | Example: `null`. |
604
663
  | `message` | string or null | |
@@ -631,17 +690,17 @@ A signer within an assignment: the base Signer plus per-assignment verification/
631
690
  | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
632
691
  | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
633
692
  | `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"`. |
693
+ | `email` | string or null (format: email) | Example: `"john@example.com"`. |
694
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. A number written with `+` is read with the country code it names first, and as Brazilian if it isn't valid there; one without `+` is read as a Brazilian area code and number first. Example: `"+5548999990000"`. |
636
695
  | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
637
696
  | `has_accepted_terms` | boolean | Example: `false`. |
638
697
  | `verification_method` | string or null | Example: `"Email"`. |
639
- | `notification_methods` | array or null | Example: `["Email"]`. |
698
+ | `notification_methods` | Array<string> or null | Example: `["Email"]`. |
640
699
  | `step` | integer or null | Sequential signing step (defaults to 1). Example: `1`. |
641
700
  | `notified` | boolean or null | |
642
701
  | `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
702
  | `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. |
703
+ | `notification_history` | Array<[`NotificationHistoryEntry`](#notificationhistoryentry)> or null | Per-channel delivery history for this signer (email + WhatsApp), most-recent send order. |
645
704
 
646
705
  ### AssignmentSummary
647
706
 
@@ -683,7 +742,7 @@ A JWT access token plus the authenticated user and the accounts they belong to.
683
742
  | --- | --- | --- |
684
743
  | `id` | string | Example: `"bgjazeo5r9v2lq7l36dx48np"`. |
685
744
  | `name` | string | Example: `"John Smith"`. |
686
- | `email` | string (format: email) | Example: `"signer@example.com"`. |
745
+ | `email` | string (format: email) | Example: `"example@example.com"`. |
687
746
  | `telephone` | string or null | Example: `"17989206641"`. |
688
747
  | `government_id` | string or null | Example: `"15774136604"`. |
689
748
  | `is_email_verified` | boolean | Example: `false`. |
@@ -764,14 +823,14 @@ A document and its current lifecycle state.
764
823
  | `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
824
  | `decline_reason` | string or null | Example: `null`. |
766
825
  | `declined_by` | [`Signer`](#signer) or null | |
767
- | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | |
826
+ | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | The workspace's labels on the document. Always empty when the signer reads it with their code. |
768
827
  | `tags[].id` | string | |
769
828
  | `tags[].name` | string | |
770
829
  | `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
771
830
  | `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
831
  | `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
773
832
  | `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. |
833
+ | `envelope` | object { `id*`: string; `name*`: string } or null | 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
834
  | `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
776
835
  | `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
777
836
  | `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`. |
@@ -780,15 +839,15 @@ A document and its current lifecycle state.
780
839
 
781
840
  ### DocumentActivity
782
841
 
783
- A document activity event.
842
+ A document activity/audit event.
784
843
 
785
844
  | Property | Type | Description |
786
845
  | --- | --- | --- |
787
846
  | `id` | integer | Example: `4`. |
788
847
  | `event` | string | Event type code. Example: `"assignment_created"`. |
789
848
  | `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. |
849
+ | `payload` | object 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. |
850
+ | `origin` | object { `ip`: string or null; `user-agent`: string } or null | Request origin when available. |
792
851
  | `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
793
852
  | `origin.user-agent` | string | |
794
853
  | `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
@@ -862,7 +921,7 @@ Every attribute is optional and only the ones sent change. `null` clears an attr
862
921
  | `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
922
  | `owner_id` | string or null | An active member of this workspace. |
864
923
  | `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`. |
924
+ | `external_references` | Array<object { `system*`: string (max length: 64); `id*`: string (max length: 255) }> 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
925
  | `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
926
  | `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
927
  | `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"`. |
@@ -886,7 +945,7 @@ Documents sent together to the same signers. Each document keeps its own assignm
886
945
  | `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
946
  | `documents[].signers[].id` * | string | Example: `"fa8c140cb49b79f940aab95fddd"`. |
888
947
  | `documents[].signers[].full_name` * | string | Example: `"Ana Souza"`. |
889
- | `documents[].signers[].email` * | string or null | Example: `"signer@example.com"`. |
948
+ | `documents[].signers[].email` * | string or null | Example: `"ana@example.com"`. |
890
949
  | `documents[].signers[].whatsapp_phone_number` * | string or null | Example: `"+5548999990001"`. |
891
950
  | `documents[].signers[].completed` * | boolean | Whether they have signed this document. Example: `false`. |
892
951
  | `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"`. |
@@ -1004,8 +1063,8 @@ A document activity of an envelope's trail, naming its document.
1004
1063
  | `id` | integer | Example: `4`. |
1005
1064
  | `event` | string | Event type code. Example: `"assignment_created"`. |
1006
1065
  | `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. |
1066
+ | `payload` | object 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. |
1067
+ | `origin` | object { `ip`: string or null; `user-agent`: string } or null | Request origin when available. |
1009
1068
  | `origin.ip` | string or null | `null` when the request carried no client address. Example: `"172.19.0.1"`. |
1010
1069
  | `origin.user-agent` | string | |
1011
1070
  | `created_at` | string (format: date-time) | Example: `"2022-07-19T19:28:13Z"`. |
@@ -1036,9 +1095,9 @@ A document of an envelope, as sent on creation (`documents[]`) and when added.
1036
1095
  | --- | --- | --- |
1037
1096
  | `id` * | string (min length: 1) | A `metadata_ready` document of the workspace with no assignment. Example: `"615601fab04c0a3147bb1246"`. |
1038
1097
  | `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`. |
1098
+ | `entries` | Array<object { `page_id*`: string; `fields*`: Array<object { `signer_id*`: string; `field_id*`: string; `display_settings*`: [`DisplaySettings`](#displaysettings) }> }> (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
1099
  | `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) | |
1100
+ | `entries[].fields` * | Array<object { `signer_id*`: string; `field_id*`: string; `display_settings*`: [`DisplaySettings`](#displaysettings) }> | The fields placed on this page. A page with none adds nothing, as on an assignment. |
1042
1101
  | `entries[].fields[].signer_id` * | string | A signer of the document. |
1043
1102
  | `entries[].fields[].field_id` * | string | A field definition of the workspace. |
1044
1103
  | `entries[].fields[].display_settings` * | [`DisplaySettings`](#displaysettings) | |
@@ -1073,7 +1132,7 @@ A reusable field definition.
1073
1132
  | `type` | string | Example: `"signature"`. |
1074
1133
  | `regex` | string or null | |
1075
1134
  | `is_pre_defined` | boolean | |
1076
- | `is_active` | boolean | |
1135
+ | `is_active` | boolean | Whether the field is offered for new placements: the field list leaves an inactive one out unless `include_inactive` is set. Documents and templates already using an inactive field keep working: its values are still validated and signed. |
1077
1136
  | `is_required` | boolean | |
1078
1137
  | `is_standard` | boolean | |
1079
1138
  | `is_read_only` | boolean | |
@@ -1233,6 +1292,25 @@ Credits a reminder to one signer will take, and whether the account can pay for
1233
1292
  | `credit_balance` | number or null | Credits available. `null` when the account's credits are not limited. Example: `10`. |
1234
1293
  | `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`. |
1235
1294
 
1295
+ ### ScheduledSend
1296
+
1297
+ A **Create assignment** or **Create envelope** request kept until `send_at`, then made as that route makes it, by the member who scheduled it.
1298
+
1299
+ | Property | Type | Description |
1300
+ | --- | --- | --- |
1301
+ | `resource` | string | Example: `"scheduled_send"`. |
1302
+ | `id` * | string | Example: `"64f1a2b3c4d5e6f708192a3b"`. |
1303
+ | `type` * | string (`"assignment"`, `"envelope"`) | What it creates. Example: `"assignment"`. |
1304
+ | `document_ids` * | Array<string> | The documents it sends: one for an assignment, the envelope's for an envelope. A deleted document is left out. Example: `["615601fab04c0a3147bb1246"]`. |
1305
+ | `status` * | string (`"pending"`, `"processing"`, `"sent"`, `"cancelled"`, `"failed"`) | `pending` until `send_at` (or **Send a scheduled send now**); `processing` while its request is being made; then `sent` (the request was made; its invitations go out right after), `failed` or, if cancelled while pending, `cancelled`. A send whose run was interrupted while `processing` made nothing, and fails within about an hour. Example: `"pending"`. |
1306
+ | `send_at` * | string (format: date-time) | When it was scheduled to go. It stays as scheduled when the send is postponed (`next_attempt_at`). Example: `"2026-11-20T12:00:00Z"`. |
1307
+ | `next_attempt_at` * | string or null (format: date-time) | Set while a `pending` send is postponed by the free plan's daily signer email limit: when it is tried again, as the limit has room for its invitations then. `null` for a send that was never held back. Example: `null`. |
1308
+ | `assignment_id` * | string or null | The assignment it created, once an `assignment` is `sent`. Example: `null`. |
1309
+ | `envelope_id` * | string or null | The envelope it created, once an `envelope` is `sent`; `null` again once the envelope is deleted. Example: `null`. |
1310
+ | `failure_reason` * | string or null | Why it was not sent, once `failed`: the refusal the create route answered then (no documents or credits left, a signer removed, the document already sent, the plan without Envelopes), that the workspace is being deleted, that the member who scheduled it left the workspace, or that the free plan's daily signer email limit held it back for 7 days after `send_at`. Written in Portuguese. Example: `null`. |
1311
+ | `created_at` * | string (format: date-time) | Example: `"2026-11-14T18:00:00Z"`. |
1312
+ | `processed_at` * | string or null (format: date-time) | When it was sent, failed or cancelled. Example: `null`. |
1313
+
1236
1314
  ### Signer
1237
1315
 
1238
1316
  A signing party belonging to a workspace account.
@@ -1242,8 +1320,8 @@ A signing party belonging to a workspace account.
1242
1320
  | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
1243
1321
  | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
1244
1322
  | `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"`. |
1323
+ | `email` | string or null (format: email) | Example: `"john@example.com"`. |
1324
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. A number written with `+` is read with the country code it names first, and as Brazilian if it isn't valid there; one without `+` is read as a Brazilian area code and number first. Example: `"+5548999990000"`. |
1247
1325
  | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
1248
1326
  | `has_accepted_terms` | boolean | Example: `false`. |
1249
1327
 
@@ -1261,14 +1339,14 @@ A signing party belonging to a workspace account.
1261
1339
  | `reason_codes[].code` | string | Example: `"NAME_MISMATCH"`. |
1262
1340
  | `reason_codes[].description` | string | Example: `"Nome no documento difere do cadastrado (similaridade 52%)"`. |
1263
1341
  | `evidence_available` | boolean | Example: `true`. |
1264
- | `expected` | object { `name`: string or null; `cpf`: string or null } | What the signer was registered with. |
1342
+ | `expected` | object { `name`: string or null; `cpf`: string or null } or null | What the signer was registered with. |
1265
1343
  | `expected.name` | string or null | Example: `"Maria da Silva"`. |
1266
1344
  | `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. |
1345
+ | `document` | object { `type`: string or null; `name`: string or null; `cpf`: string or null } or null | What was read from the document. |
1268
1346
  | `document.type` | string or null | Example: `"CNH"`. |
1269
1347
  | `document.name` | string or null | Example: `"MARIA SILVA"`. |
1270
1348
  | `document.cpf` | string or null | Example: `"52998224725"`. |
1271
- | `matches` | object { `cpf`: boolean or null; `name`: number or null; `birth_date`: boolean or null } | |
1349
+ | `matches` | object { `cpf`: boolean or null; `name`: number or null; `birth_date`: boolean or null } or null | |
1272
1350
  | `matches.cpf` | boolean or null | Example: `true`. |
1273
1351
  | `matches.name` | number or null | Name similarity, 0-1. Example: `0.5217`. |
1274
1352
  | `matches.birth_date` | boolean or null | Example: `null`. |
@@ -1280,7 +1358,7 @@ A signing party belonging to a workspace account.
1280
1358
  | `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
1359
  | `ruleset_version` | string or null | Example: `"2026-10-12.2"`. |
1282
1360
  | `evidence_sha256` | string or null | Example: `"9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2"`. |
1283
- | `reviewed_by` | object { `id`: string; `name`: string } | |
1361
+ | `reviewed_by` | object { `id`: string; `name`: string } or null | |
1284
1362
  | `reviewed_by.id` | string | Example: `"Kx9pQ2"`. |
1285
1363
  | `reviewed_by.name` | string | Example: `"Ana Souza"`. |
1286
1364
  | `reviewed_at` | string or null (format: date-time) | Example: `"2026-10-13T21:05:00Z"`. |
@@ -1296,8 +1374,8 @@ The current signer, as returned by `GET /v1/signers/self`. Extends Signer with t
1296
1374
  | `resource` | string | Present in single-resource responses. Example: `"signer"`. |
1297
1375
  | `id` | string | Example: `"62d6ee35c7741ca4006b9e11"`. |
1298
1376
  | `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"`. |
1377
+ | `email` | string or null (format: email) | Example: `"john@example.com"`. |
1378
+ | `whatsapp_phone_number` | string or null | E.164 format; normalized on save. A number written with `+` is read with the country code it names first, and as Brazilian if it isn't valid there; one without `+` is read as a Brazilian area code and number first. Example: `"+5548999990000"`. |
1301
1379
  | `government_id` | string or null | Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Example: `"39053344705"`. |
1302
1380
  | `has_accepted_terms` | boolean | Example: `false`. |
1303
1381
  | `has_signature` | boolean | Whether the signer has a saved signature image stored. Example: `true`. |
@@ -1324,24 +1402,24 @@ The document as its signer reads it with the access code: the document with `cur
1324
1402
  | `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
1403
  | `decline_reason` | string or null | Example: `null`. |
1326
1404
  | `declined_by` | [`Signer`](#signer) or null | |
1327
- | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | |
1405
+ | `tags` | Array<object { `id`: string; `name`: string; `color`: string or null }> | The workspace's labels on the document. Always empty when the signer reads it with their code. |
1328
1406
  | `tags[].id` | string | |
1329
1407
  | `tags[].name` | string | |
1330
1408
  | `tags[].color` | string or null | 6-char hex without leading #. Example: `"ff8800"`. |
1331
1409
  | `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
1410
  | `pages` | Array<[`DocumentPage`](#documentpage)> | The document's pages. Included on the same responses as `assignment`, and also on the upload response. |
1333
1411
  | `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. |
1412
+ | `envelope` | object { `id*`: string; `name*`: string } or null | 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
1413
  | `envelope.id` * | string | Example: `"fe1c140cb49b79f940aab95fddd"`. |
1336
1414
  | `envelope.name` * | string | Example: `"Contrato de prestação de serviços"`. |
1337
1415
  | `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
1416
  | `created_at` | string (format: date-time) | Example: `"2026-06-03T03:54:16Z"`. |
1339
1417
  | `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. |
1418
+ | `current_signer` | [`Signer`](#signer) plus object { `verification_method`: string; `notification_methods`: Array<string> or null; `completed`: boolean } | This signer. Once the code is closed, only `id` and the last three. |
1341
1419
  | `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`). |
1420
+ | `certified_copy` | object { `available*`: boolean; `notification_method*`: string or null (`"Email"`, `"Whatsapp"`); `resends_left*`: integer or null } | Whether the signer can ask for the certified copy again (`POST /v1/sign/certified-copy`). |
1343
1421
  | `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"`. |
1422
+ | `certified_copy.notification_method` * | string or null (`"Email"`, `"Whatsapp"`) | The channel it goes on; `null` when there is none. Example: `"Email"`. |
1345
1423
  | `certified_copy.resends_left` * | integer or null | WhatsApp re-sends left; `null` for e-mail. Example: `null`. |
1346
1424
 
1347
1425
  ### SigningUrl
@@ -1351,7 +1429,7 @@ One entry per signer whose turn has come. The link depends on how the signer get
1351
1429
  | Property | Type | Description |
1352
1430
  | --- | --- | --- |
1353
1431
  | `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"`. |
1432
+ | `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=joe@example.com"`. |
1355
1433
  | `embedded` | boolean | Whether the signer was marked `embedded` when the assignment was created. Example: `false`. |
1356
1434
 
1357
1435
  ### Tag
@@ -1464,7 +1542,7 @@ A URL that receives the account's webhook events. Every active endpoint subscrib
1464
1542
  | `id` | string | Endpoint ID. Example: `"65f1c2a9b3e4d5f60718293a4b5c6d7e"`. |
1465
1543
  | `name` | string or null | Label to tell endpoints apart. Example: `"ERP"`. |
1466
1544
  | `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"`. |
1545
+ | `email` | string (format: email) | Contact email for delivery-failure notices. Example: `"ops@example.com"`. |
1468
1546
  | `events` | Array<string> | Event types delivered to this endpoint (see **List webhook event types**). Example: `["document_ready","signer_signed_document"]`. |
1469
1547
  | `is_active` | boolean | Whether events are delivered to this endpoint. Example: `true`. |
1470
1548
  | `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`. |
@@ -1491,11 +1569,11 @@ Body of every webhook delivery. Timestamps in the body (`created_at`, and the `*
1491
1569
  | `event` * | string | Event type. See **List webhook event types**; `webhook_test` is sent only by **Send a test delivery**. Example: `"signer_viewed_document"`. |
1492
1570
  | `message` | string or null | Reserved; currently always `null`. Example: `null`. |
1493
1571
  | `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. |
1572
+ | `origin` | object { `ip`: string; `user-agent`: string } or null | Where the action came from, when it was triggered by a request. |
1495
1573
  | `origin.ip` | string | Example: `"203.0.113.7"`. |
1496
1574
  | `origin.user-agent` | string | Example: `"Mozilla/5.0"`. |
1497
1575
  | `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. |
1576
+ | `subject` * | object | Who performed the action: a `User`, `Signer` or `Account` (the endpoint itself in a `webhook_test`; the document itself for `document_expiring`, `document_expired` and `signature_reminder_sent`), plus a `type` property naming it. |
1499
1577
  | `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
1578
  | `account_id` * | string | ID of the account that owns the event. Example: `"65f1c2a9b3e4d5f6"`. |
1501
1579
 
@@ -1519,7 +1597,7 @@ An account's webhook subscription configuration.
1519
1597
  | `is_held` | boolean | Whether deliveries are paused after 10 failures in a row (see **Delivery contract**). Example: `false`. |
1520
1598
  | `held_since` | integer or null | When the pause began (Unix timestamp, seconds); `null` while deliveries run. Example: `null`. |
1521
1599
  | `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"`. |
1600
+ | `email` | string or null | Contact email for delivery notices. Example: `"email@example.com"`. |
1523
1601
  | `updated_at` | string or null (format: date-time) | Example: `"2023-05-10T14:58:24Z"`. |
1524
1602
 
1525
1603
  ### WhatsappNotification