@assinafy/cli 2.6.1 → 2.7.1
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.
- package/CONTRIBUTING.md +1 -1
- package/README.en.md +50 -20
- package/README.md +78 -391
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/api.cjs +221 -37
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +220 -37
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +352 -75
- package/dist/types/api/client.d.ts +2 -0
- package/dist/types/api/client.d.ts.map +1 -1
- package/dist/types/api/contract-types.d.ts +110 -0
- package/dist/types/api/contract-types.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/resources/assignments.d.ts +2 -2
- package/dist/types/api/resources/assignments.d.ts.map +1 -1
- package/dist/types/api/resources/authentication.d.ts +3 -3
- package/dist/types/api/resources/authentication.d.ts.map +1 -1
- package/dist/types/api/resources/contracts.d.ts +19 -0
- package/dist/types/api/resources/contracts.d.ts.map +1 -0
- package/dist/types/api/resources/documents.d.ts +3 -3
- package/dist/types/api/resources/documents.d.ts.map +1 -1
- package/dist/types/api/resources/webhooks.d.ts +4 -3
- package/dist/types/api/resources/webhooks.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +69 -18
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/api/utils.d.ts +3 -1
- package/dist/types/api/utils.d.ts.map +1 -1
- package/docs/README.md +2 -1
- package/docs/api-operations.json +49 -1
- package/docs/api-reference.md +1446 -295
- package/docs/contracts.md +128 -0
- package/docs/documents.md +7 -4
- package/docs/oauth-guide.md +5 -5
- package/docs/releasing.md +38 -12
- package/docs/sdk-reference.md +154 -13
- package/package.json +2 -2
package/docs/api-reference.md
CHANGED
|
@@ -6,8 +6,8 @@ The renderer reuses a generic 400 envelope for several non-400 errors; top-level
|
|
|
6
6
|
|
|
7
7
|
- OpenAPI: 3.1.0
|
|
8
8
|
- API document version: 1.0.0
|
|
9
|
-
- Operations:
|
|
10
|
-
- Contract SHA-256: `
|
|
9
|
+
- Operations: 118
|
|
10
|
+
- Contract SHA-256: `38cb1b376546c1db6e9eabb06fbb613a9c17ca7c22f66388de2ffbf4b6931e93`
|
|
11
11
|
|
|
12
12
|
## Accounts
|
|
13
13
|
|
|
@@ -42,6 +42,9 @@ Retrieve a workspace account the user belongs to.
|
|
|
42
42
|
"owner"
|
|
43
43
|
],
|
|
44
44
|
"is_delete_allowed": true,
|
|
45
|
+
"limits": {
|
|
46
|
+
"webhook_endpoints": 1
|
|
47
|
+
},
|
|
45
48
|
"created_at": "2026-06-03T03:54:16Z"
|
|
46
49
|
},
|
|
47
50
|
"status": 200,
|
|
@@ -126,6 +129,9 @@ Example:
|
|
|
126
129
|
"owner"
|
|
127
130
|
],
|
|
128
131
|
"is_delete_allowed": true,
|
|
132
|
+
"limits": {
|
|
133
|
+
"webhook_endpoints": 1
|
|
134
|
+
},
|
|
129
135
|
"created_at": "2026-06-03T03:54:16Z"
|
|
130
136
|
},
|
|
131
137
|
"status": 200,
|
|
@@ -495,6 +501,9 @@ Called with an OAuth application token, this returns exactly one workspace: the
|
|
|
495
501
|
"owner"
|
|
496
502
|
],
|
|
497
503
|
"is_delete_allowed": true,
|
|
504
|
+
"limits": {
|
|
505
|
+
"webhook_endpoints": 1
|
|
506
|
+
},
|
|
498
507
|
"created_at": "2026-06-03T03:54:16Z"
|
|
499
508
|
}
|
|
500
509
|
],
|
|
@@ -564,6 +573,9 @@ Example:
|
|
|
564
573
|
"owner"
|
|
565
574
|
],
|
|
566
575
|
"is_delete_allowed": true,
|
|
576
|
+
"limits": {
|
|
577
|
+
"webhook_endpoints": 1
|
|
578
|
+
},
|
|
567
579
|
"created_at": "2026-06-03T03:54:16Z"
|
|
568
580
|
},
|
|
569
581
|
"status": 200,
|
|
@@ -605,7 +617,7 @@ Example:
|
|
|
605
617
|
|
|
606
618
|
`GET /v1/accounts/{accountId}/stats`
|
|
607
619
|
|
|
608
|
-
Precomputed per-account document-funnel KPIs. `granularity=monthly` (default) returns the last 12 months, most recent first; `granularity=daily` with `month=YYYY-MM` returns that month's days. Series are zero-filled.
|
|
620
|
+
Precomputed per-account document-funnel KPIs. `granularity=monthly` (default) returns the last 12 months, most recent first; `granularity=daily` with `month=YYYY-MM` returns that month's days. Series are zero-filled. Requires the `account:read` OAuth scope.
|
|
609
621
|
|
|
610
622
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
611
623
|
|
|
@@ -682,7 +694,7 @@ Precomputed per-account document-funnel KPIs. `granularity=monthly` (default) re
|
|
|
682
694
|
|
|
683
695
|
`GET /v1/documents/{documentId}/activities`
|
|
684
696
|
|
|
685
|
-
List the activities recorded for a document. Each entry carries an event-specific `payload` snapshot (keys vary per event) and the request `origin` (`ip`, `user-agent`).
|
|
697
|
+
List the activities recorded for a document, newest first (`sort=id` for oldest first). Paged: 20 per page by default; the `X-Pagination-Total-Count`, `X-Pagination-Page-Count`, `X-Pagination-Current-Page` and `X-Pagination-Per-Page` headers describe the full list, and a page past the end returns an empty `data`. Each entry carries an event-specific `payload` snapshot (keys vary per event) and the request `origin` (`ip`, `user-agent`).
|
|
686
698
|
|
|
687
699
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
688
700
|
|
|
@@ -691,6 +703,9 @@ List the activities recorded for a document. Each entry carries an event-specifi
|
|
|
691
703
|
| Name | In | Type | Required | Description |
|
|
692
704
|
|---|---|---|---|---|
|
|
693
705
|
| `documentId` | path | string | yes | Document ID. |
|
|
706
|
+
| `sort` | query | string | no | `-id` (default, newest first) or `id`. |
|
|
707
|
+
| `page` | query | integer | no | Page number. |
|
|
708
|
+
| `per-page` | query | integer | no | Records per page (max 100). |
|
|
694
709
|
|
|
695
710
|
#### Responses
|
|
696
711
|
|
|
@@ -737,7 +752,7 @@ List the activities recorded for a document. Each entry carries an event-specifi
|
|
|
737
752
|
|
|
738
753
|
`GET /v1/accounts/{accountId}/documents`
|
|
739
754
|
|
|
740
|
-
List documents of the workspace.
|
|
755
|
+
List documents of the workspace, most recently updated first. Every row includes its `assignment` and `pages`; an `expand` parameter is ignored. For a lighter list without them, use `GET /v1/accounts/{accountId}/documents/search`.
|
|
741
756
|
|
|
742
757
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
743
758
|
|
|
@@ -750,7 +765,7 @@ List documents of the workspace.
|
|
|
750
765
|
| `method` | query | string | no | Signature method filter. |
|
|
751
766
|
| `search` | query | string | no | Partial match on document.name, signer.full_name, signer.email. |
|
|
752
767
|
| `tags` | query | string | no | Comma-separated tag IDs; returns documents having ALL listed tags. |
|
|
753
|
-
| `sort` | query | string | no |
|
|
768
|
+
| `sort` | query | string | no | `name` or `updated_at`, ascending; prefix with `-` for descending (`-updated_at`, the default). Other values are ignored. |
|
|
754
769
|
| `page` | query | integer | no | Page number. |
|
|
755
770
|
| `per-page` | query | integer | no | Records per page (max 100). |
|
|
756
771
|
|
|
@@ -773,6 +788,8 @@ List documents of the workspace.
|
|
|
773
788
|
},
|
|
774
789
|
"is_closed": false,
|
|
775
790
|
"signing_url": "https://example.com/example-url-3",
|
|
791
|
+
"verification_code": "example_secret",
|
|
792
|
+
"verification_url": "https://example.com/example-url-4",
|
|
776
793
|
"decline_reason": null,
|
|
777
794
|
"declined_by": null,
|
|
778
795
|
"tags": [
|
|
@@ -788,9 +805,10 @@ List documents of the workspace.
|
|
|
788
805
|
"number": 1,
|
|
789
806
|
"height": 2100,
|
|
790
807
|
"width": 1275,
|
|
791
|
-
"download_url": "https://example.com/example-url-
|
|
808
|
+
"download_url": "https://example.com/example-url-5"
|
|
792
809
|
}
|
|
793
810
|
],
|
|
811
|
+
"has_contract": true,
|
|
794
812
|
"created_at": "2026-06-03T03:54:16Z",
|
|
795
813
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
796
814
|
}
|
|
@@ -866,6 +884,8 @@ Example:
|
|
|
866
884
|
},
|
|
867
885
|
"is_closed": false,
|
|
868
886
|
"signing_url": "https://example.com/example-url-3",
|
|
887
|
+
"verification_code": "example_secret",
|
|
888
|
+
"verification_url": "https://example.com/example-url-4",
|
|
869
889
|
"decline_reason": null,
|
|
870
890
|
"declined_by": null,
|
|
871
891
|
"tags": [
|
|
@@ -881,9 +901,10 @@ Example:
|
|
|
881
901
|
"number": 1,
|
|
882
902
|
"height": 2100,
|
|
883
903
|
"width": 1275,
|
|
884
|
-
"download_url": "https://example.com/example-url-
|
|
904
|
+
"download_url": "https://example.com/example-url-5"
|
|
885
905
|
}
|
|
886
906
|
],
|
|
907
|
+
"has_contract": true,
|
|
887
908
|
"created_at": "2026-06-03T03:54:16Z",
|
|
888
909
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
889
910
|
},
|
|
@@ -937,6 +958,7 @@ Search documents of the workspace, returning a compact representation (no expand
|
|
|
937
958
|
| `accountId` | path | string | yes | Workspace account ID. |
|
|
938
959
|
| `search` | query | string | no | Search term. |
|
|
939
960
|
| `status` | query | string | no | |
|
|
961
|
+
| `sort` | query | string | no | `name` or `updated_at`, ascending; prefix with `-` for descending (`-updated_at`, the default). Other values are ignored. |
|
|
940
962
|
| `page` | query | integer | no | Page number. |
|
|
941
963
|
| `per-page` | query | integer | no | Records per page (max 100). |
|
|
942
964
|
|
|
@@ -959,6 +981,8 @@ Search documents of the workspace, returning a compact representation (no expand
|
|
|
959
981
|
},
|
|
960
982
|
"is_closed": false,
|
|
961
983
|
"signing_url": "https://example.com/example-url-3",
|
|
984
|
+
"verification_code": "example_secret",
|
|
985
|
+
"verification_url": "https://example.com/example-url-4",
|
|
962
986
|
"decline_reason": null,
|
|
963
987
|
"declined_by": null,
|
|
964
988
|
"tags": [
|
|
@@ -974,9 +998,10 @@ Search documents of the workspace, returning a compact representation (no expand
|
|
|
974
998
|
"number": 1,
|
|
975
999
|
"height": 2100,
|
|
976
1000
|
"width": 1275,
|
|
977
|
-
"download_url": "https://example.com/example-url-
|
|
1001
|
+
"download_url": "https://example.com/example-url-5"
|
|
978
1002
|
}
|
|
979
1003
|
],
|
|
1004
|
+
"has_contract": true,
|
|
980
1005
|
"created_at": "2026-06-03T03:54:16Z",
|
|
981
1006
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
982
1007
|
}
|
|
@@ -1070,7 +1095,7 @@ The supported document statuses and whether a document in each status can be del
|
|
|
1070
1095
|
|
|
1071
1096
|
`GET /v1/documents/{documentId}`
|
|
1072
1097
|
|
|
1073
|
-
Get a document by its ID. `decline_reason` is only present when the access token belongs to the document's creator.
|
|
1098
|
+
Get a document by its ID. `decline_reason` is only present when the access token belongs to the document's creator. With a signer access code (`signer-access-code`), only documents the signer has been sent are found, and `assignment` holds only the signer's own items, without `signers`, `signing_urls`, `copy_receivers` or `summary`.
|
|
1074
1099
|
|
|
1075
1100
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
1076
1101
|
|
|
@@ -1098,6 +1123,8 @@ Get a document by its ID. `decline_reason` is only present when the access token
|
|
|
1098
1123
|
},
|
|
1099
1124
|
"is_closed": false,
|
|
1100
1125
|
"signing_url": "https://example.com/example-url-3",
|
|
1126
|
+
"verification_code": "example_secret",
|
|
1127
|
+
"verification_url": "https://example.com/example-url-4",
|
|
1101
1128
|
"decline_reason": null,
|
|
1102
1129
|
"declined_by": null,
|
|
1103
1130
|
"tags": [
|
|
@@ -1113,9 +1140,10 @@ Get a document by its ID. `decline_reason` is only present when the access token
|
|
|
1113
1140
|
"number": 1,
|
|
1114
1141
|
"height": 2100,
|
|
1115
1142
|
"width": 1275,
|
|
1116
|
-
"download_url": "https://example.com/example-url-
|
|
1143
|
+
"download_url": "https://example.com/example-url-5"
|
|
1117
1144
|
}
|
|
1118
1145
|
],
|
|
1146
|
+
"has_contract": true,
|
|
1119
1147
|
"created_at": "2026-06-03T03:54:16Z",
|
|
1120
1148
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
1121
1149
|
},
|
|
@@ -1256,6 +1284,8 @@ Example:
|
|
|
1256
1284
|
},
|
|
1257
1285
|
"is_closed": false,
|
|
1258
1286
|
"signing_url": "https://example.com/example-url-3",
|
|
1287
|
+
"verification_code": "example_secret",
|
|
1288
|
+
"verification_url": "https://example.com/example-url-4",
|
|
1259
1289
|
"decline_reason": null,
|
|
1260
1290
|
"declined_by": null,
|
|
1261
1291
|
"tags": [
|
|
@@ -1271,9 +1301,10 @@ Example:
|
|
|
1271
1301
|
"number": 1,
|
|
1272
1302
|
"height": 2100,
|
|
1273
1303
|
"width": 1275,
|
|
1274
|
-
"download_url": "https://example.com/example-url-
|
|
1304
|
+
"download_url": "https://example.com/example-url-5"
|
|
1275
1305
|
}
|
|
1276
1306
|
],
|
|
1307
|
+
"has_contract": true,
|
|
1277
1308
|
"created_at": "2026-06-03T03:54:16Z",
|
|
1278
1309
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
1279
1310
|
},
|
|
@@ -1770,7 +1801,7 @@ Download the rendered image of a specific document page.
|
|
|
1770
1801
|
|
|
1771
1802
|
`POST /v1/accounts/{accountId}/templates/{templateId}/documents`
|
|
1772
1803
|
|
|
1773
|
-
Generate a new document from a template,
|
|
1804
|
+
Generate a new document from a template. The request is checked (roles, fields, balance) before it returns, but the assignment is created in the background, so the response has `status: uploaded` and `assignment: null`. Follow the outcome on `GET /v1/documents/{documentId}` or through webhooks: when the send succeeds the status moves to `pending_signature` and `assignment_created` is sent; when it fails the status becomes `failed`, `document_processing_failed` is sent with the reason, and nothing is charged. When the template has fields, every signing role used must have at least one field; otherwise `400`. A template with placed signer fields sends a `collect` assignment, so it cannot take a `DigitalCertificate` signer (`400`); certificate signing needs a template without placed signer fields. Provide one signer entry per template role. An entry with `id` uses that existing signer; an entry with `email` reuses the account's signer with that email or creates one.
|
|
1774
1805
|
|
|
1775
1806
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
1776
1807
|
|
|
@@ -1786,10 +1817,10 @@ Generate a new document from a template, creating its assignment in the same cal
|
|
|
1786
1817
|
Fields (`application/json`):
|
|
1787
1818
|
|
|
1788
1819
|
- `signers` (array, required) — One entry per template role.
|
|
1789
|
-
- `editor_fields` (array) —
|
|
1820
|
+
- `editor_fields` (array) — Values for the fields placed on the template's `Editor` role, baked into the generated document. The `Editor` role takes no `signers` entry: it is filled only through this list. Every field placed on it needs an entry with a non-empty `value` (`400` otherwise); when it has no fields, send nothing. In `signers`, every `Signer` role needs an entry (`400` otherwise), and a `CopyReceiver` role takes an entry only for someone who should receive the certified document; a copy receiver's `verification_method`, `notification_methods` and `step` are ignored.
|
|
1790
1821
|
- `name` (string) — Title for the document. Defaults to the template name.
|
|
1791
1822
|
- `message` (string) — Optional message sent to signers.
|
|
1792
|
-
- `expires_at` (string) — Assignment expiration date (ISO 8601). No expiration by default. Must be at least one hour in the future.
|
|
1823
|
+
- `expires_at` (string) — Assignment expiration date (ISO 8601). No expiration by default. Must be at least one hour in the future. A UTC offset in the value is honored (`2026-12-31T23:59:59-03:00` is `2027-01-01T02:59:59Z`); a value without one is read as UTC, and a date alone (`2026-12-31`) means 23:59 UTC that day.
|
|
1793
1824
|
- `tags` (array) — Tag names to attach to the new document. Names that don't exist are auto-created. The template's default-document-tags are always applied; values here are merged on top (duplicates removed).
|
|
1794
1825
|
|
|
1795
1826
|
Example:
|
|
@@ -1800,6 +1831,9 @@ Example:
|
|
|
1800
1831
|
{
|
|
1801
1832
|
"role_id": "example_id_10",
|
|
1802
1833
|
"id": "example_id_11",
|
|
1834
|
+
"email": "user1@example.com",
|
|
1835
|
+
"name": "Maria Silva",
|
|
1836
|
+
"whatsapp_phone_number": "+5500000000000",
|
|
1803
1837
|
"verification_method": "Email",
|
|
1804
1838
|
"notification_methods": [
|
|
1805
1839
|
"Email"
|
|
@@ -1840,6 +1874,8 @@ Example:
|
|
|
1840
1874
|
},
|
|
1841
1875
|
"is_closed": false,
|
|
1842
1876
|
"signing_url": "https://example.com/example-url-3",
|
|
1877
|
+
"verification_code": "example_secret",
|
|
1878
|
+
"verification_url": "https://example.com/example-url-4",
|
|
1843
1879
|
"decline_reason": null,
|
|
1844
1880
|
"declined_by": null,
|
|
1845
1881
|
"tags": [
|
|
@@ -1855,9 +1891,10 @@ Example:
|
|
|
1855
1891
|
"number": 1,
|
|
1856
1892
|
"height": 2100,
|
|
1857
1893
|
"width": 1275,
|
|
1858
|
-
"download_url": "https://example.com/example-url-
|
|
1894
|
+
"download_url": "https://example.com/example-url-5"
|
|
1859
1895
|
}
|
|
1860
1896
|
],
|
|
1897
|
+
"has_contract": true,
|
|
1861
1898
|
"created_at": "2026-06-03T03:54:16Z",
|
|
1862
1899
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
1863
1900
|
},
|
|
@@ -1941,10 +1978,10 @@ Example:
|
|
|
1941
1978
|
{
|
|
1942
1979
|
"data": {
|
|
1943
1980
|
"documents": 1,
|
|
1944
|
-
"credits": 0,
|
|
1981
|
+
"credits": 0.9,
|
|
1945
1982
|
"needs_extra_document": true,
|
|
1946
1983
|
"extra_document_cost": 1,
|
|
1947
|
-
"total_credits":
|
|
1984
|
+
"total_credits": 1.9,
|
|
1948
1985
|
"breakdown": [
|
|
1949
1986
|
{
|
|
1950
1987
|
"code": "NotificationWhatsapp",
|
|
@@ -1955,7 +1992,7 @@ Example:
|
|
|
1955
1992
|
}
|
|
1956
1993
|
],
|
|
1957
1994
|
"document_balance": 0,
|
|
1958
|
-
"credit_balance":
|
|
1995
|
+
"credit_balance": 10,
|
|
1959
1996
|
"has_sufficient_resources": true,
|
|
1960
1997
|
"blocking_reason": null,
|
|
1961
1998
|
"message": null
|
|
@@ -1991,7 +2028,7 @@ Example:
|
|
|
1991
2028
|
|
|
1992
2029
|
`GET /v1/assignments`
|
|
1993
2030
|
|
|
1994
|
-
List the assignments
|
|
2031
|
+
List the workspace's assignments, oldest first. With an OAuth token the workspace is the token's; otherwise pass `accountId`. Each assignment carries its `document_id`.
|
|
1995
2032
|
|
|
1996
2033
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
1997
2034
|
|
|
@@ -1999,6 +2036,8 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
1999
2036
|
|
|
2000
2037
|
| Name | In | Type | Required | Description |
|
|
2001
2038
|
|---|---|---|---|---|
|
|
2039
|
+
| `accountId` | query | string | no | The workspace ID. Required unless the request uses an OAuth token. |
|
|
2040
|
+
| `sort` | query | string | no | `created_at` (default, oldest first), `expires_at` or `id`; prefix with `-` for descending (`-created_at`, newest first). Unknown values are ignored. |
|
|
2002
2041
|
| `page` | query | integer | no | Page number. |
|
|
2003
2042
|
| `per-page` | query | integer | no | Records per page (max 100). |
|
|
2004
2043
|
|
|
@@ -2012,7 +2051,9 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
2012
2051
|
{
|
|
2013
2052
|
"resource": "assignment",
|
|
2014
2053
|
"id": "example_id_13",
|
|
2015
|
-
"
|
|
2054
|
+
"document_id": "example_id_3",
|
|
2055
|
+
"created_at": "2026-06-03T03:54:16Z",
|
|
2056
|
+
"sender_email": "user2@example.com",
|
|
2016
2057
|
"method": "virtual",
|
|
2017
2058
|
"expires_at": null,
|
|
2018
2059
|
"message": null,
|
|
@@ -2030,7 +2071,7 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
2030
2071
|
"resource": "signer",
|
|
2031
2072
|
"id": "example_id_14",
|
|
2032
2073
|
"full_name": "Example User",
|
|
2033
|
-
"email": "
|
|
2074
|
+
"email": "user3@example.com",
|
|
2034
2075
|
"whatsapp_phone_number": "+5500000000000",
|
|
2035
2076
|
"government_id": "00000000000",
|
|
2036
2077
|
"has_accepted_terms": false
|
|
@@ -2060,7 +2101,7 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
2060
2101
|
"signing_urls": [
|
|
2061
2102
|
{
|
|
2062
2103
|
"signer_id": "example_id_5",
|
|
2063
|
-
"url": "https://example.com/example-url-
|
|
2104
|
+
"url": "https://example.com/example-url-6"
|
|
2064
2105
|
}
|
|
2065
2106
|
]
|
|
2066
2107
|
}
|
|
@@ -2096,6 +2137,8 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
2096
2137
|
|
|
2097
2138
|
Request signatures on a document. Use `method: virtual` to sign without input fields, or `method: collect` to place input fields on specific pages.
|
|
2098
2139
|
|
|
2140
|
+
**Digital certificate signing works only on `virtual` assignments.** A `DigitalCertificate` signer cannot sign placed fields, so a `collect` assignment with one is refused with `400` before anything is charged.
|
|
2141
|
+
|
|
2099
2142
|
For **virtual**, the document may be in `uploaded`, `metadata_processing` or `metadata_ready`; it is promoted to `pending_signature` automatically once metadata processing completes. For **collect**, the document must be in `metadata_ready` (fields reference specific pages).
|
|
2100
2143
|
|
|
2101
2144
|
`step` controls signing order: signers sharing a step sign in parallel, and the next step is notified only after the previous step completes. If supplied, every signer must supply it and values must be contiguous starting at 1.
|
|
@@ -2112,11 +2155,11 @@ For **virtual**, the document may be in `uploaded`, `metadata_processing` or `me
|
|
|
2112
2155
|
|
|
2113
2156
|
Fields (`application/json`):
|
|
2114
2157
|
|
|
2115
|
-
- `method` (string, required)
|
|
2158
|
+
- `method` (string, required) — `virtual` signs without input fields; `collect` places input fields on pages. Signers with `DigitalCertificate` verification need `virtual` (`collect` returns `400`).
|
|
2116
2159
|
- `signers` (array, required)
|
|
2117
|
-
- `entries` (array) — Required for `collect`: field placements per page.
|
|
2160
|
+
- `entries` (array) — Required for `collect`: field placements per page. In `collect`, every signer listed in `signers` must appear once and own at least one field here; otherwise `400`.
|
|
2118
2161
|
- `message` (string) — Text included in the invitation email.
|
|
2119
|
-
- `expires_at` (string) — ISO 8601; default is no expiration. Must be at least one hour in the future.
|
|
2162
|
+
- `expires_at` (string) — ISO 8601; default is no expiration. Must be at least one hour in the future. A UTC offset in the value is honored (`2026-12-31T23:59:59-03:00` is `2027-01-01T02:59:59Z`); a value without one is read as UTC, and a date alone (`2026-12-31`) means 23:59 UTC that day.
|
|
2120
2163
|
- `copy_receivers` (array) — Signer IDs that only receive a copy.
|
|
2121
2164
|
|
|
2122
2165
|
Example — Create without input (method: virtual, with verification & notification methods):
|
|
@@ -2290,7 +2333,7 @@ Example — Create with input fields (method: collect):
|
|
|
2290
2333
|
"data": {
|
|
2291
2334
|
"resource": "assignment",
|
|
2292
2335
|
"id": "example_id_21",
|
|
2293
|
-
"sender_email": "
|
|
2336
|
+
"sender_email": "user2@example.com",
|
|
2294
2337
|
"method": "virtual",
|
|
2295
2338
|
"expires_at": "2021-09-30T21:00:00Z",
|
|
2296
2339
|
"message": null,
|
|
@@ -2298,7 +2341,7 @@ Example — Create with input fields (method: collect):
|
|
|
2298
2341
|
{
|
|
2299
2342
|
"id": "example_id_15",
|
|
2300
2343
|
"full_name": "Example User",
|
|
2301
|
-
"email": "
|
|
2344
|
+
"email": "user4@example.com",
|
|
2302
2345
|
"verification_method": "Email",
|
|
2303
2346
|
"notification_methods": [
|
|
2304
2347
|
"Email"
|
|
@@ -2310,7 +2353,7 @@ Example — Create with input fields (method: collect):
|
|
|
2310
2353
|
{
|
|
2311
2354
|
"id": "example_id_16",
|
|
2312
2355
|
"full_name": "Example User",
|
|
2313
|
-
"email": "
|
|
2356
|
+
"email": "user5@example.com",
|
|
2314
2357
|
"verification_method": "Whatsapp",
|
|
2315
2358
|
"notification_methods": [
|
|
2316
2359
|
"Whatsapp"
|
|
@@ -2328,7 +2371,7 @@ Example — Create with input fields (method: collect):
|
|
|
2328
2371
|
"signer": {
|
|
2329
2372
|
"id": "example_id_15",
|
|
2330
2373
|
"full_name": "Example User",
|
|
2331
|
-
"email": "
|
|
2374
|
+
"email": "user4@example.com"
|
|
2332
2375
|
},
|
|
2333
2376
|
"field": {
|
|
2334
2377
|
"id": "example_id_23",
|
|
@@ -2347,13 +2390,13 @@ Example — Create with input fields (method: collect):
|
|
|
2347
2390
|
{
|
|
2348
2391
|
"id": "example_id_15",
|
|
2349
2392
|
"full_name": "Example User",
|
|
2350
|
-
"email": "
|
|
2393
|
+
"email": "user4@example.com",
|
|
2351
2394
|
"completed": false
|
|
2352
2395
|
},
|
|
2353
2396
|
{
|
|
2354
2397
|
"id": "example_id_16",
|
|
2355
2398
|
"full_name": "Example User",
|
|
2356
|
-
"email": "
|
|
2399
|
+
"email": "user5@example.com",
|
|
2357
2400
|
"completed": false
|
|
2358
2401
|
}
|
|
2359
2402
|
]
|
|
@@ -2361,11 +2404,11 @@ Example — Create with input fields (method: collect):
|
|
|
2361
2404
|
"signing_urls": [
|
|
2362
2405
|
{
|
|
2363
2406
|
"signer_id": "example_id_15",
|
|
2364
|
-
"url": "https://example.com/example-url-
|
|
2407
|
+
"url": "https://example.com/example-url-7"
|
|
2365
2408
|
},
|
|
2366
2409
|
{
|
|
2367
2410
|
"signer_id": "example_id_16",
|
|
2368
|
-
"url": "https://example.com/example-url-
|
|
2411
|
+
"url": "https://example.com/example-url-8"
|
|
2369
2412
|
}
|
|
2370
2413
|
]
|
|
2371
2414
|
}
|
|
@@ -2381,7 +2424,7 @@ Example — Create with input fields (method: collect):
|
|
|
2381
2424
|
"data": {
|
|
2382
2425
|
"resource": "assignment",
|
|
2383
2426
|
"id": "example_id_13",
|
|
2384
|
-
"sender_email": "
|
|
2427
|
+
"sender_email": "user2@example.com",
|
|
2385
2428
|
"method": "collect",
|
|
2386
2429
|
"expires_at": "2021-09-30T21:00:00Z",
|
|
2387
2430
|
"message": null,
|
|
@@ -2389,7 +2432,7 @@ Example — Create with input fields (method: collect):
|
|
|
2389
2432
|
{
|
|
2390
2433
|
"id": "example_id_17",
|
|
2391
2434
|
"full_name": "Example User",
|
|
2392
|
-
"email": "
|
|
2435
|
+
"email": "user6@example.com",
|
|
2393
2436
|
"verification_method": "Email",
|
|
2394
2437
|
"notification_methods": [
|
|
2395
2438
|
"Email"
|
|
@@ -2401,7 +2444,7 @@ Example — Create with input fields (method: collect):
|
|
|
2401
2444
|
{
|
|
2402
2445
|
"id": "example_id_18",
|
|
2403
2446
|
"full_name": "Example User",
|
|
2404
|
-
"email": "
|
|
2447
|
+
"email": "user7@example.com",
|
|
2405
2448
|
"verification_method": "Whatsapp",
|
|
2406
2449
|
"notification_methods": [
|
|
2407
2450
|
"Whatsapp"
|
|
@@ -2420,12 +2463,12 @@ Example — Create with input fields (method: collect):
|
|
|
2420
2463
|
"number": 1,
|
|
2421
2464
|
"height": 2100,
|
|
2422
2465
|
"width": 1275,
|
|
2423
|
-
"download_url": "https://example.com/example-url-
|
|
2466
|
+
"download_url": "https://example.com/example-url-9"
|
|
2424
2467
|
},
|
|
2425
2468
|
"signer": {
|
|
2426
2469
|
"id": "example_id_17",
|
|
2427
2470
|
"full_name": "Example User",
|
|
2428
|
-
"email": "
|
|
2471
|
+
"email": "user6@example.com"
|
|
2429
2472
|
},
|
|
2430
2473
|
"field": {
|
|
2431
2474
|
"id": "example_id_20",
|
|
@@ -2451,12 +2494,12 @@ Example — Create with input fields (method: collect):
|
|
|
2451
2494
|
"number": 1,
|
|
2452
2495
|
"height": 2100,
|
|
2453
2496
|
"width": 1275,
|
|
2454
|
-
"download_url": "https://example.com/example-url-
|
|
2497
|
+
"download_url": "https://example.com/example-url-9"
|
|
2455
2498
|
},
|
|
2456
2499
|
"signer": {
|
|
2457
2500
|
"id": "example_id_18",
|
|
2458
2501
|
"full_name": "Example User",
|
|
2459
|
-
"email": "
|
|
2502
|
+
"email": "user7@example.com"
|
|
2460
2503
|
},
|
|
2461
2504
|
"field": {
|
|
2462
2505
|
"id": "example_id_20",
|
|
@@ -2483,13 +2526,13 @@ Example — Create with input fields (method: collect):
|
|
|
2483
2526
|
{
|
|
2484
2527
|
"id": "example_id_17",
|
|
2485
2528
|
"full_name": "Example User",
|
|
2486
|
-
"email": "
|
|
2529
|
+
"email": "user6@example.com",
|
|
2487
2530
|
"completed": false
|
|
2488
2531
|
},
|
|
2489
2532
|
{
|
|
2490
2533
|
"id": "example_id_18",
|
|
2491
2534
|
"full_name": "Example User",
|
|
2492
|
-
"email": "
|
|
2535
|
+
"email": "user7@example.com",
|
|
2493
2536
|
"completed": false
|
|
2494
2537
|
}
|
|
2495
2538
|
]
|
|
@@ -2497,11 +2540,11 @@ Example — Create with input fields (method: collect):
|
|
|
2497
2540
|
"signing_urls": [
|
|
2498
2541
|
{
|
|
2499
2542
|
"signer_id": "example_id_17",
|
|
2500
|
-
"url": "https://example.com/example-url-
|
|
2543
|
+
"url": "https://example.com/example-url-10"
|
|
2501
2544
|
},
|
|
2502
2545
|
{
|
|
2503
2546
|
"signer_id": "example_id_18",
|
|
2504
|
-
"url": "https://example.com/example-url-
|
|
2547
|
+
"url": "https://example.com/example-url-11"
|
|
2505
2548
|
}
|
|
2506
2549
|
]
|
|
2507
2550
|
}
|
|
@@ -2577,7 +2620,7 @@ Per-unit costs (in credits) used to build the estimate:
|
|
|
2577
2620
|
|
|
2578
2621
|
Fields (`application/json`):
|
|
2579
2622
|
|
|
2580
|
-
- `method` (string)
|
|
2623
|
+
- `method` (string) — Send the method you will create the assignment with. With `collect`, a `DigitalCertificate` signer returns `400`, because certificate signing works only on `virtual` assignments.
|
|
2581
2624
|
- `signers` (array) — Required for `virtual`; each entry may be `{}` to default to Email.
|
|
2582
2625
|
- `entries` (array) — Required for `collect`.
|
|
2583
2626
|
|
|
@@ -2608,10 +2651,10 @@ Example:
|
|
|
2608
2651
|
{
|
|
2609
2652
|
"data": {
|
|
2610
2653
|
"documents": 1,
|
|
2611
|
-
"credits": 0,
|
|
2654
|
+
"credits": 0.9,
|
|
2612
2655
|
"needs_extra_document": true,
|
|
2613
2656
|
"extra_document_cost": 1,
|
|
2614
|
-
"total_credits":
|
|
2657
|
+
"total_credits": 1.9,
|
|
2615
2658
|
"breakdown": [
|
|
2616
2659
|
{
|
|
2617
2660
|
"code": "NotificationWhatsapp",
|
|
@@ -2622,7 +2665,7 @@ Example:
|
|
|
2622
2665
|
}
|
|
2623
2666
|
],
|
|
2624
2667
|
"document_balance": 0,
|
|
2625
|
-
"credit_balance":
|
|
2668
|
+
"credit_balance": 10,
|
|
2626
2669
|
"has_sufficient_resources": true,
|
|
2627
2670
|
"blocking_reason": null,
|
|
2628
2671
|
"message": null
|
|
@@ -2666,7 +2709,7 @@ Example:
|
|
|
2666
2709
|
|
|
2667
2710
|
`PUT /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/resend`
|
|
2668
2711
|
|
|
2669
|
-
Resend the signature-request notification to a
|
|
2712
|
+
Resend the signature-request notification to a signer of the assignment who has not signed yet, while the document is pending signature. Paid notification methods are charged for each message that goes out.
|
|
2670
2713
|
|
|
2671
2714
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
2672
2715
|
|
|
@@ -2694,6 +2737,10 @@ Resend the signature-request notification to a specific signer of an assignment.
|
|
|
2694
2737
|
}
|
|
2695
2738
|
```
|
|
2696
2739
|
|
|
2740
|
+
##### 400 — The document is not pending signature, the signer is not part of the assignment, has already signed, or waits for an earlier signing step; or the account lacks credits for the reminder.
|
|
2741
|
+
|
|
2742
|
+
##### 404 — The assignment or signer was not found on this document.
|
|
2743
|
+
|
|
2697
2744
|
##### 401 — Missing or invalid credentials.
|
|
2698
2745
|
|
|
2699
2746
|
```json
|
|
@@ -2718,7 +2765,7 @@ Resend the signature-request notification to a specific signer of an assignment.
|
|
|
2718
2765
|
|
|
2719
2766
|
`POST /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/estimate-resend-cost`
|
|
2720
2767
|
|
|
2721
|
-
Estimate the cost of resending the signature request to a signer.
|
|
2768
|
+
Estimate the cost of resending the signature request to a signer. The response has its own shape (`total`, not `total_credits`), because a reminder uses no document.
|
|
2722
2769
|
|
|
2723
2770
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
2724
2771
|
|
|
@@ -2737,25 +2784,16 @@ Estimate the cost of resending the signature request to a signer.
|
|
|
2737
2784
|
```json
|
|
2738
2785
|
{
|
|
2739
2786
|
"data": {
|
|
2740
|
-
"
|
|
2741
|
-
"credits": 0,
|
|
2742
|
-
"needs_extra_document": true,
|
|
2743
|
-
"extra_document_cost": 1,
|
|
2744
|
-
"total_credits": 0,
|
|
2787
|
+
"total": 0.45,
|
|
2745
2788
|
"breakdown": [
|
|
2746
2789
|
{
|
|
2747
|
-
"code": "
|
|
2748
|
-
"name": "Whatsapp Notification",
|
|
2749
|
-
"cost": 0.
|
|
2750
|
-
"quantity": 2,
|
|
2751
|
-
"unit_cost": 0.45
|
|
2790
|
+
"code": "NotificationWhatsappResend",
|
|
2791
|
+
"name": "Whatsapp Notification Resend",
|
|
2792
|
+
"cost": 0.45
|
|
2752
2793
|
}
|
|
2753
2794
|
],
|
|
2754
|
-
"
|
|
2755
|
-
"
|
|
2756
|
-
"has_sufficient_resources": true,
|
|
2757
|
-
"blocking_reason": null,
|
|
2758
|
-
"message": null
|
|
2795
|
+
"credit_balance": 10,
|
|
2796
|
+
"has_sufficient_credits": true
|
|
2759
2797
|
},
|
|
2760
2798
|
"status": 200,
|
|
2761
2799
|
"message": ""
|
|
@@ -2801,7 +2839,7 @@ Set a new expiration date for an assignment, or remove its expiration by sending
|
|
|
2801
2839
|
|
|
2802
2840
|
Fields (`application/json`):
|
|
2803
2841
|
|
|
2804
|
-
- `expires_at` (string | null, required) — New expiration date (ISO 8601). Must be at least one hour in the future. Send `null` to remove the expiration — the key itself is required.
|
|
2842
|
+
- `expires_at` (string | null, required) — New expiration date (ISO 8601). Must be at least one hour in the future. Send `null` to remove the expiration — the key itself is required. A UTC offset in the value is honored (`2026-12-31T23:59:59-03:00` is `2027-01-01T02:59:59Z`); a value without one is read as UTC, and a date alone (`2026-12-31`) means 23:59 UTC that day.
|
|
2805
2843
|
|
|
2806
2844
|
Example:
|
|
2807
2845
|
|
|
@@ -2820,7 +2858,9 @@ Example:
|
|
|
2820
2858
|
"data": {
|
|
2821
2859
|
"resource": "assignment",
|
|
2822
2860
|
"id": "example_id_13",
|
|
2823
|
-
"
|
|
2861
|
+
"document_id": "example_id_3",
|
|
2862
|
+
"created_at": "2026-06-03T03:54:16Z",
|
|
2863
|
+
"sender_email": "user2@example.com",
|
|
2824
2864
|
"method": "virtual",
|
|
2825
2865
|
"expires_at": null,
|
|
2826
2866
|
"message": null,
|
|
@@ -2838,7 +2878,7 @@ Example:
|
|
|
2838
2878
|
"resource": "signer",
|
|
2839
2879
|
"id": "example_id_14",
|
|
2840
2880
|
"full_name": "Example User",
|
|
2841
|
-
"email": "
|
|
2881
|
+
"email": "user3@example.com",
|
|
2842
2882
|
"whatsapp_phone_number": "+5500000000000",
|
|
2843
2883
|
"government_id": "00000000000",
|
|
2844
2884
|
"has_accepted_terms": false
|
|
@@ -2868,7 +2908,7 @@ Example:
|
|
|
2868
2908
|
"signing_urls": [
|
|
2869
2909
|
{
|
|
2870
2910
|
"signer_id": "example_id_5",
|
|
2871
|
-
"url": "https://example.com/example-url-
|
|
2911
|
+
"url": "https://example.com/example-url-6"
|
|
2872
2912
|
}
|
|
2873
2913
|
]
|
|
2874
2914
|
},
|
|
@@ -2922,7 +2962,7 @@ Example:
|
|
|
2922
2962
|
`GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification`
|
|
2923
2963
|
|
|
2924
2964
|
The signer's identity-document verification as the account's reviewer sees it. When the provider sends a verification to review, the account decides it with **Decide signer identity review**. The signer can still view and sign meanwhile; the review holds the document's certification instead (status `pending_identity_review` once every signer has signed).
|
|
2925
|
-
Evidence is a summary kept by Assinafy (no images or biometrics). `evidence_available` is false when the provider keeps none or it could not be fetched yet. While the review is open, `images` lists the evidence images the reviewer can open with **Signer identity review image**. A verification the provider approved directly, without a review, shows no evidence here (`evidence_available` is false); its evidence is on the `signer_identity_verified` activity.
|
|
2965
|
+
Evidence is a summary kept by Assinafy (no images or biometrics). `evidence_available` is false when the provider keeps none or it could not be fetched yet. While the review is open, `images` lists the evidence images the reviewer can open with **Signer identity review image**. A verification the provider approved directly, without a review, shows no evidence here (`evidence_available` is false); its evidence is on the `signer_identity_verified` activity. Reachable with the `documents:read` OAuth scope, but the images and the decision are not available to OAuth applications (`403`): the review is made by a person in Assinafy.
|
|
2926
2966
|
|
|
2927
2967
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
2928
2968
|
|
|
@@ -3008,7 +3048,7 @@ Evidence is a summary kept by Assinafy (no images or biometrics). `evidence_avai
|
|
|
3008
3048
|
|
|
3009
3049
|
`GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/images/{name}`
|
|
3010
3050
|
|
|
3011
|
-
One evidence image of a signer identity verification that is `InReview`, for the account's reviewer: the document photos (or the digital document PDF) and the face photo. Fetched from the verification provider on each request and never stored by Assinafy. Available only while the review is open; once it is decided, every image returns 404. `name` must be one of the review's `images`.
|
|
3051
|
+
One evidence image of a signer identity verification that is `InReview`, for the account's reviewer: the document photos (or the digital document PDF) and the face photo. Fetched from the verification provider on each request and never stored by Assinafy. Available only while the review is open; once it is decided, every image returns 404. `name` must be one of the review's `images`. Not available to OAuth applications (`403`): the images are for the person reviewing.
|
|
3012
3052
|
|
|
3013
3053
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
3014
3054
|
|
|
@@ -3051,7 +3091,7 @@ One evidence image of a signer identity verification that is `InReview`, for the
|
|
|
3051
3091
|
|
|
3052
3092
|
`POST /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/review`
|
|
3053
3093
|
|
|
3054
|
-
Approves or rejects a signer whose identity verification is `InReview`, while the document is `pending_signature` or `pending_identity_review`. Approved: once every signer has signed and no other signer is under review, the document is certificated; the certificate states the approval by review and every difference found. Rejected: the document is cancelled (`rejected_by_user`, with the reviewer as the user) and every signer and copy receiver gets the cancellation notice; the note is never shown to them. The signer gets no message about the decision itself. The decision is also reported to the verification provider.
|
|
3094
|
+
Approves or rejects a signer whose identity verification is `InReview`, while the document is `pending_signature` or `pending_identity_review`. Approved: once every signer has signed and no other signer is under review, the document is certificated; the certificate states the approval by review and every difference found. Rejected: the document is cancelled (`rejected_by_user`, with the reviewer as the user) and every signer and copy receiver gets the cancellation notice; the note is never shown to them. The signer gets no message about the decision itself. The decision is also reported to the verification provider. Not available to OAuth applications (`403`): the certificate names the person who reviewed, so the decision is made in Assinafy.
|
|
3055
3095
|
|
|
3056
3096
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
3057
3097
|
|
|
@@ -3174,7 +3214,7 @@ List all WhatsApp notification messages sent for an assignment. The response inc
|
|
|
3174
3214
|
{
|
|
3175
3215
|
"data": [
|
|
3176
3216
|
{
|
|
3177
|
-
"sent_at":
|
|
3217
|
+
"sent_at": "2026-07-07T12:00:00Z",
|
|
3178
3218
|
"header": "Documento para assinatura: Contrato de Servico",
|
|
3179
3219
|
"body": "string",
|
|
3180
3220
|
"buttons": [
|
|
@@ -3232,7 +3272,7 @@ Example:
|
|
|
3232
3272
|
|
|
3233
3273
|
```json
|
|
3234
3274
|
{
|
|
3235
|
-
"email": "
|
|
3275
|
+
"email": "user8@example.com",
|
|
3236
3276
|
"password": "example_secret"
|
|
3237
3277
|
}
|
|
3238
3278
|
```
|
|
@@ -3248,7 +3288,7 @@ Example:
|
|
|
3248
3288
|
"user": {
|
|
3249
3289
|
"id": "example_id_28",
|
|
3250
3290
|
"name": "John Smith",
|
|
3251
|
-
"email": "
|
|
3291
|
+
"email": "user9@example.com",
|
|
3252
3292
|
"telephone": "+5500000000000",
|
|
3253
3293
|
"government_id": "00000000000",
|
|
3254
3294
|
"is_email_verified": false,
|
|
@@ -3311,7 +3351,7 @@ Example:
|
|
|
3311
3351
|
|
|
3312
3352
|
```json
|
|
3313
3353
|
{
|
|
3314
|
-
"email": "
|
|
3354
|
+
"email": "user8@example.com"
|
|
3315
3355
|
}
|
|
3316
3356
|
```
|
|
3317
3357
|
|
|
@@ -3322,7 +3362,7 @@ Example:
|
|
|
3322
3362
|
```json
|
|
3323
3363
|
{
|
|
3324
3364
|
"data": {
|
|
3325
|
-
"email": "
|
|
3365
|
+
"email": "user8@example.com"
|
|
3326
3366
|
},
|
|
3327
3367
|
"status": 200,
|
|
3328
3368
|
"message": ""
|
|
@@ -3359,7 +3399,7 @@ Example:
|
|
|
3359
3399
|
|
|
3360
3400
|
```json
|
|
3361
3401
|
{
|
|
3362
|
-
"email": "
|
|
3402
|
+
"email": "user8@example.com",
|
|
3363
3403
|
"token": "example_secret",
|
|
3364
3404
|
"new_password": "example_secret"
|
|
3365
3405
|
}
|
|
@@ -3372,7 +3412,7 @@ Example:
|
|
|
3372
3412
|
```json
|
|
3373
3413
|
{
|
|
3374
3414
|
"data": {
|
|
3375
|
-
"email": "
|
|
3415
|
+
"email": "user8@example.com"
|
|
3376
3416
|
},
|
|
3377
3417
|
"status": 200,
|
|
3378
3418
|
"message": ""
|
|
@@ -3419,7 +3459,7 @@ Example:
|
|
|
3419
3459
|
|
|
3420
3460
|
```json
|
|
3421
3461
|
{
|
|
3422
|
-
"email": "
|
|
3462
|
+
"email": "user8@example.com",
|
|
3423
3463
|
"password": "example_secret",
|
|
3424
3464
|
"new_password": "example_secret"
|
|
3425
3465
|
}
|
|
@@ -3432,7 +3472,7 @@ Example:
|
|
|
3432
3472
|
```json
|
|
3433
3473
|
{
|
|
3434
3474
|
"data": {
|
|
3435
|
-
"email": "
|
|
3475
|
+
"email": "user8@example.com"
|
|
3436
3476
|
},
|
|
3437
3477
|
"status": 200,
|
|
3438
3478
|
"message": ""
|
|
@@ -3504,7 +3544,7 @@ Example:
|
|
|
3504
3544
|
"user": {
|
|
3505
3545
|
"id": "example_id_28",
|
|
3506
3546
|
"name": "John Smith",
|
|
3507
|
-
"email": "
|
|
3547
|
+
"email": "user9@example.com",
|
|
3508
3548
|
"telephone": "+5500000000000",
|
|
3509
3549
|
"government_id": "00000000000",
|
|
3510
3550
|
"is_email_verified": false,
|
|
@@ -3633,7 +3673,7 @@ Example:
|
|
|
3633
3673
|
"data": {
|
|
3634
3674
|
"id": "example_id_29",
|
|
3635
3675
|
"secret": "example_secret",
|
|
3636
|
-
"provisioning_uri": "https://example.com/example-url-
|
|
3676
|
+
"provisioning_uri": "https://example.com/example-url-12"
|
|
3637
3677
|
},
|
|
3638
3678
|
"status": 200,
|
|
3639
3679
|
"message": ""
|
|
@@ -3935,7 +3975,7 @@ Example:
|
|
|
3935
3975
|
"user": {
|
|
3936
3976
|
"id": "example_id_28",
|
|
3937
3977
|
"name": "John Smith",
|
|
3938
|
-
"email": "
|
|
3978
|
+
"email": "user9@example.com",
|
|
3939
3979
|
"telephone": "+5500000000000",
|
|
3940
3980
|
"government_id": "00000000000",
|
|
3941
3981
|
"is_email_verified": false,
|
|
@@ -4183,15 +4223,13 @@ Delete the existing API key.
|
|
|
4183
4223
|
}
|
|
4184
4224
|
```
|
|
4185
4225
|
|
|
4186
|
-
##
|
|
4187
|
-
|
|
4188
|
-
### List fields
|
|
4226
|
+
## Contracts
|
|
4189
4227
|
|
|
4190
|
-
|
|
4228
|
+
### List contracts
|
|
4191
4229
|
|
|
4192
|
-
|
|
4230
|
+
`GET /v1/accounts/{accountId}/contracts`
|
|
4193
4231
|
|
|
4194
|
-
|
|
4232
|
+
List the contract terms tracked on the workspace's documents, most recently updated first. Every filter is optional and only narrows the list. To catch up after a webhook that never arrived, page this list until the contracts are older than your last sync: every change to the terms, by a user or by the hourly run, moves `updated_at`. Each document's history of contract events is at `GET /v1/documents/{documentId}/activities`.
|
|
4195
4233
|
|
|
4196
4234
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4197
4235
|
|
|
@@ -4200,32 +4238,134 @@ When `include_standard` is enabled, records of type `signature`, `initial` and `
|
|
|
4200
4238
|
| Name | In | Type | Required | Description |
|
|
4201
4239
|
|---|---|---|---|---|
|
|
4202
4240
|
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4203
|
-
| `
|
|
4204
|
-
| `
|
|
4241
|
+
| `status` | query | array | no | Contract status; several, comma-separated, match any of them. |
|
|
4242
|
+
| `counterparty` | query | string | no | Part of the counterparty name, or its exact CPF/CNPJ. |
|
|
4243
|
+
| `search` | query | string | no | Part of the document's name. |
|
|
4244
|
+
| `end_date_from` | query | string | no | Contracts ending on or after this date. |
|
|
4245
|
+
| `end_date_to` | query | string | no | Contracts ending on or before this date. |
|
|
4246
|
+
| `ending_within_days` | query | integer | no | Contracts ending from today (the API's calendar day, Brasília time) to that many days later, both included; `0` is today. Any status: add `status=active` for the ones still in force. |
|
|
4247
|
+
| `external_system` | query | string | no | System of an external reference, e.g. `hubspot`. |
|
|
4248
|
+
| `external_id` | query | string | no | ID of an external reference in that system. |
|
|
4249
|
+
| `sort` | query | string | no | `end_date` or `updated_at`; prefix with `-` for descending (`-updated_at`, the default). Contracts without an end date come last either way. |
|
|
4250
|
+
| `expand` | query | string | no | `document` embeds each contract's document. |
|
|
4251
|
+
| `page` | query | integer | no | Page number. |
|
|
4252
|
+
| `per-page` | query | integer | no | Records per page (max 100). |
|
|
4205
4253
|
|
|
4206
4254
|
#### Responses
|
|
4207
4255
|
|
|
4208
|
-
##### 200 —
|
|
4256
|
+
##### 200 — A page of contracts
|
|
4257
|
+
|
|
4258
|
+
**A page of contracts**
|
|
4209
4259
|
|
|
4210
4260
|
```json
|
|
4211
4261
|
{
|
|
4262
|
+
"status": 200,
|
|
4263
|
+
"message": "",
|
|
4212
4264
|
"data": [
|
|
4213
4265
|
{
|
|
4214
|
-
"
|
|
4215
|
-
"
|
|
4216
|
-
"
|
|
4217
|
-
"
|
|
4218
|
-
"
|
|
4219
|
-
"
|
|
4220
|
-
"
|
|
4221
|
-
"
|
|
4222
|
-
"
|
|
4223
|
-
"
|
|
4224
|
-
"
|
|
4266
|
+
"document_id": "example_id_30",
|
|
4267
|
+
"status": "active",
|
|
4268
|
+
"counterparty_name": "Acme Ltda",
|
|
4269
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4270
|
+
"value": 120000.5,
|
|
4271
|
+
"currency": "BRL",
|
|
4272
|
+
"start_date": "2026-11-01",
|
|
4273
|
+
"end_date": "2027-10-31",
|
|
4274
|
+
"auto_renew": true,
|
|
4275
|
+
"renewal_term_months": 12,
|
|
4276
|
+
"notice_period_days": 30,
|
|
4277
|
+
"term": 1,
|
|
4278
|
+
"owner_id": "example_id_31",
|
|
4279
|
+
"metadata": {
|
|
4280
|
+
"crm_stage": "won"
|
|
4281
|
+
},
|
|
4282
|
+
"external_references": [
|
|
4283
|
+
{
|
|
4284
|
+
"system": "hubspot",
|
|
4285
|
+
"id": "example_id_32"
|
|
4286
|
+
}
|
|
4287
|
+
],
|
|
4288
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
4289
|
+
"updated_at": "2026-10-23T12:00:00Z"
|
|
4225
4290
|
}
|
|
4226
|
-
]
|
|
4291
|
+
]
|
|
4292
|
+
}
|
|
4293
|
+
```
|
|
4294
|
+
|
|
4295
|
+
**A page of contracts with their documents (expand=document)**
|
|
4296
|
+
|
|
4297
|
+
```json
|
|
4298
|
+
{
|
|
4227
4299
|
"status": 200,
|
|
4228
|
-
"message": ""
|
|
4300
|
+
"message": "",
|
|
4301
|
+
"data": [
|
|
4302
|
+
{
|
|
4303
|
+
"document_id": "example_id_30",
|
|
4304
|
+
"status": "active",
|
|
4305
|
+
"counterparty_name": "Acme Ltda",
|
|
4306
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4307
|
+
"value": 120000.5,
|
|
4308
|
+
"currency": "BRL",
|
|
4309
|
+
"start_date": "2026-11-01",
|
|
4310
|
+
"end_date": "2027-10-31",
|
|
4311
|
+
"auto_renew": true,
|
|
4312
|
+
"renewal_term_months": 12,
|
|
4313
|
+
"notice_period_days": 30,
|
|
4314
|
+
"term": 1,
|
|
4315
|
+
"owner_id": "example_id_31",
|
|
4316
|
+
"metadata": {
|
|
4317
|
+
"crm_stage": "won"
|
|
4318
|
+
},
|
|
4319
|
+
"external_references": [
|
|
4320
|
+
{
|
|
4321
|
+
"system": "hubspot",
|
|
4322
|
+
"id": "example_id_32"
|
|
4323
|
+
}
|
|
4324
|
+
],
|
|
4325
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
4326
|
+
"updated_at": "2026-10-23T12:00:00Z",
|
|
4327
|
+
"document": {
|
|
4328
|
+
"id": "example_id_30",
|
|
4329
|
+
"account_id": "example_id_4",
|
|
4330
|
+
"template_id": null,
|
|
4331
|
+
"name": "Contrato de prestação de serviços.pdf",
|
|
4332
|
+
"status": "certificated",
|
|
4333
|
+
"artifacts": {
|
|
4334
|
+
"original": "https://example.com/example-url-13"
|
|
4335
|
+
},
|
|
4336
|
+
"is_closed": true,
|
|
4337
|
+
"signing_url": "https://example.com/example-url-14",
|
|
4338
|
+
"verification_code": "example_secret",
|
|
4339
|
+
"verification_url": "https://example.com/example-url-4",
|
|
4340
|
+
"decline_reason": null,
|
|
4341
|
+
"declined_by": null,
|
|
4342
|
+
"tags": [],
|
|
4343
|
+
"created_at": "2026-10-20T14:00:00Z",
|
|
4344
|
+
"updated_at": "2026-10-22T09:00:00Z"
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4347
|
+
]
|
|
4348
|
+
}
|
|
4349
|
+
```
|
|
4350
|
+
|
|
4351
|
+
##### 400 — The request breaks a contract rule. `errors` has one entry per problem found: the `field` as sent (`null` when the request as a whole is refused), a stable `code` to translate, and the `message` in the platform's language; `message` at the top is the first entry's. The contract's own rules on the terms, and the external references' items, report every field that breaks one, an entry per field (its first problem); the other checks (the body, its fields, the contract's state, a renewal's or a link's conditions) stop at the first problem they find. | Code | Field | Refused when | |------|-------|--------------| | `InvalidBody` | — | The body is not a JSON object (a list, a bare value), or a `PUT` of contract terms sends no attribute. | | `UnknownField` | the attribute | The endpoint does not take the attribute; one entry per attribute. | | `NotSingleValue` | the attribute | On a `PUT` of contract terms, a list sent for a term that takes one value (every term but `metadata` and `external_references`). On a link, the same list answers the term's own code. | | `Required` | `parent_document_id`, `relation_type`, `external_references[i].system`, `external_references[i].id` | A first link without `parent_document_id` (a pending link that was removed meanwhile) or `relation_type`; an `external_references` item without `system` or `id` (`i` is its place in the list sent, from 0). | | `Invalid` | the field | The value is not of the field's type or form: `status` not one of the four; `currency` not three letters; `auto_renew` not a boolean; `owner_id` not a user id; `value` not a number; `counterparty_name` holding HTML; `metadata` not an object; `external_references` not a list, an item's `system` (`external_references[i].system`) with characters other than letters, digits, `_`, `-` and `.`, or its `id` (`external_references[i].id`) with an emoji or another 4-byte character; `parent_document_id` not text; `relation_type` not `amendment`, `renewal` or `termination`; `term` not a whole number from 1; `reason` not text. On the list: a filter sent as a list, a `status` not one of the four, `ending_within_days` not a whole number. | | `TooSmall`, `TooBig` | the field | `value` below 0 or above 9999999999999.99; `renewal_term_months` outside 1 to 600; `notice_period_days` (and the list's `ending_within_days`) outside 0 to 3650. | | `TooLong` | the field | `counterparty_name` over 255 characters, counting each emoji as stored (several characters); `counterparty_taxpayer_id` over 20; `reason` over 500; `external_references[i].system` over 64 or `external_references[i].id` over 255. | | `TooMany` | `external_references` | More than 20 items. | | `TooManyDecimals` | `value` | More than two decimal places. | | `InvalidDate` | `start_date`, `end_date`, `updated_at`; the list's `end_date_from`, `end_date_to` | Not a date as `YYYY-MM-DD` (an impossible one such as `2026-02-30` included); `updated_at` not a date and time as the API writes it (`2026-10-23T12:00:00Z`, or with an offset). | | `DateTooEarly` | `start_date`, `end_date` | Before the year 1000. | | `DateTooLate` | `end_date` | A renewal by the term would pass 9999-12-31. | | `EndBeforeStart` | `end_date` | Before `start_date`. | | `InvalidTaxpayerId` | `counterparty_taxpayer_id` | Not a valid CPF or CNPJ (formatted or not). | | `NotAMember` | `owner_id` | Not an active member of the workspace. | | `TooManyKeys` | `metadata` | More than 50 keys. | | `InvalidKey` | `metadata` | A key that is not 1 to 40 letters, digits, `_`, `-` or `.`. | | `InvalidValue` | `metadata` | A value that is not plain text of at most 500 characters. | | `NumberUnderDateKey` | `metadata` | A number under a key ending in `_at`, or `stuck_since`, which the API would return as a date. | | `ListKeys` | `metadata` | Keys `0`, `1`, `2`…, which would read back as a list. | | `DuplicateReference` | `external_references` | Two items the database takes for one (accents, `ß` and `ss`); items equal case aside are merged, not refused. | | `StatusNotSettable` | `status` | A tracked contract sent `expired` or `terminated`, or a closed one sent `draft` or `active`: a contract is closed by terminating it and reopened by renewing it. | | `CannotReturnToDraft` | `status` | An `active` contract sent `draft`. | | `ExpiredNeedsPastEndDate` | `end_date` | New terms with status `expired` and no `end_date` before today. | | `TerminatedNeedsEndDate` | `end_date` | New terms with status `terminated` and no `end_date`. | | `UnsignableDocument` | — | New terms, or a first link, on a cancelled, declined or expired document. Terms or a link already on one stay editable. | | `DocumentIsAmendment` | — | Terms of its own for a document linked as an amendment: its terms are the changes it makes. | | `DocumentHasOwnTerms` | — | A link for a document that tracks a contract of its own: a document is a contract or an amendment, never both. | | `ParentHasNoTerms` | `parent_document_id` | The parent named has no contract terms, nor amends a contract that has. | | `ParentTerminated` | `parent_document_id` | The parent contract is terminated. | | `NoTermChanged` | — | An `amendment` that changes no term, also by dropping its last one. A `renewal` or `termination` may change none. | | `TermNotAllowed` | the term | A term the relation type cannot change: a `renewal` changes only `end_date` and `value`, a `termination` only `end_date`. | | `AmendmentApplied` | — | The amendment applied when its document was signed and can no longer change. | | `TermOrEndDateRequired` | — | A renewal sends neither `term` nor `end_date`. | | `TermMismatch` | `term` | Not the contract's current term: the renewal already happened. | | `ContractTerminated` | — | A renewal of a terminated contract. | | `EndDateRequired` | `end_date` | A renewal by the term, or a `renewal` link without `end_date`, of a contract without an end date. | | `EndDateNotAfterCurrent` | `end_date` | A renewal, or a `renewal` link, to a date not after the current end date. | | `AlreadyTerminated` | — | A termination of a contract already terminated. | A body that is not valid JSON is refused before it reaches these endpoints, with the platform's `400` and no `errors`. A link is also checked against what applying it today would give the parent, so a delta the contract would refuse comes back with the contract's own codes.
|
|
4352
|
+
|
|
4353
|
+
```json
|
|
4354
|
+
{
|
|
4355
|
+
"status": 400,
|
|
4356
|
+
"message": "value must be no less than 0.",
|
|
4357
|
+
"errors": [
|
|
4358
|
+
{
|
|
4359
|
+
"field": "value",
|
|
4360
|
+
"code": "TooSmall",
|
|
4361
|
+
"message": "value must be no less than 0."
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
"field": "currency",
|
|
4365
|
+
"code": "Invalid",
|
|
4366
|
+
"message": "currency is invalid."
|
|
4367
|
+
}
|
|
4368
|
+
]
|
|
4229
4369
|
}
|
|
4230
4370
|
```
|
|
4231
4371
|
|
|
@@ -4249,11 +4389,11 @@ When `include_standard` is enabled, records of type `signature`, `initial` and `
|
|
|
4249
4389
|
}
|
|
4250
4390
|
```
|
|
4251
4391
|
|
|
4252
|
-
###
|
|
4392
|
+
### Get a document's contract terms
|
|
4253
4393
|
|
|
4254
|
-
`
|
|
4394
|
+
`GET /v1/accounts/{accountId}/documents/{documentId}/contract`
|
|
4255
4395
|
|
|
4256
|
-
|
|
4396
|
+
The contract terms tracked on a document, with `amendments`: the documents that amend, renew or terminate it. For a document that is itself an amendment, its link and delta (`DocumentContractAmendment`) instead. Readable even after the workspace's plan stops including contract tracking.
|
|
4257
4397
|
|
|
4258
4398
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4259
4399
|
|
|
@@ -4262,58 +4402,131 @@ Create a field definition in the workspace.
|
|
|
4262
4402
|
| Name | In | Type | Required | Description |
|
|
4263
4403
|
|---|---|---|---|---|
|
|
4264
4404
|
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4405
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
4265
4406
|
|
|
4266
|
-
####
|
|
4267
|
-
|
|
4268
|
-
Fields (`application/json`):
|
|
4407
|
+
#### Responses
|
|
4269
4408
|
|
|
4270
|
-
|
|
4271
|
-
- `type` (string, required)
|
|
4272
|
-
- `regex` (string | null)
|
|
4273
|
-
- `is_required` (boolean)
|
|
4409
|
+
##### 200 — The contract terms, or the amendment
|
|
4274
4410
|
|
|
4275
|
-
|
|
4411
|
+
**The contract terms with their amendments**
|
|
4276
4412
|
|
|
4277
4413
|
```json
|
|
4278
4414
|
{
|
|
4279
|
-
"
|
|
4280
|
-
"
|
|
4281
|
-
"
|
|
4282
|
-
|
|
4415
|
+
"status": 200,
|
|
4416
|
+
"message": "",
|
|
4417
|
+
"data": {
|
|
4418
|
+
"resource": "document_contract",
|
|
4419
|
+
"document_id": "example_id_30",
|
|
4420
|
+
"status": "active",
|
|
4421
|
+
"counterparty_name": "Acme Ltda",
|
|
4422
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4423
|
+
"value": 130000,
|
|
4424
|
+
"currency": "BRL",
|
|
4425
|
+
"start_date": "2026-11-01",
|
|
4426
|
+
"end_date": "2028-06-30",
|
|
4427
|
+
"auto_renew": true,
|
|
4428
|
+
"renewal_term_months": 12,
|
|
4429
|
+
"notice_period_days": 30,
|
|
4430
|
+
"term": 2,
|
|
4431
|
+
"owner_id": "example_id_31",
|
|
4432
|
+
"metadata": {
|
|
4433
|
+
"crm_stage": "won"
|
|
4434
|
+
},
|
|
4435
|
+
"external_references": [
|
|
4436
|
+
{
|
|
4437
|
+
"system": "hubspot",
|
|
4438
|
+
"id": "example_id_32"
|
|
4439
|
+
}
|
|
4440
|
+
],
|
|
4441
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
4442
|
+
"updated_at": "2027-05-12T18:20:00Z",
|
|
4443
|
+
"amendments": [
|
|
4444
|
+
{
|
|
4445
|
+
"document_id": "example_id_33",
|
|
4446
|
+
"document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
|
|
4447
|
+
"parent_document_id": "example_id_30",
|
|
4448
|
+
"relation_type": "amendment",
|
|
4449
|
+
"number": 1,
|
|
4450
|
+
"status": "applied",
|
|
4451
|
+
"document_status": "certificated",
|
|
4452
|
+
"apply_error": null,
|
|
4453
|
+
"currency": "BRL",
|
|
4454
|
+
"terms": {
|
|
4455
|
+
"value": 130000,
|
|
4456
|
+
"end_date": "2028-06-30"
|
|
4457
|
+
},
|
|
4458
|
+
"changes": {
|
|
4459
|
+
"value": {
|
|
4460
|
+
"from": 120000.5,
|
|
4461
|
+
"to": 130000
|
|
4462
|
+
},
|
|
4463
|
+
"end_date": {
|
|
4464
|
+
"from": "2027-10-31",
|
|
4465
|
+
"to": "2028-06-30"
|
|
4466
|
+
},
|
|
4467
|
+
"term": {
|
|
4468
|
+
"from": 1,
|
|
4469
|
+
"to": 2
|
|
4470
|
+
}
|
|
4471
|
+
},
|
|
4472
|
+
"applied_at": "2027-05-12T18:20:00Z",
|
|
4473
|
+
"created_at": "2027-05-10T15:00:00Z",
|
|
4474
|
+
"updated_at": "2027-05-12T18:20:00Z"
|
|
4475
|
+
}
|
|
4476
|
+
]
|
|
4477
|
+
}
|
|
4283
4478
|
}
|
|
4284
4479
|
```
|
|
4285
4480
|
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
##### 200 — The created field
|
|
4481
|
+
**The amendment, waiting for its signature**
|
|
4289
4482
|
|
|
4290
4483
|
```json
|
|
4291
4484
|
{
|
|
4292
|
-
"data": {
|
|
4293
|
-
"resource": "field",
|
|
4294
|
-
"id": "example_id_20",
|
|
4295
|
-
"name": "Signature",
|
|
4296
|
-
"type": "signature",
|
|
4297
|
-
"regex": null,
|
|
4298
|
-
"is_pre_defined": true,
|
|
4299
|
-
"is_active": true,
|
|
4300
|
-
"is_required": true,
|
|
4301
|
-
"is_standard": true,
|
|
4302
|
-
"is_read_only": true,
|
|
4303
|
-
"is_visible": true
|
|
4304
|
-
},
|
|
4305
4485
|
"status": 200,
|
|
4306
|
-
"message": ""
|
|
4486
|
+
"message": "",
|
|
4487
|
+
"data": {
|
|
4488
|
+
"resource": "document_contract_amendment",
|
|
4489
|
+
"document_id": "example_id_33",
|
|
4490
|
+
"document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
|
|
4491
|
+
"parent_document_id": "example_id_30",
|
|
4492
|
+
"relation_type": "amendment",
|
|
4493
|
+
"number": null,
|
|
4494
|
+
"status": "pending",
|
|
4495
|
+
"document_status": "pending_signature",
|
|
4496
|
+
"apply_error": null,
|
|
4497
|
+
"currency": "BRL",
|
|
4498
|
+
"terms": {
|
|
4499
|
+
"value": 130000,
|
|
4500
|
+
"end_date": "2028-06-30"
|
|
4501
|
+
},
|
|
4502
|
+
"changes": {
|
|
4503
|
+
"value": {
|
|
4504
|
+
"from": 120000.5,
|
|
4505
|
+
"to": 130000
|
|
4506
|
+
},
|
|
4507
|
+
"end_date": {
|
|
4508
|
+
"from": "2027-10-31",
|
|
4509
|
+
"to": "2028-06-30"
|
|
4510
|
+
},
|
|
4511
|
+
"term": {
|
|
4512
|
+
"from": 1,
|
|
4513
|
+
"to": 2
|
|
4514
|
+
}
|
|
4515
|
+
},
|
|
4516
|
+
"applied_at": null,
|
|
4517
|
+
"created_at": "2027-05-10T15:00:00Z",
|
|
4518
|
+
"updated_at": "2027-05-10T15:00:00Z"
|
|
4519
|
+
}
|
|
4307
4520
|
}
|
|
4308
4521
|
```
|
|
4309
4522
|
|
|
4310
|
-
#####
|
|
4523
|
+
##### 404 — The document is not in the workspace (`Document not found.`), or carries no contract terms (on a read: neither its own nor those of a contract it amends whose document still exists). Only the second has a `code`, `NoContractTerms`, so a document without terms can be told from one that is not there.
|
|
4311
4524
|
|
|
4312
4525
|
```json
|
|
4313
4526
|
{
|
|
4314
|
-
"status":
|
|
4315
|
-
"message": "
|
|
4316
|
-
"
|
|
4527
|
+
"status": 404,
|
|
4528
|
+
"message": "This document has no contract terms.",
|
|
4529
|
+
"code": "NoContractTerms"
|
|
4317
4530
|
}
|
|
4318
4531
|
```
|
|
4319
4532
|
|
|
@@ -4337,11 +4550,11 @@ Example:
|
|
|
4337
4550
|
}
|
|
4338
4551
|
```
|
|
4339
4552
|
|
|
4340
|
-
###
|
|
4553
|
+
### Set a document's contract terms
|
|
4341
4554
|
|
|
4342
|
-
`
|
|
4555
|
+
`PUT /v1/accounts/{accountId}/documents/{documentId}/contract`
|
|
4343
4556
|
|
|
4344
|
-
|
|
4557
|
+
Creates the document's contract terms, or changes only the attributes sent (see the request body for what `null` does). `external_references`, when sent, replaces the whole list. Records a `document_contract_updated` event when the terms change; a retry that changes nothing records none. The body must be a JSON object with at least one attribute. With `parent_document_id`, the document is instead linked as an amendment, renewal or termination of that contract (or of any document in its family, resolved to the root) and the other attributes are the terms it changes; a later `PUT` on a pending amendment merges into that delta (a `null` drops a key) and `parent_document_id: null` unlinks it; every change to the link records `document_contract_amendment_updated` on this document. The delta applies to the parent once the document is certificated (at once, if it already is), in signing order (the order the documents' certifications were recorded in, fixed for each once it is; a certificated document with none recorded waits, and is placed by its certification time an hour on): instruments signed earlier apply first, one that cannot holds the later ones back, and an instrument signed before one already applied is blocked instead of applied over it. Applying records `document_contract_amended`; an applied amendment is read-only. A cancelled, declined or expired document takes no new terms and no new link; terms or a link already on one stay and can still change. Send the `updated_at` you read with the write to have it refused (`409`) if the contract or link changed meanwhile. Needs a plan with contract tracking (`403` otherwise).
|
|
4345
4558
|
|
|
4346
4559
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4347
4560
|
|
|
@@ -4350,104 +4563,964 @@ Retrieve a single field definition.
|
|
|
4350
4563
|
| Name | In | Type | Required | Description |
|
|
4351
4564
|
|---|---|---|---|---|
|
|
4352
4565
|
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4353
|
-
| `
|
|
4566
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
4354
4567
|
|
|
4355
|
-
####
|
|
4568
|
+
#### Request Body (required)
|
|
4356
4569
|
|
|
4357
|
-
|
|
4570
|
+
Fields (`application/json`):
|
|
4358
4571
|
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4572
|
+
- `status` (string) — On creation any status, so a contract that ended before it was tracked is registered as it ended: `expired` needs an `end_date` in the past, `terminated` its `end_date`; neither is walked by the lifecycle. Afterwards only `draft` or `active` (a contract in force never goes back to `draft`): `expired` and `terminated` are set by the lifecycle and the terminate endpoint; a closed contract is reopened by renewing it.
|
|
4573
|
+
- `counterparty_name` (string | null) — Emoji are kept; other characters outside the 3-byte range are dropped.
|
|
4574
|
+
- `counterparty_taxpayer_id` (string | null) — A valid CPF or CNPJ, formatted or not.
|
|
4575
|
+
- `value` (number | null) — Two decimal places at most.
|
|
4576
|
+
- `currency` (string | null) — Three letters, such as `BRL` or `USD`, stored in capitals; `BRL` when a `value` is set without one.
|
|
4577
|
+
- `start_date` (string | null) — `YYYY-MM-DD`, from the year 1000.
|
|
4578
|
+
- `end_date` (string | null) — `YYYY-MM-DD`, on or after `start_date`.
|
|
4579
|
+
- `auto_renew` (boolean) — Whether the hourly run starts the next term the day after `end_date`, by `renewal_term_months`, instead of expiring the contract.
|
|
4580
|
+
- `renewal_term_months` (integer | null) — How far a renewal by the term moves `end_date`; 12 when unset.
|
|
4581
|
+
- `notice_period_days` (integer | null) — Days before `end_date` the notice period starts (`document_contract_renewal_notice`); none when unset.
|
|
4582
|
+
- `owner_id` (string | null) — An active member of this workspace.
|
|
4583
|
+
- `metadata` (object | null) — 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`.
|
|
4584
|
+
- `external_references` (array | null) — 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`.
|
|
4585
|
+
- `parent_document_id` (string | 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.
|
|
4586
|
+
- `relation_type` (string) — 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).
|
|
4587
|
+
- `updated_at` (string) — 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).
|
|
4588
|
+
|
|
4589
|
+
Example — Set every term:
|
|
4590
|
+
|
|
4591
|
+
```json
|
|
4592
|
+
{
|
|
4593
|
+
"status": "active",
|
|
4594
|
+
"counterparty_name": "Acme Ltda",
|
|
4595
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4596
|
+
"value": 120000.5,
|
|
4597
|
+
"currency": "BRL",
|
|
4598
|
+
"start_date": "2026-11-01",
|
|
4599
|
+
"end_date": "2027-10-31",
|
|
4600
|
+
"auto_renew": true,
|
|
4601
|
+
"renewal_term_months": 12,
|
|
4602
|
+
"notice_period_days": 30,
|
|
4603
|
+
"owner_id": "example_id_31",
|
|
4604
|
+
"metadata": {
|
|
4605
|
+
"crm_stage": "won"
|
|
4373
4606
|
},
|
|
4374
|
-
"
|
|
4375
|
-
|
|
4607
|
+
"external_references": [
|
|
4608
|
+
{
|
|
4609
|
+
"system": "hubspot",
|
|
4610
|
+
"id": "example_id_32"
|
|
4611
|
+
}
|
|
4612
|
+
]
|
|
4376
4613
|
}
|
|
4377
4614
|
```
|
|
4378
4615
|
|
|
4379
|
-
|
|
4616
|
+
Example — Change one term, clear another:
|
|
4380
4617
|
|
|
4381
4618
|
```json
|
|
4382
4619
|
{
|
|
4383
|
-
"
|
|
4384
|
-
"
|
|
4385
|
-
"data": null
|
|
4620
|
+
"notice_period_days": 60,
|
|
4621
|
+
"counterparty_name": null
|
|
4386
4622
|
}
|
|
4387
4623
|
```
|
|
4388
4624
|
|
|
4389
|
-
|
|
4625
|
+
Example — Replace the external references:
|
|
4390
4626
|
|
|
4391
4627
|
```json
|
|
4392
4628
|
{
|
|
4393
|
-
"
|
|
4394
|
-
|
|
4395
|
-
|
|
4629
|
+
"external_references": [
|
|
4630
|
+
{
|
|
4631
|
+
"system": "hubspot",
|
|
4632
|
+
"id": "example_id_32"
|
|
4633
|
+
},
|
|
4634
|
+
{
|
|
4635
|
+
"system": "erp",
|
|
4636
|
+
"id": "example_id_34"
|
|
4637
|
+
}
|
|
4638
|
+
]
|
|
4396
4639
|
}
|
|
4397
4640
|
```
|
|
4398
4641
|
|
|
4399
|
-
|
|
4642
|
+
Example — Link an aditivo that changes the value and the end date:
|
|
4400
4643
|
|
|
4401
4644
|
```json
|
|
4402
4645
|
{
|
|
4403
|
-
"
|
|
4404
|
-
"
|
|
4405
|
-
"
|
|
4646
|
+
"parent_document_id": "example_id_30",
|
|
4647
|
+
"relation_type": "amendment",
|
|
4648
|
+
"value": 130000,
|
|
4649
|
+
"end_date": "2028-06-30"
|
|
4406
4650
|
}
|
|
4407
4651
|
```
|
|
4408
4652
|
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
`PUT /v1/accounts/{accountId}/fields/{fieldId}`
|
|
4412
|
-
|
|
4413
|
-
Update a field definition.
|
|
4414
|
-
|
|
4415
|
-
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4416
|
-
|
|
4417
|
-
#### Parameters
|
|
4418
|
-
|
|
4419
|
-
| Name | In | Type | Required | Description |
|
|
4420
|
-
|---|---|---|---|---|
|
|
4421
|
-
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4422
|
-
| `fieldId` | path | string | yes | The field ID. |
|
|
4423
|
-
|
|
4424
|
-
#### Request Body (required)
|
|
4425
|
-
|
|
4426
|
-
Fields (`application/json`):
|
|
4653
|
+
#### Responses
|
|
4427
4654
|
|
|
4428
|
-
|
|
4429
|
-
- `regex` (string | null)
|
|
4430
|
-
- `is_active` (boolean)
|
|
4655
|
+
##### 200 — The contract terms as saved, or the amendment as linked
|
|
4431
4656
|
|
|
4432
|
-
|
|
4657
|
+
**The contract terms**
|
|
4433
4658
|
|
|
4434
4659
|
```json
|
|
4435
4660
|
{
|
|
4436
|
-
"
|
|
4437
|
-
"
|
|
4438
|
-
"
|
|
4661
|
+
"status": 200,
|
|
4662
|
+
"message": "",
|
|
4663
|
+
"data": {
|
|
4664
|
+
"resource": "document_contract",
|
|
4665
|
+
"document_id": "example_id_30",
|
|
4666
|
+
"status": "active",
|
|
4667
|
+
"counterparty_name": "Acme Ltda",
|
|
4668
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4669
|
+
"value": 120000.5,
|
|
4670
|
+
"currency": "BRL",
|
|
4671
|
+
"start_date": "2026-11-01",
|
|
4672
|
+
"end_date": "2027-10-31",
|
|
4673
|
+
"auto_renew": true,
|
|
4674
|
+
"renewal_term_months": 12,
|
|
4675
|
+
"notice_period_days": 30,
|
|
4676
|
+
"term": 1,
|
|
4677
|
+
"owner_id": "example_id_31",
|
|
4678
|
+
"metadata": {
|
|
4679
|
+
"crm_stage": "won"
|
|
4680
|
+
},
|
|
4681
|
+
"external_references": [
|
|
4682
|
+
{
|
|
4683
|
+
"system": "hubspot",
|
|
4684
|
+
"id": "example_id_32"
|
|
4685
|
+
}
|
|
4686
|
+
],
|
|
4687
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
4688
|
+
"updated_at": "2026-10-23T12:00:00Z"
|
|
4689
|
+
}
|
|
4439
4690
|
}
|
|
4440
4691
|
```
|
|
4441
4692
|
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
##### 200 — The updated field
|
|
4693
|
+
**The amendment, waiting for its signature**
|
|
4445
4694
|
|
|
4446
4695
|
```json
|
|
4447
4696
|
{
|
|
4697
|
+
"status": 200,
|
|
4698
|
+
"message": "",
|
|
4448
4699
|
"data": {
|
|
4449
|
-
"resource": "
|
|
4450
|
-
"
|
|
4700
|
+
"resource": "document_contract_amendment",
|
|
4701
|
+
"document_id": "example_id_33",
|
|
4702
|
+
"document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
|
|
4703
|
+
"parent_document_id": "example_id_30",
|
|
4704
|
+
"relation_type": "amendment",
|
|
4705
|
+
"number": null,
|
|
4706
|
+
"status": "pending",
|
|
4707
|
+
"document_status": "pending_signature",
|
|
4708
|
+
"apply_error": null,
|
|
4709
|
+
"currency": "BRL",
|
|
4710
|
+
"terms": {
|
|
4711
|
+
"value": 130000,
|
|
4712
|
+
"end_date": "2028-06-30"
|
|
4713
|
+
},
|
|
4714
|
+
"changes": {
|
|
4715
|
+
"value": {
|
|
4716
|
+
"from": 120000.5,
|
|
4717
|
+
"to": 130000
|
|
4718
|
+
},
|
|
4719
|
+
"end_date": {
|
|
4720
|
+
"from": "2027-10-31",
|
|
4721
|
+
"to": "2028-06-30"
|
|
4722
|
+
},
|
|
4723
|
+
"term": {
|
|
4724
|
+
"from": 1,
|
|
4725
|
+
"to": 2
|
|
4726
|
+
}
|
|
4727
|
+
},
|
|
4728
|
+
"applied_at": null,
|
|
4729
|
+
"created_at": "2027-05-10T15:00:00Z",
|
|
4730
|
+
"updated_at": "2027-05-10T15:00:00Z"
|
|
4731
|
+
}
|
|
4732
|
+
}
|
|
4733
|
+
```
|
|
4734
|
+
|
|
4735
|
+
**The amendment, applied to the parent**
|
|
4736
|
+
|
|
4737
|
+
```json
|
|
4738
|
+
{
|
|
4739
|
+
"status": 200,
|
|
4740
|
+
"message": "",
|
|
4741
|
+
"data": {
|
|
4742
|
+
"resource": "document_contract_amendment",
|
|
4743
|
+
"document_id": "example_id_33",
|
|
4744
|
+
"document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
|
|
4745
|
+
"parent_document_id": "example_id_30",
|
|
4746
|
+
"relation_type": "amendment",
|
|
4747
|
+
"number": 1,
|
|
4748
|
+
"status": "applied",
|
|
4749
|
+
"document_status": "certificated",
|
|
4750
|
+
"apply_error": null,
|
|
4751
|
+
"currency": "BRL",
|
|
4752
|
+
"terms": {
|
|
4753
|
+
"value": 130000,
|
|
4754
|
+
"end_date": "2028-06-30"
|
|
4755
|
+
},
|
|
4756
|
+
"changes": {
|
|
4757
|
+
"value": {
|
|
4758
|
+
"from": 120000.5,
|
|
4759
|
+
"to": 130000
|
|
4760
|
+
},
|
|
4761
|
+
"end_date": {
|
|
4762
|
+
"from": "2027-10-31",
|
|
4763
|
+
"to": "2028-06-30"
|
|
4764
|
+
},
|
|
4765
|
+
"term": {
|
|
4766
|
+
"from": 1,
|
|
4767
|
+
"to": 2
|
|
4768
|
+
}
|
|
4769
|
+
},
|
|
4770
|
+
"applied_at": "2027-05-12T18:20:00Z",
|
|
4771
|
+
"created_at": "2027-05-10T15:00:00Z",
|
|
4772
|
+
"updated_at": "2027-05-12T18:20:00Z"
|
|
4773
|
+
}
|
|
4774
|
+
}
|
|
4775
|
+
```
|
|
4776
|
+
|
|
4777
|
+
##### 400 — The request breaks a contract rule. `errors` has one entry per problem found: the `field` as sent (`null` when the request as a whole is refused), a stable `code` to translate, and the `message` in the platform's language; `message` at the top is the first entry's. The contract's own rules on the terms, and the external references' items, report every field that breaks one, an entry per field (its first problem); the other checks (the body, its fields, the contract's state, a renewal's or a link's conditions) stop at the first problem they find. | Code | Field | Refused when | |------|-------|--------------| | `InvalidBody` | — | The body is not a JSON object (a list, a bare value), or a `PUT` of contract terms sends no attribute. | | `UnknownField` | the attribute | The endpoint does not take the attribute; one entry per attribute. | | `NotSingleValue` | the attribute | On a `PUT` of contract terms, a list sent for a term that takes one value (every term but `metadata` and `external_references`). On a link, the same list answers the term's own code. | | `Required` | `parent_document_id`, `relation_type`, `external_references[i].system`, `external_references[i].id` | A first link without `parent_document_id` (a pending link that was removed meanwhile) or `relation_type`; an `external_references` item without `system` or `id` (`i` is its place in the list sent, from 0). | | `Invalid` | the field | The value is not of the field's type or form: `status` not one of the four; `currency` not three letters; `auto_renew` not a boolean; `owner_id` not a user id; `value` not a number; `counterparty_name` holding HTML; `metadata` not an object; `external_references` not a list, an item's `system` (`external_references[i].system`) with characters other than letters, digits, `_`, `-` and `.`, or its `id` (`external_references[i].id`) with an emoji or another 4-byte character; `parent_document_id` not text; `relation_type` not `amendment`, `renewal` or `termination`; `term` not a whole number from 1; `reason` not text. On the list: a filter sent as a list, a `status` not one of the four, `ending_within_days` not a whole number. | | `TooSmall`, `TooBig` | the field | `value` below 0 or above 9999999999999.99; `renewal_term_months` outside 1 to 600; `notice_period_days` (and the list's `ending_within_days`) outside 0 to 3650. | | `TooLong` | the field | `counterparty_name` over 255 characters, counting each emoji as stored (several characters); `counterparty_taxpayer_id` over 20; `reason` over 500; `external_references[i].system` over 64 or `external_references[i].id` over 255. | | `TooMany` | `external_references` | More than 20 items. | | `TooManyDecimals` | `value` | More than two decimal places. | | `InvalidDate` | `start_date`, `end_date`, `updated_at`; the list's `end_date_from`, `end_date_to` | Not a date as `YYYY-MM-DD` (an impossible one such as `2026-02-30` included); `updated_at` not a date and time as the API writes it (`2026-10-23T12:00:00Z`, or with an offset). | | `DateTooEarly` | `start_date`, `end_date` | Before the year 1000. | | `DateTooLate` | `end_date` | A renewal by the term would pass 9999-12-31. | | `EndBeforeStart` | `end_date` | Before `start_date`. | | `InvalidTaxpayerId` | `counterparty_taxpayer_id` | Not a valid CPF or CNPJ (formatted or not). | | `NotAMember` | `owner_id` | Not an active member of the workspace. | | `TooManyKeys` | `metadata` | More than 50 keys. | | `InvalidKey` | `metadata` | A key that is not 1 to 40 letters, digits, `_`, `-` or `.`. | | `InvalidValue` | `metadata` | A value that is not plain text of at most 500 characters. | | `NumberUnderDateKey` | `metadata` | A number under a key ending in `_at`, or `stuck_since`, which the API would return as a date. | | `ListKeys` | `metadata` | Keys `0`, `1`, `2`…, which would read back as a list. | | `DuplicateReference` | `external_references` | Two items the database takes for one (accents, `ß` and `ss`); items equal case aside are merged, not refused. | | `StatusNotSettable` | `status` | A tracked contract sent `expired` or `terminated`, or a closed one sent `draft` or `active`: a contract is closed by terminating it and reopened by renewing it. | | `CannotReturnToDraft` | `status` | An `active` contract sent `draft`. | | `ExpiredNeedsPastEndDate` | `end_date` | New terms with status `expired` and no `end_date` before today. | | `TerminatedNeedsEndDate` | `end_date` | New terms with status `terminated` and no `end_date`. | | `UnsignableDocument` | — | New terms, or a first link, on a cancelled, declined or expired document. Terms or a link already on one stay editable. | | `DocumentIsAmendment` | — | Terms of its own for a document linked as an amendment: its terms are the changes it makes. | | `DocumentHasOwnTerms` | — | A link for a document that tracks a contract of its own: a document is a contract or an amendment, never both. | | `ParentHasNoTerms` | `parent_document_id` | The parent named has no contract terms, nor amends a contract that has. | | `ParentTerminated` | `parent_document_id` | The parent contract is terminated. | | `NoTermChanged` | — | An `amendment` that changes no term, also by dropping its last one. A `renewal` or `termination` may change none. | | `TermNotAllowed` | the term | A term the relation type cannot change: a `renewal` changes only `end_date` and `value`, a `termination` only `end_date`. | | `AmendmentApplied` | — | The amendment applied when its document was signed and can no longer change. | | `TermOrEndDateRequired` | — | A renewal sends neither `term` nor `end_date`. | | `TermMismatch` | `term` | Not the contract's current term: the renewal already happened. | | `ContractTerminated` | — | A renewal of a terminated contract. | | `EndDateRequired` | `end_date` | A renewal by the term, or a `renewal` link without `end_date`, of a contract without an end date. | | `EndDateNotAfterCurrent` | `end_date` | A renewal, or a `renewal` link, to a date not after the current end date. | | `AlreadyTerminated` | — | A termination of a contract already terminated. | A body that is not valid JSON is refused before it reaches these endpoints, with the platform's `400` and no `errors`. A link is also checked against what applying it today would give the parent, so a delta the contract would refuse comes back with the contract's own codes.
|
|
4778
|
+
|
|
4779
|
+
```json
|
|
4780
|
+
{
|
|
4781
|
+
"status": 400,
|
|
4782
|
+
"message": "value must be no less than 0.",
|
|
4783
|
+
"errors": [
|
|
4784
|
+
{
|
|
4785
|
+
"field": "value",
|
|
4786
|
+
"code": "TooSmall",
|
|
4787
|
+
"message": "value must be no less than 0."
|
|
4788
|
+
},
|
|
4789
|
+
{
|
|
4790
|
+
"field": "currency",
|
|
4791
|
+
"code": "Invalid",
|
|
4792
|
+
"message": "currency is invalid."
|
|
4793
|
+
}
|
|
4794
|
+
]
|
|
4795
|
+
}
|
|
4796
|
+
```
|
|
4797
|
+
|
|
4798
|
+
##### 403 — The workspace's plan does not include contract tracking.
|
|
4799
|
+
|
|
4800
|
+
```json
|
|
4801
|
+
{
|
|
4802
|
+
"status": 403,
|
|
4803
|
+
"message": "Contract tracking is not available for your current plan."
|
|
4804
|
+
}
|
|
4805
|
+
```
|
|
4806
|
+
|
|
4807
|
+
##### 409 — The write sent the `updated_at` it read the contract (or the amendment link) with, and the contract changed since: by another user, an integration or the hourly run. Nothing was written. Read it again, check the change still applies, and send it with the new `updated_at`.
|
|
4808
|
+
|
|
4809
|
+
```json
|
|
4810
|
+
{
|
|
4811
|
+
"status": 409,
|
|
4812
|
+
"message": "The contract changed after it was read; read it again and resend the change.",
|
|
4813
|
+
"code": "ContractChanged"
|
|
4814
|
+
}
|
|
4815
|
+
```
|
|
4816
|
+
|
|
4817
|
+
##### 404 — The document is not in the workspace, the `parent_document_id` names a document outside it, or `parent_document_id: null` is sent for a document that is not an amendment.
|
|
4818
|
+
|
|
4819
|
+
```json
|
|
4820
|
+
{
|
|
4821
|
+
"status": 404,
|
|
4822
|
+
"message": "Document not found."
|
|
4823
|
+
}
|
|
4824
|
+
```
|
|
4825
|
+
|
|
4826
|
+
##### 401 — Missing or invalid credentials.
|
|
4827
|
+
|
|
4828
|
+
```json
|
|
4829
|
+
{
|
|
4830
|
+
"status": 401,
|
|
4831
|
+
"message": "Bad request.",
|
|
4832
|
+
"data": null
|
|
4833
|
+
}
|
|
4834
|
+
```
|
|
4835
|
+
|
|
4836
|
+
##### 500 — Unexpected server error.
|
|
4837
|
+
|
|
4838
|
+
```json
|
|
4839
|
+
{
|
|
4840
|
+
"status": 500,
|
|
4841
|
+
"message": "Bad request.",
|
|
4842
|
+
"data": null
|
|
4843
|
+
}
|
|
4844
|
+
```
|
|
4845
|
+
|
|
4846
|
+
### List the contracts related to a document
|
|
4847
|
+
|
|
4848
|
+
`GET /v1/accounts/{accountId}/documents/{documentId}/contract/related`
|
|
4849
|
+
|
|
4850
|
+
The family the document belongs to, seen from its root: the contract terms with every amendment, renewal and termination document linked to them (`amendments`). Works from the contract document and from any of its amendments alike.
|
|
4851
|
+
|
|
4852
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4853
|
+
|
|
4854
|
+
#### Parameters
|
|
4855
|
+
|
|
4856
|
+
| Name | In | Type | Required | Description |
|
|
4857
|
+
|---|---|---|---|---|
|
|
4858
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4859
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
4860
|
+
|
|
4861
|
+
#### Responses
|
|
4862
|
+
|
|
4863
|
+
##### 200 — The root contract and its family
|
|
4864
|
+
|
|
4865
|
+
**The contract terms with their amendments**
|
|
4866
|
+
|
|
4867
|
+
```json
|
|
4868
|
+
{
|
|
4869
|
+
"status": 200,
|
|
4870
|
+
"message": "",
|
|
4871
|
+
"data": {
|
|
4872
|
+
"resource": "document_contract",
|
|
4873
|
+
"document_id": "example_id_30",
|
|
4874
|
+
"status": "active",
|
|
4875
|
+
"counterparty_name": "Acme Ltda",
|
|
4876
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
4877
|
+
"value": 130000,
|
|
4878
|
+
"currency": "BRL",
|
|
4879
|
+
"start_date": "2026-11-01",
|
|
4880
|
+
"end_date": "2028-06-30",
|
|
4881
|
+
"auto_renew": true,
|
|
4882
|
+
"renewal_term_months": 12,
|
|
4883
|
+
"notice_period_days": 30,
|
|
4884
|
+
"term": 2,
|
|
4885
|
+
"owner_id": "example_id_31",
|
|
4886
|
+
"metadata": {
|
|
4887
|
+
"crm_stage": "won"
|
|
4888
|
+
},
|
|
4889
|
+
"external_references": [
|
|
4890
|
+
{
|
|
4891
|
+
"system": "hubspot",
|
|
4892
|
+
"id": "example_id_32"
|
|
4893
|
+
}
|
|
4894
|
+
],
|
|
4895
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
4896
|
+
"updated_at": "2027-05-12T18:20:00Z",
|
|
4897
|
+
"amendments": [
|
|
4898
|
+
{
|
|
4899
|
+
"document_id": "example_id_33",
|
|
4900
|
+
"document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
|
|
4901
|
+
"parent_document_id": "example_id_30",
|
|
4902
|
+
"relation_type": "amendment",
|
|
4903
|
+
"number": 1,
|
|
4904
|
+
"status": "applied",
|
|
4905
|
+
"document_status": "certificated",
|
|
4906
|
+
"apply_error": null,
|
|
4907
|
+
"currency": "BRL",
|
|
4908
|
+
"terms": {
|
|
4909
|
+
"value": 130000,
|
|
4910
|
+
"end_date": "2028-06-30"
|
|
4911
|
+
},
|
|
4912
|
+
"changes": {
|
|
4913
|
+
"value": {
|
|
4914
|
+
"from": 120000.5,
|
|
4915
|
+
"to": 130000
|
|
4916
|
+
},
|
|
4917
|
+
"end_date": {
|
|
4918
|
+
"from": "2027-10-31",
|
|
4919
|
+
"to": "2028-06-30"
|
|
4920
|
+
},
|
|
4921
|
+
"term": {
|
|
4922
|
+
"from": 1,
|
|
4923
|
+
"to": 2
|
|
4924
|
+
}
|
|
4925
|
+
},
|
|
4926
|
+
"applied_at": "2027-05-12T18:20:00Z",
|
|
4927
|
+
"created_at": "2027-05-10T15:00:00Z",
|
|
4928
|
+
"updated_at": "2027-05-12T18:20:00Z"
|
|
4929
|
+
}
|
|
4930
|
+
]
|
|
4931
|
+
}
|
|
4932
|
+
}
|
|
4933
|
+
```
|
|
4934
|
+
|
|
4935
|
+
##### 404 — The document is not in the workspace (`Document not found.`), or carries no contract terms (on a read: neither its own nor those of a contract it amends whose document still exists). Only the second has a `code`, `NoContractTerms`, so a document without terms can be told from one that is not there.
|
|
4936
|
+
|
|
4937
|
+
```json
|
|
4938
|
+
{
|
|
4939
|
+
"status": 404,
|
|
4940
|
+
"message": "This document has no contract terms.",
|
|
4941
|
+
"code": "NoContractTerms"
|
|
4942
|
+
}
|
|
4943
|
+
```
|
|
4944
|
+
|
|
4945
|
+
##### 401 — Missing or invalid credentials.
|
|
4946
|
+
|
|
4947
|
+
```json
|
|
4948
|
+
{
|
|
4949
|
+
"status": 401,
|
|
4950
|
+
"message": "Bad request.",
|
|
4951
|
+
"data": null
|
|
4952
|
+
}
|
|
4953
|
+
```
|
|
4954
|
+
|
|
4955
|
+
##### 500 — Unexpected server error.
|
|
4956
|
+
|
|
4957
|
+
```json
|
|
4958
|
+
{
|
|
4959
|
+
"status": 500,
|
|
4960
|
+
"message": "Bad request.",
|
|
4961
|
+
"data": null
|
|
4962
|
+
}
|
|
4963
|
+
```
|
|
4964
|
+
|
|
4965
|
+
### Renew a contract
|
|
4966
|
+
|
|
4967
|
+
`POST /v1/accounts/{accountId}/documents/{documentId}/contract/renew`
|
|
4968
|
+
|
|
4969
|
+
Starts the contract's next term: `end_date` moves by `renewal_term_months` (12 when unset), or to the `end_date` sent, which must be after the current one. A `value` sent replaces the current one. Reopens an expired contract; a terminated one returns `400`. Steps `term`, so the lifecycle alerts run again for the new term. Records a `document_contract_renewed` event. Needs a plan with contract tracking (`403` otherwise). The body names the `term` the renewal starts from (the contract's current one) or the `end_date` it renews to, so a renewal answered with a `5xx` error, or whose answer was lost, is safe to send again: the repeat is refused with `400`, as the contract is then in its next term and that date is no longer after the current one (or with `409`, when it sends the `updated_at` it read).
|
|
4970
|
+
|
|
4971
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4972
|
+
|
|
4973
|
+
#### Parameters
|
|
4974
|
+
|
|
4975
|
+
| Name | In | Type | Required | Description |
|
|
4976
|
+
|---|---|---|---|---|
|
|
4977
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
4978
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
4979
|
+
|
|
4980
|
+
#### Request Body
|
|
4981
|
+
|
|
4982
|
+
Fields (`application/json`):
|
|
4983
|
+
|
|
4984
|
+
- `end_date` (string | null) — The new end date, after the current one. Absent, empty or `null`: the current end date plus the renewal term, stepped until it is in the future; `term` is then required.
|
|
4985
|
+
- `value` (number | null) — The new value; unchanged when not sent, cleared by `null`.
|
|
4986
|
+
- `term` (integer) — The term this renewal starts from, the contract's current `term`. Required unless `end_date` is sent; for a contract in another term the renewal is refused, so a repeated request never renews twice.
|
|
4987
|
+
- `updated_at` (string) — Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing renewed.
|
|
4988
|
+
|
|
4989
|
+
Example — Renew from term 1 by the renewal term, with a new value: safe to repeat:
|
|
4990
|
+
|
|
4991
|
+
```json
|
|
4992
|
+
{
|
|
4993
|
+
"term": 1,
|
|
4994
|
+
"value": 126000
|
|
4995
|
+
}
|
|
4996
|
+
```
|
|
4997
|
+
|
|
4998
|
+
Example — Renew to a date with a new value:
|
|
4999
|
+
|
|
5000
|
+
```json
|
|
5001
|
+
{
|
|
5002
|
+
"end_date": "2029-06-30",
|
|
5003
|
+
"value": 130000
|
|
5004
|
+
}
|
|
5005
|
+
```
|
|
5006
|
+
|
|
5007
|
+
#### Responses
|
|
5008
|
+
|
|
5009
|
+
##### 200 — The renewed contract
|
|
5010
|
+
|
|
5011
|
+
**The renewed contract**
|
|
5012
|
+
|
|
5013
|
+
```json
|
|
5014
|
+
{
|
|
5015
|
+
"status": 200,
|
|
5016
|
+
"message": "",
|
|
5017
|
+
"data": {
|
|
5018
|
+
"resource": "document_contract",
|
|
5019
|
+
"document_id": "example_id_30",
|
|
5020
|
+
"status": "active",
|
|
5021
|
+
"counterparty_name": "Acme Ltda",
|
|
5022
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
5023
|
+
"value": 130000,
|
|
5024
|
+
"currency": "BRL",
|
|
5025
|
+
"start_date": "2026-11-01",
|
|
5026
|
+
"end_date": "2029-06-30",
|
|
5027
|
+
"auto_renew": true,
|
|
5028
|
+
"renewal_term_months": 12,
|
|
5029
|
+
"notice_period_days": 30,
|
|
5030
|
+
"term": 2,
|
|
5031
|
+
"owner_id": "example_id_31",
|
|
5032
|
+
"metadata": {
|
|
5033
|
+
"crm_stage": "won"
|
|
5034
|
+
},
|
|
5035
|
+
"external_references": [
|
|
5036
|
+
{
|
|
5037
|
+
"system": "hubspot",
|
|
5038
|
+
"id": "example_id_32"
|
|
5039
|
+
}
|
|
5040
|
+
],
|
|
5041
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
5042
|
+
"updated_at": "2027-10-15T09:30:00Z"
|
|
5043
|
+
}
|
|
5044
|
+
}
|
|
5045
|
+
```
|
|
5046
|
+
|
|
5047
|
+
##### 400 — The request breaks a contract rule. `errors` has one entry per problem found: the `field` as sent (`null` when the request as a whole is refused), a stable `code` to translate, and the `message` in the platform's language; `message` at the top is the first entry's. The contract's own rules on the terms, and the external references' items, report every field that breaks one, an entry per field (its first problem); the other checks (the body, its fields, the contract's state, a renewal's or a link's conditions) stop at the first problem they find. | Code | Field | Refused when | |------|-------|--------------| | `InvalidBody` | — | The body is not a JSON object (a list, a bare value), or a `PUT` of contract terms sends no attribute. | | `UnknownField` | the attribute | The endpoint does not take the attribute; one entry per attribute. | | `NotSingleValue` | the attribute | On a `PUT` of contract terms, a list sent for a term that takes one value (every term but `metadata` and `external_references`). On a link, the same list answers the term's own code. | | `Required` | `parent_document_id`, `relation_type`, `external_references[i].system`, `external_references[i].id` | A first link without `parent_document_id` (a pending link that was removed meanwhile) or `relation_type`; an `external_references` item without `system` or `id` (`i` is its place in the list sent, from 0). | | `Invalid` | the field | The value is not of the field's type or form: `status` not one of the four; `currency` not three letters; `auto_renew` not a boolean; `owner_id` not a user id; `value` not a number; `counterparty_name` holding HTML; `metadata` not an object; `external_references` not a list, an item's `system` (`external_references[i].system`) with characters other than letters, digits, `_`, `-` and `.`, or its `id` (`external_references[i].id`) with an emoji or another 4-byte character; `parent_document_id` not text; `relation_type` not `amendment`, `renewal` or `termination`; `term` not a whole number from 1; `reason` not text. On the list: a filter sent as a list, a `status` not one of the four, `ending_within_days` not a whole number. | | `TooSmall`, `TooBig` | the field | `value` below 0 or above 9999999999999.99; `renewal_term_months` outside 1 to 600; `notice_period_days` (and the list's `ending_within_days`) outside 0 to 3650. | | `TooLong` | the field | `counterparty_name` over 255 characters, counting each emoji as stored (several characters); `counterparty_taxpayer_id` over 20; `reason` over 500; `external_references[i].system` over 64 or `external_references[i].id` over 255. | | `TooMany` | `external_references` | More than 20 items. | | `TooManyDecimals` | `value` | More than two decimal places. | | `InvalidDate` | `start_date`, `end_date`, `updated_at`; the list's `end_date_from`, `end_date_to` | Not a date as `YYYY-MM-DD` (an impossible one such as `2026-02-30` included); `updated_at` not a date and time as the API writes it (`2026-10-23T12:00:00Z`, or with an offset). | | `DateTooEarly` | `start_date`, `end_date` | Before the year 1000. | | `DateTooLate` | `end_date` | A renewal by the term would pass 9999-12-31. | | `EndBeforeStart` | `end_date` | Before `start_date`. | | `InvalidTaxpayerId` | `counterparty_taxpayer_id` | Not a valid CPF or CNPJ (formatted or not). | | `NotAMember` | `owner_id` | Not an active member of the workspace. | | `TooManyKeys` | `metadata` | More than 50 keys. | | `InvalidKey` | `metadata` | A key that is not 1 to 40 letters, digits, `_`, `-` or `.`. | | `InvalidValue` | `metadata` | A value that is not plain text of at most 500 characters. | | `NumberUnderDateKey` | `metadata` | A number under a key ending in `_at`, or `stuck_since`, which the API would return as a date. | | `ListKeys` | `metadata` | Keys `0`, `1`, `2`…, which would read back as a list. | | `DuplicateReference` | `external_references` | Two items the database takes for one (accents, `ß` and `ss`); items equal case aside are merged, not refused. | | `StatusNotSettable` | `status` | A tracked contract sent `expired` or `terminated`, or a closed one sent `draft` or `active`: a contract is closed by terminating it and reopened by renewing it. | | `CannotReturnToDraft` | `status` | An `active` contract sent `draft`. | | `ExpiredNeedsPastEndDate` | `end_date` | New terms with status `expired` and no `end_date` before today. | | `TerminatedNeedsEndDate` | `end_date` | New terms with status `terminated` and no `end_date`. | | `UnsignableDocument` | — | New terms, or a first link, on a cancelled, declined or expired document. Terms or a link already on one stay editable. | | `DocumentIsAmendment` | — | Terms of its own for a document linked as an amendment: its terms are the changes it makes. | | `DocumentHasOwnTerms` | — | A link for a document that tracks a contract of its own: a document is a contract or an amendment, never both. | | `ParentHasNoTerms` | `parent_document_id` | The parent named has no contract terms, nor amends a contract that has. | | `ParentTerminated` | `parent_document_id` | The parent contract is terminated. | | `NoTermChanged` | — | An `amendment` that changes no term, also by dropping its last one. A `renewal` or `termination` may change none. | | `TermNotAllowed` | the term | A term the relation type cannot change: a `renewal` changes only `end_date` and `value`, a `termination` only `end_date`. | | `AmendmentApplied` | — | The amendment applied when its document was signed and can no longer change. | | `TermOrEndDateRequired` | — | A renewal sends neither `term` nor `end_date`. | | `TermMismatch` | `term` | Not the contract's current term: the renewal already happened. | | `ContractTerminated` | — | A renewal of a terminated contract. | | `EndDateRequired` | `end_date` | A renewal by the term, or a `renewal` link without `end_date`, of a contract without an end date. | | `EndDateNotAfterCurrent` | `end_date` | A renewal, or a `renewal` link, to a date not after the current end date. | | `AlreadyTerminated` | — | A termination of a contract already terminated. | A body that is not valid JSON is refused before it reaches these endpoints, with the platform's `400` and no `errors`. A link is also checked against what applying it today would give the parent, so a delta the contract would refuse comes back with the contract's own codes.
|
|
5048
|
+
|
|
5049
|
+
```json
|
|
5050
|
+
{
|
|
5051
|
+
"status": 400,
|
|
5052
|
+
"message": "value must be no less than 0.",
|
|
5053
|
+
"errors": [
|
|
5054
|
+
{
|
|
5055
|
+
"field": "value",
|
|
5056
|
+
"code": "TooSmall",
|
|
5057
|
+
"message": "value must be no less than 0."
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
"field": "currency",
|
|
5061
|
+
"code": "Invalid",
|
|
5062
|
+
"message": "currency is invalid."
|
|
5063
|
+
}
|
|
5064
|
+
]
|
|
5065
|
+
}
|
|
5066
|
+
```
|
|
5067
|
+
|
|
5068
|
+
##### 403 — The workspace's plan does not include contract tracking.
|
|
5069
|
+
|
|
5070
|
+
```json
|
|
5071
|
+
{
|
|
5072
|
+
"status": 403,
|
|
5073
|
+
"message": "Contract tracking is not available for your current plan."
|
|
5074
|
+
}
|
|
5075
|
+
```
|
|
5076
|
+
|
|
5077
|
+
##### 409 — The write sent the `updated_at` it read the contract (or the amendment link) with, and the contract changed since: by another user, an integration or the hourly run. Nothing was written. Read it again, check the change still applies, and send it with the new `updated_at`.
|
|
5078
|
+
|
|
5079
|
+
```json
|
|
5080
|
+
{
|
|
5081
|
+
"status": 409,
|
|
5082
|
+
"message": "The contract changed after it was read; read it again and resend the change.",
|
|
5083
|
+
"code": "ContractChanged"
|
|
5084
|
+
}
|
|
5085
|
+
```
|
|
5086
|
+
|
|
5087
|
+
##### 404 — The document is not in the workspace (`Document not found.`), or carries no contract terms (on a read: neither its own nor those of a contract it amends whose document still exists). Only the second has a `code`, `NoContractTerms`, so a document without terms can be told from one that is not there.
|
|
5088
|
+
|
|
5089
|
+
```json
|
|
5090
|
+
{
|
|
5091
|
+
"status": 404,
|
|
5092
|
+
"message": "This document has no contract terms.",
|
|
5093
|
+
"code": "NoContractTerms"
|
|
5094
|
+
}
|
|
5095
|
+
```
|
|
5096
|
+
|
|
5097
|
+
##### 401 — Missing or invalid credentials.
|
|
5098
|
+
|
|
5099
|
+
```json
|
|
5100
|
+
{
|
|
5101
|
+
"status": 401,
|
|
5102
|
+
"message": "Bad request.",
|
|
5103
|
+
"data": null
|
|
5104
|
+
}
|
|
5105
|
+
```
|
|
5106
|
+
|
|
5107
|
+
##### 500 — Unexpected server error.
|
|
5108
|
+
|
|
5109
|
+
```json
|
|
5110
|
+
{
|
|
5111
|
+
"status": 500,
|
|
5112
|
+
"message": "Bad request.",
|
|
5113
|
+
"data": null
|
|
5114
|
+
}
|
|
5115
|
+
```
|
|
5116
|
+
|
|
5117
|
+
### Terminate a contract
|
|
5118
|
+
|
|
5119
|
+
`POST /v1/accounts/{accountId}/documents/{documentId}/contract/terminate`
|
|
5120
|
+
|
|
5121
|
+
Closes the contract: its status becomes `terminated` and the lifecycle job stops alerting on it. Records a `document_contract_terminated` event carrying the `reason`. Needs a plan with contract tracking (`403` otherwise).
|
|
5122
|
+
|
|
5123
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
5124
|
+
|
|
5125
|
+
#### Parameters
|
|
5126
|
+
|
|
5127
|
+
| Name | In | Type | Required | Description |
|
|
5128
|
+
|---|---|---|---|---|
|
|
5129
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
5130
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
5131
|
+
|
|
5132
|
+
#### Request Body
|
|
5133
|
+
|
|
5134
|
+
Fields (`application/json`):
|
|
5135
|
+
|
|
5136
|
+
- `reason` (string | null) — Kept in the `document_contract_terminated` event; HTML is stripped.
|
|
5137
|
+
- `updated_at` (string) — Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing terminated.
|
|
5138
|
+
|
|
5139
|
+
Example — Terminate with a reason:
|
|
5140
|
+
|
|
5141
|
+
```json
|
|
5142
|
+
{
|
|
5143
|
+
"reason": "Fornecedor substituído"
|
|
5144
|
+
}
|
|
5145
|
+
```
|
|
5146
|
+
|
|
5147
|
+
#### Responses
|
|
5148
|
+
|
|
5149
|
+
##### 200 — The terminated contract
|
|
5150
|
+
|
|
5151
|
+
**The terminated contract**
|
|
5152
|
+
|
|
5153
|
+
```json
|
|
5154
|
+
{
|
|
5155
|
+
"status": 200,
|
|
5156
|
+
"message": "",
|
|
5157
|
+
"data": {
|
|
5158
|
+
"resource": "document_contract",
|
|
5159
|
+
"document_id": "example_id_30",
|
|
5160
|
+
"status": "terminated",
|
|
5161
|
+
"counterparty_name": "Acme Ltda",
|
|
5162
|
+
"counterparty_taxpayer_id": "00000000000",
|
|
5163
|
+
"value": 120000.5,
|
|
5164
|
+
"currency": "BRL",
|
|
5165
|
+
"start_date": "2026-11-01",
|
|
5166
|
+
"end_date": "2027-10-31",
|
|
5167
|
+
"auto_renew": true,
|
|
5168
|
+
"renewal_term_months": 12,
|
|
5169
|
+
"notice_period_days": 30,
|
|
5170
|
+
"term": 1,
|
|
5171
|
+
"owner_id": "example_id_31",
|
|
5172
|
+
"metadata": {
|
|
5173
|
+
"crm_stage": "won"
|
|
5174
|
+
},
|
|
5175
|
+
"external_references": [
|
|
5176
|
+
{
|
|
5177
|
+
"system": "hubspot",
|
|
5178
|
+
"id": "example_id_32"
|
|
5179
|
+
}
|
|
5180
|
+
],
|
|
5181
|
+
"created_at": "2026-10-23T12:00:00Z",
|
|
5182
|
+
"updated_at": "2027-03-02T14:00:00Z"
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
5185
|
+
```
|
|
5186
|
+
|
|
5187
|
+
##### 400 — The request breaks a contract rule. `errors` has one entry per problem found: the `field` as sent (`null` when the request as a whole is refused), a stable `code` to translate, and the `message` in the platform's language; `message` at the top is the first entry's. The contract's own rules on the terms, and the external references' items, report every field that breaks one, an entry per field (its first problem); the other checks (the body, its fields, the contract's state, a renewal's or a link's conditions) stop at the first problem they find. | Code | Field | Refused when | |------|-------|--------------| | `InvalidBody` | — | The body is not a JSON object (a list, a bare value), or a `PUT` of contract terms sends no attribute. | | `UnknownField` | the attribute | The endpoint does not take the attribute; one entry per attribute. | | `NotSingleValue` | the attribute | On a `PUT` of contract terms, a list sent for a term that takes one value (every term but `metadata` and `external_references`). On a link, the same list answers the term's own code. | | `Required` | `parent_document_id`, `relation_type`, `external_references[i].system`, `external_references[i].id` | A first link without `parent_document_id` (a pending link that was removed meanwhile) or `relation_type`; an `external_references` item without `system` or `id` (`i` is its place in the list sent, from 0). | | `Invalid` | the field | The value is not of the field's type or form: `status` not one of the four; `currency` not three letters; `auto_renew` not a boolean; `owner_id` not a user id; `value` not a number; `counterparty_name` holding HTML; `metadata` not an object; `external_references` not a list, an item's `system` (`external_references[i].system`) with characters other than letters, digits, `_`, `-` and `.`, or its `id` (`external_references[i].id`) with an emoji or another 4-byte character; `parent_document_id` not text; `relation_type` not `amendment`, `renewal` or `termination`; `term` not a whole number from 1; `reason` not text. On the list: a filter sent as a list, a `status` not one of the four, `ending_within_days` not a whole number. | | `TooSmall`, `TooBig` | the field | `value` below 0 or above 9999999999999.99; `renewal_term_months` outside 1 to 600; `notice_period_days` (and the list's `ending_within_days`) outside 0 to 3650. | | `TooLong` | the field | `counterparty_name` over 255 characters, counting each emoji as stored (several characters); `counterparty_taxpayer_id` over 20; `reason` over 500; `external_references[i].system` over 64 or `external_references[i].id` over 255. | | `TooMany` | `external_references` | More than 20 items. | | `TooManyDecimals` | `value` | More than two decimal places. | | `InvalidDate` | `start_date`, `end_date`, `updated_at`; the list's `end_date_from`, `end_date_to` | Not a date as `YYYY-MM-DD` (an impossible one such as `2026-02-30` included); `updated_at` not a date and time as the API writes it (`2026-10-23T12:00:00Z`, or with an offset). | | `DateTooEarly` | `start_date`, `end_date` | Before the year 1000. | | `DateTooLate` | `end_date` | A renewal by the term would pass 9999-12-31. | | `EndBeforeStart` | `end_date` | Before `start_date`. | | `InvalidTaxpayerId` | `counterparty_taxpayer_id` | Not a valid CPF or CNPJ (formatted or not). | | `NotAMember` | `owner_id` | Not an active member of the workspace. | | `TooManyKeys` | `metadata` | More than 50 keys. | | `InvalidKey` | `metadata` | A key that is not 1 to 40 letters, digits, `_`, `-` or `.`. | | `InvalidValue` | `metadata` | A value that is not plain text of at most 500 characters. | | `NumberUnderDateKey` | `metadata` | A number under a key ending in `_at`, or `stuck_since`, which the API would return as a date. | | `ListKeys` | `metadata` | Keys `0`, `1`, `2`…, which would read back as a list. | | `DuplicateReference` | `external_references` | Two items the database takes for one (accents, `ß` and `ss`); items equal case aside are merged, not refused. | | `StatusNotSettable` | `status` | A tracked contract sent `expired` or `terminated`, or a closed one sent `draft` or `active`: a contract is closed by terminating it and reopened by renewing it. | | `CannotReturnToDraft` | `status` | An `active` contract sent `draft`. | | `ExpiredNeedsPastEndDate` | `end_date` | New terms with status `expired` and no `end_date` before today. | | `TerminatedNeedsEndDate` | `end_date` | New terms with status `terminated` and no `end_date`. | | `UnsignableDocument` | — | New terms, or a first link, on a cancelled, declined or expired document. Terms or a link already on one stay editable. | | `DocumentIsAmendment` | — | Terms of its own for a document linked as an amendment: its terms are the changes it makes. | | `DocumentHasOwnTerms` | — | A link for a document that tracks a contract of its own: a document is a contract or an amendment, never both. | | `ParentHasNoTerms` | `parent_document_id` | The parent named has no contract terms, nor amends a contract that has. | | `ParentTerminated` | `parent_document_id` | The parent contract is terminated. | | `NoTermChanged` | — | An `amendment` that changes no term, also by dropping its last one. A `renewal` or `termination` may change none. | | `TermNotAllowed` | the term | A term the relation type cannot change: a `renewal` changes only `end_date` and `value`, a `termination` only `end_date`. | | `AmendmentApplied` | — | The amendment applied when its document was signed and can no longer change. | | `TermOrEndDateRequired` | — | A renewal sends neither `term` nor `end_date`. | | `TermMismatch` | `term` | Not the contract's current term: the renewal already happened. | | `ContractTerminated` | — | A renewal of a terminated contract. | | `EndDateRequired` | `end_date` | A renewal by the term, or a `renewal` link without `end_date`, of a contract without an end date. | | `EndDateNotAfterCurrent` | `end_date` | A renewal, or a `renewal` link, to a date not after the current end date. | | `AlreadyTerminated` | — | A termination of a contract already terminated. | A body that is not valid JSON is refused before it reaches these endpoints, with the platform's `400` and no `errors`. A link is also checked against what applying it today would give the parent, so a delta the contract would refuse comes back with the contract's own codes.
|
|
5188
|
+
|
|
5189
|
+
```json
|
|
5190
|
+
{
|
|
5191
|
+
"status": 400,
|
|
5192
|
+
"message": "value must be no less than 0.",
|
|
5193
|
+
"errors": [
|
|
5194
|
+
{
|
|
5195
|
+
"field": "value",
|
|
5196
|
+
"code": "TooSmall",
|
|
5197
|
+
"message": "value must be no less than 0."
|
|
5198
|
+
},
|
|
5199
|
+
{
|
|
5200
|
+
"field": "currency",
|
|
5201
|
+
"code": "Invalid",
|
|
5202
|
+
"message": "currency is invalid."
|
|
5203
|
+
}
|
|
5204
|
+
]
|
|
5205
|
+
}
|
|
5206
|
+
```
|
|
5207
|
+
|
|
5208
|
+
##### 403 — The workspace's plan does not include contract tracking.
|
|
5209
|
+
|
|
5210
|
+
```json
|
|
5211
|
+
{
|
|
5212
|
+
"status": 403,
|
|
5213
|
+
"message": "Contract tracking is not available for your current plan."
|
|
5214
|
+
}
|
|
5215
|
+
```
|
|
5216
|
+
|
|
5217
|
+
##### 409 — The write sent the `updated_at` it read the contract (or the amendment link) with, and the contract changed since: by another user, an integration or the hourly run. Nothing was written. Read it again, check the change still applies, and send it with the new `updated_at`.
|
|
5218
|
+
|
|
5219
|
+
```json
|
|
5220
|
+
{
|
|
5221
|
+
"status": 409,
|
|
5222
|
+
"message": "The contract changed after it was read; read it again and resend the change.",
|
|
5223
|
+
"code": "ContractChanged"
|
|
5224
|
+
}
|
|
5225
|
+
```
|
|
5226
|
+
|
|
5227
|
+
##### 404 — The document is not in the workspace (`Document not found.`), or carries no contract terms (on a read: neither its own nor those of a contract it amends whose document still exists). Only the second has a `code`, `NoContractTerms`, so a document without terms can be told from one that is not there.
|
|
5228
|
+
|
|
5229
|
+
```json
|
|
5230
|
+
{
|
|
5231
|
+
"status": 404,
|
|
5232
|
+
"message": "This document has no contract terms.",
|
|
5233
|
+
"code": "NoContractTerms"
|
|
5234
|
+
}
|
|
5235
|
+
```
|
|
5236
|
+
|
|
5237
|
+
##### 401 — Missing or invalid credentials.
|
|
5238
|
+
|
|
5239
|
+
```json
|
|
5240
|
+
{
|
|
5241
|
+
"status": 401,
|
|
5242
|
+
"message": "Bad request.",
|
|
5243
|
+
"data": null
|
|
5244
|
+
}
|
|
5245
|
+
```
|
|
5246
|
+
|
|
5247
|
+
##### 500 — Unexpected server error.
|
|
5248
|
+
|
|
5249
|
+
```json
|
|
5250
|
+
{
|
|
5251
|
+
"status": 500,
|
|
5252
|
+
"message": "Bad request.",
|
|
5253
|
+
"data": null
|
|
5254
|
+
}
|
|
5255
|
+
```
|
|
5256
|
+
|
|
5257
|
+
## Fields
|
|
5258
|
+
|
|
5259
|
+
### List fields
|
|
5260
|
+
|
|
5261
|
+
`GET /v1/accounts/{accountId}/fields`
|
|
5262
|
+
|
|
5263
|
+
List the field definitions of a workspace.
|
|
5264
|
+
|
|
5265
|
+
When `include_standard` is enabled, records of type `signature`, `initial` and `signatureDate` are also returned. Every workspace has one of each, created with it; they cannot be created, and a field can't be placed on the `Editor` role with them.
|
|
5266
|
+
|
|
5267
|
+
To find the fields a sender can place on a document or template, list with `include_standard=true`: the result is every active field definition, signature fields included, and each one's `id` is the `field_id` to place.
|
|
5268
|
+
|
|
5269
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
5270
|
+
|
|
5271
|
+
#### Parameters
|
|
5272
|
+
|
|
5273
|
+
| Name | In | Type | Required | Description |
|
|
5274
|
+
|---|---|---|---|---|
|
|
5275
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
5276
|
+
| `include_inactive` | query | boolean | no | Include inactive field definitions. |
|
|
5277
|
+
| `include_standard` | query | boolean | no | Include standard field types (signature, initial, signatureDate). |
|
|
5278
|
+
|
|
5279
|
+
#### Responses
|
|
5280
|
+
|
|
5281
|
+
##### 200 — Field definitions
|
|
5282
|
+
|
|
5283
|
+
```json
|
|
5284
|
+
{
|
|
5285
|
+
"data": [
|
|
5286
|
+
{
|
|
5287
|
+
"resource": "field",
|
|
5288
|
+
"id": "example_id_20",
|
|
5289
|
+
"name": "Signature",
|
|
5290
|
+
"type": "signature",
|
|
5291
|
+
"regex": null,
|
|
5292
|
+
"is_pre_defined": true,
|
|
5293
|
+
"is_active": true,
|
|
5294
|
+
"is_required": true,
|
|
5295
|
+
"is_standard": true,
|
|
5296
|
+
"is_read_only": true,
|
|
5297
|
+
"is_visible": true
|
|
5298
|
+
}
|
|
5299
|
+
],
|
|
5300
|
+
"status": 200,
|
|
5301
|
+
"message": ""
|
|
5302
|
+
}
|
|
5303
|
+
```
|
|
5304
|
+
|
|
5305
|
+
##### 401 — Missing or invalid credentials.
|
|
5306
|
+
|
|
5307
|
+
```json
|
|
5308
|
+
{
|
|
5309
|
+
"status": 401,
|
|
5310
|
+
"message": "Bad request.",
|
|
5311
|
+
"data": null
|
|
5312
|
+
}
|
|
5313
|
+
```
|
|
5314
|
+
|
|
5315
|
+
##### 500 — Unexpected server error.
|
|
5316
|
+
|
|
5317
|
+
```json
|
|
5318
|
+
{
|
|
5319
|
+
"status": 500,
|
|
5320
|
+
"message": "Bad request.",
|
|
5321
|
+
"data": null
|
|
5322
|
+
}
|
|
5323
|
+
```
|
|
5324
|
+
|
|
5325
|
+
### Create field
|
|
5326
|
+
|
|
5327
|
+
`POST /v1/accounts/{accountId}/fields`
|
|
5328
|
+
|
|
5329
|
+
Create a field definition in the workspace.
|
|
5330
|
+
|
|
5331
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
5332
|
+
|
|
5333
|
+
#### Parameters
|
|
5334
|
+
|
|
5335
|
+
| Name | In | Type | Required | Description |
|
|
5336
|
+
|---|---|---|---|---|
|
|
5337
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
5338
|
+
|
|
5339
|
+
#### Request Body (required)
|
|
5340
|
+
|
|
5341
|
+
Fields (`application/json`):
|
|
5342
|
+
|
|
5343
|
+
- `name` (string, required)
|
|
5344
|
+
- `type` (string, required)
|
|
5345
|
+
- `regex` (string | null)
|
|
5346
|
+
- `is_required` (boolean)
|
|
5347
|
+
|
|
5348
|
+
Example:
|
|
5349
|
+
|
|
5350
|
+
```json
|
|
5351
|
+
{
|
|
5352
|
+
"name": "Full name",
|
|
5353
|
+
"type": "text",
|
|
5354
|
+
"regex": null,
|
|
5355
|
+
"is_required": true
|
|
5356
|
+
}
|
|
5357
|
+
```
|
|
5358
|
+
|
|
5359
|
+
#### Responses
|
|
5360
|
+
|
|
5361
|
+
##### 200 — The created field
|
|
5362
|
+
|
|
5363
|
+
```json
|
|
5364
|
+
{
|
|
5365
|
+
"data": {
|
|
5366
|
+
"resource": "field",
|
|
5367
|
+
"id": "example_id_20",
|
|
5368
|
+
"name": "Signature",
|
|
5369
|
+
"type": "signature",
|
|
5370
|
+
"regex": null,
|
|
5371
|
+
"is_pre_defined": true,
|
|
5372
|
+
"is_active": true,
|
|
5373
|
+
"is_required": true,
|
|
5374
|
+
"is_standard": true,
|
|
5375
|
+
"is_read_only": true,
|
|
5376
|
+
"is_visible": true
|
|
5377
|
+
},
|
|
5378
|
+
"status": 200,
|
|
5379
|
+
"message": ""
|
|
5380
|
+
}
|
|
5381
|
+
```
|
|
5382
|
+
|
|
5383
|
+
##### 400 — One or more fields failed validation.
|
|
5384
|
+
|
|
5385
|
+
```json
|
|
5386
|
+
{
|
|
5387
|
+
"status": 400,
|
|
5388
|
+
"message": "Bad request.",
|
|
5389
|
+
"data": null
|
|
5390
|
+
}
|
|
5391
|
+
```
|
|
5392
|
+
|
|
5393
|
+
##### 401 — Missing or invalid credentials.
|
|
5394
|
+
|
|
5395
|
+
```json
|
|
5396
|
+
{
|
|
5397
|
+
"status": 401,
|
|
5398
|
+
"message": "Bad request.",
|
|
5399
|
+
"data": null
|
|
5400
|
+
}
|
|
5401
|
+
```
|
|
5402
|
+
|
|
5403
|
+
##### 500 — Unexpected server error.
|
|
5404
|
+
|
|
5405
|
+
```json
|
|
5406
|
+
{
|
|
5407
|
+
"status": 500,
|
|
5408
|
+
"message": "Bad request.",
|
|
5409
|
+
"data": null
|
|
5410
|
+
}
|
|
5411
|
+
```
|
|
5412
|
+
|
|
5413
|
+
### Get field
|
|
5414
|
+
|
|
5415
|
+
`GET /v1/accounts/{accountId}/fields/{fieldId}`
|
|
5416
|
+
|
|
5417
|
+
Retrieve a single field definition.
|
|
5418
|
+
|
|
5419
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
5420
|
+
|
|
5421
|
+
#### Parameters
|
|
5422
|
+
|
|
5423
|
+
| Name | In | Type | Required | Description |
|
|
5424
|
+
|---|---|---|---|---|
|
|
5425
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
5426
|
+
| `fieldId` | path | string | yes | The field ID. |
|
|
5427
|
+
|
|
5428
|
+
#### Responses
|
|
5429
|
+
|
|
5430
|
+
##### 200 — The field
|
|
5431
|
+
|
|
5432
|
+
```json
|
|
5433
|
+
{
|
|
5434
|
+
"data": {
|
|
5435
|
+
"resource": "field",
|
|
5436
|
+
"id": "example_id_20",
|
|
5437
|
+
"name": "Signature",
|
|
5438
|
+
"type": "signature",
|
|
5439
|
+
"regex": null,
|
|
5440
|
+
"is_pre_defined": true,
|
|
5441
|
+
"is_active": true,
|
|
5442
|
+
"is_required": true,
|
|
5443
|
+
"is_standard": true,
|
|
5444
|
+
"is_read_only": true,
|
|
5445
|
+
"is_visible": true
|
|
5446
|
+
},
|
|
5447
|
+
"status": 200,
|
|
5448
|
+
"message": ""
|
|
5449
|
+
}
|
|
5450
|
+
```
|
|
5451
|
+
|
|
5452
|
+
##### 404 — The requested resource does not exist.
|
|
5453
|
+
|
|
5454
|
+
```json
|
|
5455
|
+
{
|
|
5456
|
+
"status": 404,
|
|
5457
|
+
"message": "Bad request.",
|
|
5458
|
+
"data": null
|
|
5459
|
+
}
|
|
5460
|
+
```
|
|
5461
|
+
|
|
5462
|
+
##### 401 — Missing or invalid credentials.
|
|
5463
|
+
|
|
5464
|
+
```json
|
|
5465
|
+
{
|
|
5466
|
+
"status": 401,
|
|
5467
|
+
"message": "Bad request.",
|
|
5468
|
+
"data": null
|
|
5469
|
+
}
|
|
5470
|
+
```
|
|
5471
|
+
|
|
5472
|
+
##### 500 — Unexpected server error.
|
|
5473
|
+
|
|
5474
|
+
```json
|
|
5475
|
+
{
|
|
5476
|
+
"status": 500,
|
|
5477
|
+
"message": "Bad request.",
|
|
5478
|
+
"data": null
|
|
5479
|
+
}
|
|
5480
|
+
```
|
|
5481
|
+
|
|
5482
|
+
### Update field
|
|
5483
|
+
|
|
5484
|
+
`PUT /v1/accounts/{accountId}/fields/{fieldId}`
|
|
5485
|
+
|
|
5486
|
+
Update a field definition.
|
|
5487
|
+
|
|
5488
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
5489
|
+
|
|
5490
|
+
#### Parameters
|
|
5491
|
+
|
|
5492
|
+
| Name | In | Type | Required | Description |
|
|
5493
|
+
|---|---|---|---|---|
|
|
5494
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
5495
|
+
| `fieldId` | path | string | yes | The field ID. |
|
|
5496
|
+
|
|
5497
|
+
#### Request Body (required)
|
|
5498
|
+
|
|
5499
|
+
Fields (`application/json`):
|
|
5500
|
+
|
|
5501
|
+
- `name` (string)
|
|
5502
|
+
- `regex` (string | null)
|
|
5503
|
+
- `is_active` (boolean)
|
|
5504
|
+
|
|
5505
|
+
Example:
|
|
5506
|
+
|
|
5507
|
+
```json
|
|
5508
|
+
{
|
|
5509
|
+
"name": "string",
|
|
5510
|
+
"regex": null,
|
|
5511
|
+
"is_active": true
|
|
5512
|
+
}
|
|
5513
|
+
```
|
|
5514
|
+
|
|
5515
|
+
#### Responses
|
|
5516
|
+
|
|
5517
|
+
##### 200 — The updated field
|
|
5518
|
+
|
|
5519
|
+
```json
|
|
5520
|
+
{
|
|
5521
|
+
"data": {
|
|
5522
|
+
"resource": "field",
|
|
5523
|
+
"id": "example_id_20",
|
|
4451
5524
|
"name": "Signature",
|
|
4452
5525
|
"type": "signature",
|
|
4453
5526
|
"regex": null,
|
|
@@ -4636,7 +5709,7 @@ Example:
|
|
|
4636
5709
|
```json
|
|
4637
5710
|
[
|
|
4638
5711
|
{
|
|
4639
|
-
"field_id": "
|
|
5712
|
+
"field_id": "example_id_35",
|
|
4640
5713
|
"value": "1111111111111"
|
|
4641
5714
|
}
|
|
4642
5715
|
]
|
|
@@ -4650,7 +5723,7 @@ Example:
|
|
|
4650
5723
|
{
|
|
4651
5724
|
"data": [
|
|
4652
5725
|
{
|
|
4653
|
-
"field_id": "
|
|
5726
|
+
"field_id": "example_id_35",
|
|
4654
5727
|
"type": "cpf",
|
|
4655
5728
|
"success": false,
|
|
4656
5729
|
"error_message": "Invalid CPF."
|
|
@@ -4685,7 +5758,7 @@ Example:
|
|
|
4685
5758
|
|
|
4686
5759
|
`GET /v1/field-types`
|
|
4687
5760
|
|
|
4688
|
-
List the
|
|
5761
|
+
List the types a workspace can create field definitions with (`POST /v1/accounts/{accountId}/fields`). The built-in `signature`, `initial` and `signatureDate` types are not listed: they can't be created, and their definitions come from `GET /v1/accounts/{accountId}/fields?include_standard=true`. `cpf` expects 11 digits; `cnpj` accepts 14-char values (letters A-Z allowed in positions 1–12 per the CNPJ Alfanumérico rule; check digits 13–14 stay numeric). Punctuation is ignored during validation.
|
|
4689
5762
|
|
|
4690
5763
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4691
5764
|
|
|
@@ -4732,7 +5805,7 @@ List the possible field types. `cpf` expects 11 digits; `cnpj` accepts 14-char v
|
|
|
4732
5805
|
|
|
4733
5806
|
`GET /v1/users/self/notification-preferences`
|
|
4734
5807
|
|
|
4735
|
-
Which owner-facing document notifications the authenticated user receives by e-mail. All
|
|
5808
|
+
Which owner-facing document notifications the authenticated user receives by e-mail. All thirteen keys are always returned; everything defaults to `true`. Account and security e-mail (welcome, password reset, invitations, account deletion) is not configurable and never appears here. Not available to third-party OAuth applications (`403`), whatever their scopes: these are the user's personal settings. Assinafy's own apps can reach it.
|
|
4736
5809
|
|
|
4737
5810
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4738
5811
|
|
|
@@ -4751,7 +5824,11 @@ Which owner-facing document notifications the authenticated user receives by e-m
|
|
|
4751
5824
|
"DocumentExpirationReset": true,
|
|
4752
5825
|
"DocumentProcessingFailed": true,
|
|
4753
5826
|
"TemplateProcessingFailed": true,
|
|
4754
|
-
"SignerWhatsappFailed": true
|
|
5827
|
+
"SignerWhatsappFailed": true,
|
|
5828
|
+
"ContractRenewalNotice": true,
|
|
5829
|
+
"ContractExpiring": true,
|
|
5830
|
+
"ContractExpired": true,
|
|
5831
|
+
"ContractRenewed": true
|
|
4755
5832
|
},
|
|
4756
5833
|
"status": 200,
|
|
4757
5834
|
"message": ""
|
|
@@ -4782,7 +5859,7 @@ Which owner-facing document notifications the authenticated user receives by e-m
|
|
|
4782
5859
|
|
|
4783
5860
|
`PUT /v1/users/self/notification-preferences`
|
|
4784
5861
|
|
|
4785
|
-
Merges the supplied map into the authenticated user's preferences. Send only the keys you want to change — omitted keys keep their current value. Setting a key to `false` stops that e-mail for this user in every account they belong to. Returns the full map. An unknown code, a non-boolean value, or an empty body is rejected with 400 and nothing is written.
|
|
5862
|
+
Merges the supplied map into the authenticated user's preferences. Send only the keys you want to change — omitted keys keep their current value. Setting a key to `false` stops that e-mail for this user in every account they belong to. Returns the full map. An unknown code, a non-boolean value, or an empty body is rejected with 400 and nothing is written. Not available to third-party OAuth applications (`403`), whatever their scopes: these are the user's personal settings. Assinafy's own apps can reach it.
|
|
4786
5863
|
|
|
4787
5864
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4788
5865
|
|
|
@@ -4799,6 +5876,10 @@ Fields (`application/json`):
|
|
|
4799
5876
|
- `DocumentProcessingFailed` (boolean) — An uploaded document could not be processed.
|
|
4800
5877
|
- `TemplateProcessingFailed` (boolean) — A template could not be processed.
|
|
4801
5878
|
- `SignerWhatsappFailed` (boolean) — A WhatsApp notification to a signer could not be delivered.
|
|
5879
|
+
- `ContractRenewalNotice` (boolean) — A tracked contract entered its notice period: it is about to end or to renew.
|
|
5880
|
+
- `ContractExpiring` (boolean) — A tracked contract ends in 45 or in 30 days.
|
|
5881
|
+
- `ContractExpired` (boolean) — A tracked contract ended without renewal.
|
|
5882
|
+
- `ContractRenewed` (boolean) — A tracked contract was auto-renewed into its next term.
|
|
4802
5883
|
|
|
4803
5884
|
Example:
|
|
4804
5885
|
|
|
@@ -4812,7 +5893,11 @@ Example:
|
|
|
4812
5893
|
"DocumentExpirationReset": true,
|
|
4813
5894
|
"DocumentProcessingFailed": true,
|
|
4814
5895
|
"TemplateProcessingFailed": true,
|
|
4815
|
-
"SignerWhatsappFailed": true
|
|
5896
|
+
"SignerWhatsappFailed": true,
|
|
5897
|
+
"ContractRenewalNotice": true,
|
|
5898
|
+
"ContractExpiring": true,
|
|
5899
|
+
"ContractExpired": true,
|
|
5900
|
+
"ContractRenewed": true
|
|
4816
5901
|
}
|
|
4817
5902
|
```
|
|
4818
5903
|
|
|
@@ -4831,7 +5916,11 @@ Example:
|
|
|
4831
5916
|
"DocumentExpirationReset": true,
|
|
4832
5917
|
"DocumentProcessingFailed": true,
|
|
4833
5918
|
"TemplateProcessingFailed": true,
|
|
4834
|
-
"SignerWhatsappFailed": true
|
|
5919
|
+
"SignerWhatsappFailed": true,
|
|
5920
|
+
"ContractRenewalNotice": true,
|
|
5921
|
+
"ContractExpiring": true,
|
|
5922
|
+
"ContractExpired": true,
|
|
5923
|
+
"ContractRenewed": true
|
|
4835
5924
|
},
|
|
4836
5925
|
"status": 200,
|
|
4837
5926
|
"message": ""
|
|
@@ -4872,7 +5961,7 @@ Example:
|
|
|
4872
5961
|
|
|
4873
5962
|
`GET /v1/users/self/stats`
|
|
4874
5963
|
|
|
4875
|
-
The authenticated user's document-funnel KPIs summed across all accounts they currently belong to. `granularity=monthly` (default) returns the last 12 months, most recent first; `granularity=daily` with `month=YYYY-MM` returns that month's days. Series are zero-filled.
|
|
5964
|
+
The authenticated user's document-funnel KPIs summed across all accounts they currently belong to. `granularity=monthly` (default) returns the last 12 months, most recent first; `granularity=daily` with `month=YYYY-MM` returns that month's days. Series are zero-filled. Not available to OAuth access tokens (`403`): a token is bound to one workspace, so an OAuth app reads that workspace's figures from **Account document KPIs** instead.
|
|
4876
5965
|
|
|
4877
5966
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4878
5967
|
|
|
@@ -4946,7 +6035,7 @@ The authenticated user's document-funnel KPIs summed across all accounts they cu
|
|
|
4946
6035
|
|
|
4947
6036
|
`GET /v1/users/self`
|
|
4948
6037
|
|
|
4949
|
-
Returns the profile of the user owning the access token.
|
|
6038
|
+
Returns the profile of the user owning the access token. Not available to OAuth access tokens (`403`); an OAuth app reads the user's identity from `GET /v1/oauth/userinfo`.
|
|
4950
6039
|
|
|
4951
6040
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
4952
6041
|
|
|
@@ -4959,7 +6048,7 @@ Returns the profile of the user owning the access token.
|
|
|
4959
6048
|
"data": {
|
|
4960
6049
|
"id": "example_id_28",
|
|
4961
6050
|
"name": "John Smith",
|
|
4962
|
-
"email": "
|
|
6051
|
+
"email": "user9@example.com",
|
|
4963
6052
|
"telephone": "+5500000000000",
|
|
4964
6053
|
"government_id": "00000000000",
|
|
4965
6054
|
"is_email_verified": false,
|
|
@@ -5039,7 +6128,7 @@ Example:
|
|
|
5039
6128
|
{
|
|
5040
6129
|
"grant_type": "authorization_code",
|
|
5041
6130
|
"code": "string",
|
|
5042
|
-
"redirect_uri": "https://example.com/example-url-
|
|
6131
|
+
"redirect_uri": "https://example.com/example-url-15",
|
|
5043
6132
|
"code_verifier": "string",
|
|
5044
6133
|
"refresh_token": "example_secret",
|
|
5045
6134
|
"client_id": "example_id_5",
|
|
@@ -5277,6 +6366,8 @@ Retrieve a publicly shared document by ID. Public endpoint.
|
|
|
5277
6366
|
},
|
|
5278
6367
|
"is_closed": false,
|
|
5279
6368
|
"signing_url": "https://example.com/example-url-3",
|
|
6369
|
+
"verification_code": "example_secret",
|
|
6370
|
+
"verification_url": "https://example.com/example-url-4",
|
|
5280
6371
|
"decline_reason": null,
|
|
5281
6372
|
"declined_by": null,
|
|
5282
6373
|
"tags": [
|
|
@@ -5292,9 +6383,10 @@ Retrieve a publicly shared document by ID. Public endpoint.
|
|
|
5292
6383
|
"number": 1,
|
|
5293
6384
|
"height": 2100,
|
|
5294
6385
|
"width": 1275,
|
|
5295
|
-
"download_url": "https://example.com/example-url-
|
|
6386
|
+
"download_url": "https://example.com/example-url-5"
|
|
5296
6387
|
}
|
|
5297
6388
|
],
|
|
6389
|
+
"has_contract": true,
|
|
5298
6390
|
"created_at": "2026-06-03T03:54:16Z",
|
|
5299
6391
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
5300
6392
|
},
|
|
@@ -5349,7 +6441,7 @@ Example:
|
|
|
5349
6441
|
```json
|
|
5350
6442
|
{
|
|
5351
6443
|
"channel": "email",
|
|
5352
|
-
"recipient": "
|
|
6444
|
+
"recipient": "user1@example.com"
|
|
5353
6445
|
}
|
|
5354
6446
|
```
|
|
5355
6447
|
|
|
@@ -5362,13 +6454,13 @@ Example:
|
|
|
5362
6454
|
"data": {
|
|
5363
6455
|
"document": {
|
|
5364
6456
|
"resource": "document",
|
|
5365
|
-
"id": "
|
|
6457
|
+
"id": "example_id_36",
|
|
5366
6458
|
"name": "Contract.pdf",
|
|
5367
6459
|
"page_count": 3,
|
|
5368
6460
|
"created_by": "Jane Doe"
|
|
5369
6461
|
},
|
|
5370
6462
|
"channel": "email",
|
|
5371
|
-
"recipient": "
|
|
6463
|
+
"recipient": "user1@example.com"
|
|
5372
6464
|
},
|
|
5373
6465
|
"status": 200,
|
|
5374
6466
|
"message": ""
|
|
@@ -5411,7 +6503,7 @@ Example:
|
|
|
5411
6503
|
|
|
5412
6504
|
Return the signer identified by the signer access code, including the `has_signature`/`has_initial`/`is_signature_reusable` flags and the `verification_method` of this signature request. Available before verification, so the signing page can pick the right first step.
|
|
5413
6505
|
|
|
5414
|
-
**Authentication:** signer access code (`
|
|
6506
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5415
6507
|
|
|
5416
6508
|
#### Responses
|
|
5417
6509
|
|
|
@@ -5427,7 +6519,7 @@ Return the signer identified by the signer access code, including the `has_signa
|
|
|
5427
6519
|
"resource": "signer",
|
|
5428
6520
|
"id": "example_id_14",
|
|
5429
6521
|
"full_name": "Example User",
|
|
5430
|
-
"email": "
|
|
6522
|
+
"email": "user3@example.com",
|
|
5431
6523
|
"whatsapp_phone_number": "+5500000000000",
|
|
5432
6524
|
"government_id": "00000000000",
|
|
5433
6525
|
"has_accepted_terms": false
|
|
@@ -5467,7 +6559,7 @@ Current state of the signer's identity document verification. Backfills a pendin
|
|
|
5467
6559
|
|
|
5468
6560
|
**In review:** the signer continues -- views, confirms their data and signs -- while the account reviews the result. The document is certificated only after the account approves every signer under review; if it rejects one, the document is cancelled and every signer receives the cancellation notice.
|
|
5469
6561
|
|
|
5470
|
-
**Authentication:** signer access code (`
|
|
6562
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5471
6563
|
|
|
5472
6564
|
#### Responses
|
|
5473
6565
|
|
|
@@ -5478,7 +6570,7 @@ Current state of the signer's identity document verification. Backfills a pendin
|
|
|
5478
6570
|
"data": {
|
|
5479
6571
|
"can_start": false,
|
|
5480
6572
|
"status": "Pending",
|
|
5481
|
-
"url": "https://example.com/example-url-
|
|
6573
|
+
"url": "https://example.com/example-url-16",
|
|
5482
6574
|
"expires_at": "2026-10-07T21:18:47Z",
|
|
5483
6575
|
"completed_at": "2026-08-10T20:32:00Z"
|
|
5484
6576
|
},
|
|
@@ -5515,7 +6607,7 @@ Records the signer's biometric-processing consent and opens a provider session.
|
|
|
5515
6607
|
|
|
5516
6608
|
**One live session per signer:** this succeeds when no session exists yet, or when the last one Expired (the capture link lapsed before anything was submitted); the expired session is replaced by a new one. Otherwise -- Pending, In Review, Approved, Declined or Abandoned -- it returns `400`. A resend never destroys or replaces a live provider session, and the account is billed once per signer at assignment creation, never again on a restart. Recovering from a Declined or Abandoned verification means the account must start a whole new process (new document, new assignment).
|
|
5517
6609
|
|
|
5518
|
-
**Authentication:** signer access code (`
|
|
6610
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5519
6611
|
|
|
5520
6612
|
#### Request Body (required)
|
|
5521
6613
|
|
|
@@ -5539,7 +6631,7 @@ Example:
|
|
|
5539
6631
|
{
|
|
5540
6632
|
"data": {
|
|
5541
6633
|
"id": "example_id_20",
|
|
5542
|
-
"url": "https://example.com/example-url-
|
|
6634
|
+
"url": "https://example.com/example-url-16",
|
|
5543
6635
|
"expires_at": "2026-10-07T21:18:47Z"
|
|
5544
6636
|
},
|
|
5545
6637
|
"status": 200,
|
|
@@ -5573,9 +6665,9 @@ Example:
|
|
|
5573
6665
|
|
|
5574
6666
|
`GET /v1/signers/{signerId}/document`
|
|
5575
6667
|
|
|
5576
|
-
Return the document and the signer's assignment items, scoped to the signer access code.
|
|
6668
|
+
Return the document and the signer's assignment items, scoped to the signer access code. The response adds `current_signer`: this signer, with their `verification_method`, `notification_methods` and `completed` (whether they have already signed).
|
|
5577
6669
|
|
|
5578
|
-
**Authentication:** signer access code (`
|
|
6670
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5579
6671
|
|
|
5580
6672
|
#### Parameters
|
|
5581
6673
|
|
|
@@ -5601,6 +6693,8 @@ Return the document and the signer's assignment items, scoped to the signer acce
|
|
|
5601
6693
|
},
|
|
5602
6694
|
"is_closed": false,
|
|
5603
6695
|
"signing_url": "https://example.com/example-url-3",
|
|
6696
|
+
"verification_code": "example_secret",
|
|
6697
|
+
"verification_url": "https://example.com/example-url-4",
|
|
5604
6698
|
"decline_reason": null,
|
|
5605
6699
|
"declined_by": null,
|
|
5606
6700
|
"tags": [
|
|
@@ -5616,9 +6710,10 @@ Return the document and the signer's assignment items, scoped to the signer acce
|
|
|
5616
6710
|
"number": 1,
|
|
5617
6711
|
"height": 2100,
|
|
5618
6712
|
"width": 1275,
|
|
5619
|
-
"download_url": "https://example.com/example-url-
|
|
6713
|
+
"download_url": "https://example.com/example-url-5"
|
|
5620
6714
|
}
|
|
5621
6715
|
],
|
|
6716
|
+
"has_contract": true,
|
|
5622
6717
|
"created_at": "2026-06-03T03:54:16Z",
|
|
5623
6718
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
5624
6719
|
},
|
|
@@ -5661,11 +6756,11 @@ Return the document and the signer's assignment items, scoped to the signer acce
|
|
|
5661
6756
|
|
|
5662
6757
|
`GET /v1/sign`
|
|
5663
6758
|
|
|
5664
|
-
Retrieve the document a signer has been invited to sign, using the signer access code. Marks the document as viewed. Returns 409 while the document is still being prepared (retry with backoff).
|
|
6759
|
+
Retrieve the document a signer has been invited to sign, using the signer access code. Marks the document as viewed. The assignment carries only this signer's items, and leaves out the other signers, their signing links (`signing_urls`), the copy receivers and the signing `summary`. The response adds `current_signer`: this signer, with their `verification_method`, `notification_methods` and `completed` (whether they have already signed). Returns 409 while the document is still being prepared (retry with backoff).
|
|
5665
6760
|
|
|
5666
6761
|
**Signers whose verification method is `DigitalCertificate`** must have confirmed their data *and* accepted the terms before this returns the document; otherwise it is `400`. Both are satisfied in one call to `PUT /v1/documents/{documentId}/signers/confirm-data` with `has_accepted_terms: true`, so send that before this endpoint — the `has_accepted_terms` query parameter here is too late to open the gate. `PUT /v1/signers/accept-terms` also works and is never gated.
|
|
5667
6762
|
|
|
5668
|
-
**Authentication:** signer access code (`
|
|
6763
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5669
6764
|
|
|
5670
6765
|
#### Parameters
|
|
5671
6766
|
|
|
@@ -5691,6 +6786,8 @@ Retrieve the document a signer has been invited to sign, using the signer access
|
|
|
5691
6786
|
},
|
|
5692
6787
|
"is_closed": false,
|
|
5693
6788
|
"signing_url": "https://example.com/example-url-3",
|
|
6789
|
+
"verification_code": "example_secret",
|
|
6790
|
+
"verification_url": "https://example.com/example-url-4",
|
|
5694
6791
|
"decline_reason": null,
|
|
5695
6792
|
"declined_by": null,
|
|
5696
6793
|
"tags": [
|
|
@@ -5706,9 +6803,10 @@ Retrieve the document a signer has been invited to sign, using the signer access
|
|
|
5706
6803
|
"number": 1,
|
|
5707
6804
|
"height": 2100,
|
|
5708
6805
|
"width": 1275,
|
|
5709
|
-
"download_url": "https://example.com/example-url-
|
|
6806
|
+
"download_url": "https://example.com/example-url-5"
|
|
5710
6807
|
}
|
|
5711
6808
|
],
|
|
6809
|
+
"has_contract": true,
|
|
5712
6810
|
"created_at": "2026-06-03T03:54:16Z",
|
|
5713
6811
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
5714
6812
|
},
|
|
@@ -5745,9 +6843,9 @@ Retrieve the document a signer has been invited to sign, using the signer access
|
|
|
5745
6843
|
|
|
5746
6844
|
`POST /v1/documents/{documentId}/assignments/{assignmentId}`
|
|
5747
6845
|
|
|
5748
|
-
Sign a document with input fields (collect method): submit the signer's item values, completing their items. For **virtual** assignments the signer must first confirm their data via `PUT /v1/documents/{documentId}/signers/confirm-data`, otherwise this returns `400` (Signer data must be confirmed before signing). Signers whose verification method is `DigitalCertificate` cannot use this endpoint — their signature must be produced through `POST /v1/signers/certificate/start` + `/complete`, and this returns `400`. The request body is a JSON array of item entries. Uses the signer access code.
|
|
6846
|
+
Sign a document with input fields (collect method): submit the signer's item values, completing their items. Signing again after the signer has signed changes nothing and returns the current assignment. For **virtual** assignments the signer must first confirm their data via `PUT /v1/documents/{documentId}/signers/confirm-data`, otherwise this returns `400` (Signer data must be confirmed before signing). Signers whose verification method is `DigitalCertificate` cannot use this endpoint — their signature must be produced through `POST /v1/signers/certificate/start` + `/complete`, and this returns `400`. The request body is a JSON array of item entries. Uses the signer access code.
|
|
5749
6847
|
|
|
5750
|
-
**Authentication:** signer access code (`
|
|
6848
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5751
6849
|
|
|
5752
6850
|
#### Parameters
|
|
5753
6851
|
|
|
@@ -5783,7 +6881,9 @@ Example:
|
|
|
5783
6881
|
}
|
|
5784
6882
|
```
|
|
5785
6883
|
|
|
5786
|
-
##### 400 — Signer data must be confirmed before signing (virtual assignments),
|
|
6884
|
+
##### 400 — Signer data must be confirmed before signing (virtual assignments), the signer must sign with a digital certificate through the digital certificate endpoints, or an entry names a page, field or item that is not one of this signer's. Nothing is signed when an entry is refused.
|
|
6885
|
+
|
|
6886
|
+
##### 404 — The assignment is not the one the access code belongs to.
|
|
5787
6887
|
|
|
5788
6888
|
##### 409 — The document is not ready to be signed yet.
|
|
5789
6889
|
|
|
@@ -5813,7 +6913,7 @@ Example:
|
|
|
5813
6913
|
|
|
5814
6914
|
The signer declines to sign the document, giving a reason. Uses the signer access code.
|
|
5815
6915
|
|
|
5816
|
-
**Authentication:** signer access code (`
|
|
6916
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5817
6917
|
|
|
5818
6918
|
#### Parameters
|
|
5819
6919
|
|
|
@@ -5848,6 +6948,8 @@ Example:
|
|
|
5848
6948
|
}
|
|
5849
6949
|
```
|
|
5850
6950
|
|
|
6951
|
+
##### 404 — The assignment is not the one this access code was issued for.
|
|
6952
|
+
|
|
5851
6953
|
##### 401 — Missing or invalid credentials.
|
|
5852
6954
|
|
|
5853
6955
|
```json
|
|
@@ -5874,7 +6976,7 @@ Example:
|
|
|
5874
6976
|
|
|
5875
6977
|
Sign several documents in one request, for a signer with multiple pending documents. Each document must be prepared for the **virtual** signature method. Uses the signer access code.
|
|
5876
6978
|
|
|
5877
|
-
**Authentication:** signer access code (`
|
|
6979
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5878
6980
|
|
|
5879
6981
|
#### Request Body (required)
|
|
5880
6982
|
|
|
@@ -5887,8 +6989,8 @@ Example:
|
|
|
5887
6989
|
```json
|
|
5888
6990
|
{
|
|
5889
6991
|
"document_ids": [
|
|
5890
|
-
"
|
|
5891
|
-
"
|
|
6992
|
+
"example_id_37",
|
|
6993
|
+
"example_id_38"
|
|
5892
6994
|
]
|
|
5893
6995
|
}
|
|
5894
6996
|
```
|
|
@@ -5905,6 +7007,10 @@ Example:
|
|
|
5905
7007
|
}
|
|
5906
7008
|
```
|
|
5907
7009
|
|
|
7010
|
+
##### 400 — A listed document is not a virtual document of this signer, is not pending signature, or waits for an earlier signing step.
|
|
7011
|
+
|
|
7012
|
+
##### 404 — A listed document ID does not exist in the workspace. The message names the unknown IDs.
|
|
7013
|
+
|
|
5908
7014
|
##### 401 — Missing or invalid credentials.
|
|
5909
7015
|
|
|
5910
7016
|
```json
|
|
@@ -5931,7 +7037,7 @@ Example:
|
|
|
5931
7037
|
|
|
5932
7038
|
Decline several documents in one request. Uses the signer access code.
|
|
5933
7039
|
|
|
5934
|
-
**Authentication:** signer access code (`
|
|
7040
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5935
7041
|
|
|
5936
7042
|
#### Request Body (required)
|
|
5937
7043
|
|
|
@@ -5945,8 +7051,8 @@ Example:
|
|
|
5945
7051
|
```json
|
|
5946
7052
|
{
|
|
5947
7053
|
"document_ids": [
|
|
5948
|
-
"
|
|
5949
|
-
"
|
|
7054
|
+
"example_id_37",
|
|
7055
|
+
"example_id_38"
|
|
5950
7056
|
],
|
|
5951
7057
|
"decline_reason": "Unfavorable terms."
|
|
5952
7058
|
}
|
|
@@ -5964,6 +7070,10 @@ Example:
|
|
|
5964
7070
|
}
|
|
5965
7071
|
```
|
|
5966
7072
|
|
|
7073
|
+
##### 400 — A listed document is not this signer's, is not pending signature, or waits for an earlier signing step. Nothing is declined.
|
|
7074
|
+
|
|
7075
|
+
##### 404 — A listed document ID does not exist in the workspace. The message names the unknown IDs.
|
|
7076
|
+
|
|
5967
7077
|
##### 401 — Missing or invalid credentials.
|
|
5968
7078
|
|
|
5969
7079
|
```json
|
|
@@ -5990,7 +7100,7 @@ Example:
|
|
|
5990
7100
|
|
|
5991
7101
|
Submit the verification code (OTP) sent to the signer to unlock the signing flow. Uses the signer access code.
|
|
5992
7102
|
|
|
5993
|
-
**Authentication:** signer access code (`
|
|
7103
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
5994
7104
|
|
|
5995
7105
|
#### Request Body (required)
|
|
5996
7106
|
|
|
@@ -6053,7 +7163,7 @@ Example:
|
|
|
6053
7163
|
|
|
6054
7164
|
The signer confirms or updates their data before signing. Uses the signer access code.
|
|
6055
7165
|
|
|
6056
|
-
**Authentication:** signer access code (`
|
|
7166
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
6057
7167
|
|
|
6058
7168
|
#### Parameters
|
|
6059
7169
|
|
|
@@ -6089,7 +7199,7 @@ Example:
|
|
|
6089
7199
|
"resource": "signer",
|
|
6090
7200
|
"id": "example_id_14",
|
|
6091
7201
|
"full_name": "Example User",
|
|
6092
|
-
"email": "
|
|
7202
|
+
"email": "user3@example.com",
|
|
6093
7203
|
"whatsapp_phone_number": "+5500000000000",
|
|
6094
7204
|
"government_id": "00000000000",
|
|
6095
7205
|
"has_accepted_terms": false
|
|
@@ -6125,7 +7235,7 @@ Example:
|
|
|
6125
7235
|
|
|
6126
7236
|
Record that the signer accepted the terms of use. Uses the signer access code.
|
|
6127
7237
|
|
|
6128
|
-
**Authentication:** signer access code (`
|
|
7238
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
6129
7239
|
|
|
6130
7240
|
#### Responses
|
|
6131
7241
|
|
|
@@ -6164,7 +7274,7 @@ Record that the signer accepted the terms of use. Uses the signer access code.
|
|
|
6164
7274
|
|
|
6165
7275
|
Upload the signer's signature (or initials) image as the raw request body. Uses the signer access code.
|
|
6166
7276
|
|
|
6167
|
-
**Authentication:** signer access code (`
|
|
7277
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
6168
7278
|
|
|
6169
7279
|
#### Parameters
|
|
6170
7280
|
|
|
@@ -6192,6 +7302,8 @@ Example:
|
|
|
6192
7302
|
}
|
|
6193
7303
|
```
|
|
6194
7304
|
|
|
7305
|
+
##### 400 — The image is not a PNG or JPEG file, or it is blank.
|
|
7306
|
+
|
|
6195
7307
|
##### 401 — Missing or invalid credentials.
|
|
6196
7308
|
|
|
6197
7309
|
```json
|
|
@@ -6218,7 +7330,7 @@ Example:
|
|
|
6218
7330
|
|
|
6219
7331
|
Download the signer's stored signature/initials image. Uses the signer access code.
|
|
6220
7332
|
|
|
6221
|
-
**Authentication:** signer access code (`
|
|
7333
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter).
|
|
6222
7334
|
|
|
6223
7335
|
#### Parameters
|
|
6224
7336
|
|
|
@@ -6264,9 +7376,9 @@ Download the signer's stored signature/initials image. Uses the signer access co
|
|
|
6264
7376
|
|
|
6265
7377
|
`GET /v1/signers/{signerId}/documents`
|
|
6266
7378
|
|
|
6267
|
-
List the documents a signer is party to. Accepts either the signer access code or the account's own credentials (API key or bearer token) — with account credentials, the signer must belong to that account's workspace.
|
|
7379
|
+
List the documents a signer is party to. Accepts either the signer access code or the account's own credentials (API key or bearer token) — with account credentials, the signer must belong to that account's workspace. With the signer access code, `signerId` must be the code's own signer (otherwise `403`), only documents whose signing step has been reached are listed, and each assignment leaves out `signing_urls`.
|
|
6268
7380
|
|
|
6269
|
-
**Authentication:** signer access code (`
|
|
7381
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter) or Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
6270
7382
|
|
|
6271
7383
|
#### Parameters
|
|
6272
7384
|
|
|
@@ -6295,6 +7407,8 @@ List the documents a signer is party to. Accepts either the signer access code o
|
|
|
6295
7407
|
},
|
|
6296
7408
|
"is_closed": false,
|
|
6297
7409
|
"signing_url": "https://example.com/example-url-3",
|
|
7410
|
+
"verification_code": "example_secret",
|
|
7411
|
+
"verification_url": "https://example.com/example-url-4",
|
|
6298
7412
|
"decline_reason": null,
|
|
6299
7413
|
"declined_by": null,
|
|
6300
7414
|
"tags": [
|
|
@@ -6310,9 +7424,10 @@ List the documents a signer is party to. Accepts either the signer access code o
|
|
|
6310
7424
|
"number": 1,
|
|
6311
7425
|
"height": 2100,
|
|
6312
7426
|
"width": 1275,
|
|
6313
|
-
"download_url": "https://example.com/example-url-
|
|
7427
|
+
"download_url": "https://example.com/example-url-5"
|
|
6314
7428
|
}
|
|
6315
7429
|
],
|
|
7430
|
+
"has_contract": true,
|
|
6316
7431
|
"created_at": "2026-06-03T03:54:16Z",
|
|
6317
7432
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
6318
7433
|
}
|
|
@@ -6322,6 +7437,8 @@ List the documents a signer is party to. Accepts either the signer access code o
|
|
|
6322
7437
|
}
|
|
6323
7438
|
```
|
|
6324
7439
|
|
|
7440
|
+
##### 403 — The access code belongs to another signer.
|
|
7441
|
+
|
|
6325
7442
|
##### 401 — Missing or invalid credentials.
|
|
6326
7443
|
|
|
6327
7444
|
```json
|
|
@@ -6346,9 +7463,9 @@ List the documents a signer is party to. Accepts either the signer access code o
|
|
|
6346
7463
|
|
|
6347
7464
|
`GET /v1/signers/{signerId}/documents/search`
|
|
6348
7465
|
|
|
6349
|
-
Search the documents a signer is party to (compact representation). Accepts either the signer access code or the account's own credentials (API key or bearer token) — with account credentials, the signer must belong to that account's workspace.
|
|
7466
|
+
Search the documents a signer is party to (compact representation). Accepts either the signer access code or the account's own credentials (API key or bearer token) — with account credentials, the signer must belong to that account's workspace. With the signer access code, `signerId` must be the code's own signer (otherwise `403`), only documents whose signing step has been reached are listed, and each assignment leaves out `signing_urls`.
|
|
6350
7467
|
|
|
6351
|
-
**Authentication:** signer access code (`
|
|
7468
|
+
**Authentication:** signer access code (`signer-access-code` query or body parameter) or Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
6352
7469
|
|
|
6353
7470
|
#### Parameters
|
|
6354
7471
|
|
|
@@ -6376,6 +7493,8 @@ Search the documents a signer is party to (compact representation). Accepts eith
|
|
|
6376
7493
|
},
|
|
6377
7494
|
"is_closed": false,
|
|
6378
7495
|
"signing_url": "https://example.com/example-url-3",
|
|
7496
|
+
"verification_code": "example_secret",
|
|
7497
|
+
"verification_url": "https://example.com/example-url-4",
|
|
6379
7498
|
"decline_reason": null,
|
|
6380
7499
|
"declined_by": null,
|
|
6381
7500
|
"tags": [
|
|
@@ -6391,9 +7510,10 @@ Search the documents a signer is party to (compact representation). Accepts eith
|
|
|
6391
7510
|
"number": 1,
|
|
6392
7511
|
"height": 2100,
|
|
6393
7512
|
"width": 1275,
|
|
6394
|
-
"download_url": "https://example.com/example-url-
|
|
7513
|
+
"download_url": "https://example.com/example-url-5"
|
|
6395
7514
|
}
|
|
6396
7515
|
],
|
|
7516
|
+
"has_contract": true,
|
|
6397
7517
|
"created_at": "2026-06-03T03:54:16Z",
|
|
6398
7518
|
"updated_at": "2026-06-03T03:54:16Z"
|
|
6399
7519
|
}
|
|
@@ -6403,6 +7523,8 @@ Search the documents a signer is party to (compact representation). Accepts eith
|
|
|
6403
7523
|
}
|
|
6404
7524
|
```
|
|
6405
7525
|
|
|
7526
|
+
##### 403 — The access code belongs to another signer.
|
|
7527
|
+
|
|
6406
7528
|
##### 401 — Missing or invalid credentials.
|
|
6407
7529
|
|
|
6408
7530
|
```json
|
|
@@ -6493,7 +7615,7 @@ List the signers of a workspace.
|
|
|
6493
7615
|
"resource": "signer",
|
|
6494
7616
|
"id": "example_id_14",
|
|
6495
7617
|
"full_name": "Example User",
|
|
6496
|
-
"email": "
|
|
7618
|
+
"email": "user3@example.com",
|
|
6497
7619
|
"whatsapp_phone_number": "+5500000000000",
|
|
6498
7620
|
"government_id": "00000000000",
|
|
6499
7621
|
"has_accepted_terms": false
|
|
@@ -6552,7 +7674,7 @@ Example:
|
|
|
6552
7674
|
```json
|
|
6553
7675
|
{
|
|
6554
7676
|
"full_name": "Example User",
|
|
6555
|
-
"email": "
|
|
7677
|
+
"email": "user3@example.com",
|
|
6556
7678
|
"whatsapp_phone_number": "+5500000000000",
|
|
6557
7679
|
"government_id": "00000000000"
|
|
6558
7680
|
}
|
|
@@ -6568,7 +7690,7 @@ Example:
|
|
|
6568
7690
|
"resource": "signer",
|
|
6569
7691
|
"id": "example_id_14",
|
|
6570
7692
|
"full_name": "Example User",
|
|
6571
|
-
"email": "
|
|
7693
|
+
"email": "user3@example.com",
|
|
6572
7694
|
"whatsapp_phone_number": "+5500000000000",
|
|
6573
7695
|
"government_id": "00000000000",
|
|
6574
7696
|
"has_accepted_terms": false
|
|
@@ -6633,7 +7755,7 @@ Retrieve a signer's information.
|
|
|
6633
7755
|
"resource": "signer",
|
|
6634
7756
|
"id": "example_id_14",
|
|
6635
7757
|
"full_name": "Example User",
|
|
6636
|
-
"email": "
|
|
7758
|
+
"email": "user3@example.com",
|
|
6637
7759
|
"whatsapp_phone_number": "+5500000000000",
|
|
6638
7760
|
"government_id": "00000000000",
|
|
6639
7761
|
"has_accepted_terms": false
|
|
@@ -6677,7 +7799,9 @@ Retrieve a signer's information.
|
|
|
6677
7799
|
|
|
6678
7800
|
`PUT /v1/accounts/{accountId}/signers/{signerId}`
|
|
6679
7801
|
|
|
6680
|
-
Update a signer's information.
|
|
7802
|
+
Update a signer's information. Only the fields sent change; send just the ones you are changing.
|
|
7803
|
+
|
|
7804
|
+
**Clearing a field:** `null` or `"` clears `email`, `whatsapp_phone_number` and `government_id` (`whatsapp_phone_number` is stored as `null` either way; the other two keep the value sent). `full_name` cannot be cleared.
|
|
6681
7805
|
|
|
6682
7806
|
**Verification integrity:** `email` / `whatsapp_phone_number` cannot be changed while the signer has verified that channel on an in-flight (not yet certificated) document — the response is `400` naming the offending document(s). Already-certificated documents do not block updates. Changing a channel that has *unverified* in-flight requests rotates their access/verification codes (invalidating previously sent links/OTPs); use the resend endpoint to redeliver. `full_name` can always be updated.
|
|
6683
7807
|
|
|
@@ -6695,8 +7819,8 @@ Update a signer's information.
|
|
|
6695
7819
|
Fields (`application/json`):
|
|
6696
7820
|
|
|
6697
7821
|
- `full_name` (string)
|
|
6698
|
-
- `email` (string)
|
|
6699
|
-
- `whatsapp_phone_number` (string) — E.164; normalized on save.
|
|
7822
|
+
- `email` (string) — Can't be changed or cleared while the signer has verified it on an in-flight document (`400`).
|
|
7823
|
+
- `whatsapp_phone_number` (string) — E.164; normalized on save, and compared after normalizing, so the same number in another format is not a change. Can't be changed or cleared while the signer has verified it on an in-flight document (`400`).
|
|
6700
7824
|
- `government_id` (string) — Signer's CPF (11 digits) or CNPJ (14 characters; may be alphanumeric). Formatting is accepted and the value is normalized on save.
|
|
6701
7825
|
|
|
6702
7826
|
Example:
|
|
@@ -6704,7 +7828,7 @@ Example:
|
|
|
6704
7828
|
```json
|
|
6705
7829
|
{
|
|
6706
7830
|
"full_name": "Example User",
|
|
6707
|
-
"email": "
|
|
7831
|
+
"email": "user3@example.com",
|
|
6708
7832
|
"whatsapp_phone_number": "+5500000000000",
|
|
6709
7833
|
"government_id": "00000000000"
|
|
6710
7834
|
}
|
|
@@ -6720,7 +7844,7 @@ Example:
|
|
|
6720
7844
|
"resource": "signer",
|
|
6721
7845
|
"id": "example_id_14",
|
|
6722
7846
|
"full_name": "Example User",
|
|
6723
|
-
"email": "
|
|
7847
|
+
"email": "user3@example.com",
|
|
6724
7848
|
"whatsapp_phone_number": "+5500000000000",
|
|
6725
7849
|
"government_id": "00000000000",
|
|
6726
7850
|
"has_accepted_terms": false
|
|
@@ -7162,7 +8286,7 @@ The `status` field of a template is one of:
|
|
|
7162
8286
|
"data": [
|
|
7163
8287
|
{
|
|
7164
8288
|
"resource": "template",
|
|
7165
|
-
"id": "
|
|
8289
|
+
"id": "example_id_39",
|
|
7166
8290
|
"name": "template.pdf",
|
|
7167
8291
|
"document_name": null,
|
|
7168
8292
|
"message": null,
|
|
@@ -7173,7 +8297,7 @@ The `status` field of a template is one of:
|
|
|
7173
8297
|
"number": 1,
|
|
7174
8298
|
"height": 2100,
|
|
7175
8299
|
"width": 1275,
|
|
7176
|
-
"download_url": "https://example.com/example-url-
|
|
8300
|
+
"download_url": "https://example.com/example-url-15",
|
|
7177
8301
|
"fields": [
|
|
7178
8302
|
{
|
|
7179
8303
|
"id": "example_id_5",
|
|
@@ -7265,7 +8389,9 @@ Retrieve the account's oldest webhook endpoint — which events it is subscribed
|
|
|
7265
8389
|
"document_prepared"
|
|
7266
8390
|
],
|
|
7267
8391
|
"is_active": true,
|
|
7268
|
-
"
|
|
8392
|
+
"is_held": false,
|
|
8393
|
+
"held_since": null,
|
|
8394
|
+
"url": "https://example.com/example-url-17",
|
|
7269
8395
|
"email": "user11@example.com",
|
|
7270
8396
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
7271
8397
|
},
|
|
@@ -7314,7 +8440,7 @@ Fields (`application/json`):
|
|
|
7314
8440
|
|
|
7315
8441
|
- `events` (array, required) — Event type codes to subscribe to (see `GET /v1/webhooks/event-types`).
|
|
7316
8442
|
- `is_active` (boolean, required) — Whether events should be delivered to the webhook.
|
|
7317
|
-
- `url` (string, required) — The URL that will receive events.
|
|
8443
|
+
- `url` (string, required) — The URL that will receive events: `https` for a new or changed URL (a URL stored before keeps working). Its host must resolve to a public address (`400` otherwise), and redirects are not followed.
|
|
7318
8444
|
- `email` (string, required) — Email that receives important webhook-communication notices.
|
|
7319
8445
|
|
|
7320
8446
|
Example:
|
|
@@ -7326,7 +8452,7 @@ Example:
|
|
|
7326
8452
|
"document_prepared"
|
|
7327
8453
|
],
|
|
7328
8454
|
"is_active": true,
|
|
7329
|
-
"url": "https://example.com/example-url-
|
|
8455
|
+
"url": "https://example.com/example-url-17",
|
|
7330
8456
|
"email": "user11@example.com"
|
|
7331
8457
|
}
|
|
7332
8458
|
```
|
|
@@ -7343,7 +8469,9 @@ Example:
|
|
|
7343
8469
|
"document_prepared"
|
|
7344
8470
|
],
|
|
7345
8471
|
"is_active": true,
|
|
7346
|
-
"
|
|
8472
|
+
"is_held": false,
|
|
8473
|
+
"held_since": null,
|
|
8474
|
+
"url": "https://example.com/example-url-17",
|
|
7347
8475
|
"email": "user11@example.com",
|
|
7348
8476
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
7349
8477
|
},
|
|
@@ -7408,7 +8536,9 @@ Deactivate the account's oldest webhook endpoint. While inactive, no events are
|
|
|
7408
8536
|
"document_prepared"
|
|
7409
8537
|
],
|
|
7410
8538
|
"is_active": true,
|
|
7411
|
-
"
|
|
8539
|
+
"is_held": false,
|
|
8540
|
+
"held_since": null,
|
|
8541
|
+
"url": "https://example.com/example-url-17",
|
|
7412
8542
|
"email": "user11@example.com",
|
|
7413
8543
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
7414
8544
|
},
|
|
@@ -7512,13 +8642,17 @@ Retrieve the delivery history for webhooks sent to the account's endpoints — u
|
|
|
7512
8642
|
"data": [
|
|
7513
8643
|
{
|
|
7514
8644
|
"resource": "activity_dispatching_history",
|
|
7515
|
-
"id": "
|
|
8645
|
+
"id": "example_id_40",
|
|
7516
8646
|
"event": "document_ready",
|
|
7517
8647
|
"activity_id": 456,
|
|
7518
|
-
"endpoint_id": "
|
|
7519
|
-
"endpoint": "https://example.com/example-url-
|
|
8648
|
+
"endpoint_id": "example_id_41",
|
|
8649
|
+
"endpoint": "https://example.com/example-url-18",
|
|
7520
8650
|
"payload": null,
|
|
7521
8651
|
"delivered": true,
|
|
8652
|
+
"webhook_id": "example_id_42",
|
|
8653
|
+
"attempt": 2,
|
|
8654
|
+
"kind": "scheduled",
|
|
8655
|
+
"will_retry": true,
|
|
7522
8656
|
"http_status": 200,
|
|
7523
8657
|
"response_body": "OK",
|
|
7524
8658
|
"error": null,
|
|
@@ -7555,7 +8689,7 @@ Retrieve the delivery history for webhooks sent to the account's endpoints — u
|
|
|
7555
8689
|
|
|
7556
8690
|
`POST /v1/accounts/{accountId}/webhooks/{historyId}/retry`
|
|
7557
8691
|
|
|
7558
|
-
|
|
8692
|
+
Sends the entry's event to the entry's endpoint once, now, even while the endpoint is paused, and returns the dispatch entry of that attempt; a delivery that gets through lifts the pause. Requires the `webhooks:write` OAuth scope.
|
|
7559
8693
|
|
|
7560
8694
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7561
8695
|
|
|
@@ -7574,13 +8708,17 @@ Manually retry a webhook delivery for a specific entry, without waiting for auto
|
|
|
7574
8708
|
{
|
|
7575
8709
|
"data": {
|
|
7576
8710
|
"resource": "activity_dispatching_history",
|
|
7577
|
-
"id": "
|
|
8711
|
+
"id": "example_id_40",
|
|
7578
8712
|
"event": "document_ready",
|
|
7579
8713
|
"activity_id": 456,
|
|
7580
|
-
"endpoint_id": "
|
|
7581
|
-
"endpoint": "https://example.com/example-url-
|
|
8714
|
+
"endpoint_id": "example_id_41",
|
|
8715
|
+
"endpoint": "https://example.com/example-url-18",
|
|
7582
8716
|
"payload": null,
|
|
7583
8717
|
"delivered": true,
|
|
8718
|
+
"webhook_id": "example_id_42",
|
|
8719
|
+
"attempt": 2,
|
|
8720
|
+
"kind": "scheduled",
|
|
8721
|
+
"will_retry": true,
|
|
7584
8722
|
"http_status": 200,
|
|
7585
8723
|
"response_body": "OK",
|
|
7586
8724
|
"error": null,
|
|
@@ -7655,15 +8793,18 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
|
|
|
7655
8793
|
{
|
|
7656
8794
|
"data": [
|
|
7657
8795
|
{
|
|
7658
|
-
"
|
|
8796
|
+
"resource": "activity_event_subscription",
|
|
8797
|
+
"id": "example_id_41",
|
|
7659
8798
|
"name": "ERP",
|
|
7660
|
-
"url": "https://example.com/example-url-
|
|
8799
|
+
"url": "https://example.com/example-url-19",
|
|
7661
8800
|
"email": "user12@example.com",
|
|
7662
8801
|
"events": [
|
|
7663
8802
|
"document_ready",
|
|
7664
8803
|
"signer_signed_document"
|
|
7665
8804
|
],
|
|
7666
8805
|
"is_active": true,
|
|
8806
|
+
"is_held": false,
|
|
8807
|
+
"held_since": null,
|
|
7667
8808
|
"signing_enabled": true,
|
|
7668
8809
|
"created_at": "2026-10-01T12:00:00Z",
|
|
7669
8810
|
"updated_at": "2026-10-01T12:00:00Z"
|
|
@@ -7698,7 +8839,7 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
|
|
|
7698
8839
|
|
|
7699
8840
|
`POST /v1/accounts/{accountId}/webhooks/endpoints`
|
|
7700
8841
|
|
|
7701
|
-
Register a URL to receive the account's webhook events. An account can have 1 endpoint, or up to 3 on paid plans; creating one past the limit returns `403`. Each endpoint of a workspace must have a different `url` (`400` otherwise). When `signing_enabled` is `true`, a signing secret is generated and returned once, as `secret` in this response — store it, since it is never shown in list or view responses. It can be read again later with **Get webhook endpoint signing secret**, except by OAuth applications: an OAuth application that loses the secret
|
|
8842
|
+
Register a URL to receive the account's webhook events. An account can have 1 endpoint, or up to 3 on paid plans; creating one past the limit returns `403`. Each endpoint of a workspace must have a different `url` (`400` otherwise). When `signing_enabled` is `true`, a signing secret is generated and returned once, as `secret` in this response — store it, since it is never shown in list or view responses. It can be read again later with **Get webhook endpoint signing secret**, except by OAuth applications: an OAuth application that loses the secret gets a new one with **Rotate webhook endpoint signing secret**. Requires the `webhooks:write` OAuth scope.
|
|
7702
8843
|
|
|
7703
8844
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7704
8845
|
|
|
@@ -7712,7 +8853,7 @@ Register a URL to receive the account's webhook events. An account can have 1 en
|
|
|
7712
8853
|
|
|
7713
8854
|
Fields (`application/json`):
|
|
7714
8855
|
|
|
7715
|
-
- `url` (string, required) — URL that receives the events
|
|
8856
|
+
- `url` (string, required) — URL that receives the events: `https` for a new or changed URL (a URL stored before keeps working). Its host must resolve to a public address; private, loopback, link-local and other reserved addresses are refused with `400`. Deliveries don't follow redirects: a `3xx` answer counts as a failed delivery.
|
|
7716
8857
|
- `email` (string, required) — Contact email for delivery-failure notices.
|
|
7717
8858
|
- `events` (array, required) — Event types to deliver (see `GET /v1/webhooks/event-types`).
|
|
7718
8859
|
- `name` (string) — Label to tell endpoints apart.
|
|
@@ -7723,7 +8864,7 @@ Example:
|
|
|
7723
8864
|
|
|
7724
8865
|
```json
|
|
7725
8866
|
{
|
|
7726
|
-
"url": "https://example.com/example-url-
|
|
8867
|
+
"url": "https://example.com/example-url-19",
|
|
7727
8868
|
"email": "user12@example.com",
|
|
7728
8869
|
"events": [
|
|
7729
8870
|
"document_ready",
|
|
@@ -7743,15 +8884,18 @@ Example:
|
|
|
7743
8884
|
{
|
|
7744
8885
|
"data": {
|
|
7745
8886
|
"secret": "example_secret",
|
|
7746
|
-
"
|
|
8887
|
+
"resource": "activity_event_subscription",
|
|
8888
|
+
"id": "example_id_41",
|
|
7747
8889
|
"name": "ERP",
|
|
7748
|
-
"url": "https://example.com/example-url-
|
|
8890
|
+
"url": "https://example.com/example-url-19",
|
|
7749
8891
|
"email": "user12@example.com",
|
|
7750
8892
|
"events": [
|
|
7751
8893
|
"document_ready",
|
|
7752
8894
|
"signer_signed_document"
|
|
7753
8895
|
],
|
|
7754
8896
|
"is_active": true,
|
|
8897
|
+
"is_held": false,
|
|
8898
|
+
"held_since": null,
|
|
7755
8899
|
"signing_enabled": true,
|
|
7756
8900
|
"created_at": "2026-10-01T12:00:00Z",
|
|
7757
8901
|
"updated_at": "2026-10-01T12:00:00Z"
|
|
@@ -7890,15 +9034,18 @@ Retrieve one webhook endpoint. Requires the `account:read` OAuth scope.
|
|
|
7890
9034
|
```json
|
|
7891
9035
|
{
|
|
7892
9036
|
"data": {
|
|
7893
|
-
"
|
|
9037
|
+
"resource": "activity_event_subscription",
|
|
9038
|
+
"id": "example_id_41",
|
|
7894
9039
|
"name": "ERP",
|
|
7895
|
-
"url": "https://example.com/example-url-
|
|
9040
|
+
"url": "https://example.com/example-url-19",
|
|
7896
9041
|
"email": "user12@example.com",
|
|
7897
9042
|
"events": [
|
|
7898
9043
|
"document_ready",
|
|
7899
9044
|
"signer_signed_document"
|
|
7900
9045
|
],
|
|
7901
9046
|
"is_active": true,
|
|
9047
|
+
"is_held": false,
|
|
9048
|
+
"held_since": null,
|
|
7902
9049
|
"signing_enabled": true,
|
|
7903
9050
|
"created_at": "2026-10-01T12:00:00Z",
|
|
7904
9051
|
"updated_at": "2026-10-01T12:00:00Z"
|
|
@@ -7942,7 +9089,7 @@ Retrieve one webhook endpoint. Requires the `account:read` OAuth scope.
|
|
|
7942
9089
|
|
|
7943
9090
|
`PUT /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}`
|
|
7944
9091
|
|
|
7945
|
-
Change a webhook endpoint. Only the fields sent are updated; `url` cannot be one another endpoint of the workspace already uses (`400`). Setting `signing_enabled` to `true` generates a secret if the endpoint has none and keeps the current one otherwise; setting it to `false` discards the secret. Requires the `webhooks:write` OAuth scope.
|
|
9092
|
+
Change a webhook endpoint. Only the fields sent are updated; `url` cannot be one another endpoint of the workspace already uses, nor point to a private or reserved address (`400`). Setting `signing_enabled` to `true` generates a secret if the endpoint has none and keeps the current one otherwise; setting it to `false` discards the secret. When this request turns signing on, the new secret is returned once, as `secret` in this response, as on create; otherwise `secret` is absent. Requires the `webhooks:write` OAuth scope.
|
|
7946
9093
|
|
|
7947
9094
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7948
9095
|
|
|
@@ -7968,7 +9115,7 @@ Example:
|
|
|
7968
9115
|
|
|
7969
9116
|
```json
|
|
7970
9117
|
{
|
|
7971
|
-
"url": "https://example.com/example-url-
|
|
9118
|
+
"url": "https://example.com/example-url-19",
|
|
7972
9119
|
"email": "user12@example.com",
|
|
7973
9120
|
"events": [
|
|
7974
9121
|
"document_ready"
|
|
@@ -7986,15 +9133,19 @@ Example:
|
|
|
7986
9133
|
```json
|
|
7987
9134
|
{
|
|
7988
9135
|
"data": {
|
|
7989
|
-
"
|
|
9136
|
+
"secret": "example_secret",
|
|
9137
|
+
"resource": "activity_event_subscription",
|
|
9138
|
+
"id": "example_id_41",
|
|
7990
9139
|
"name": "ERP",
|
|
7991
|
-
"url": "https://example.com/example-url-
|
|
9140
|
+
"url": "https://example.com/example-url-19",
|
|
7992
9141
|
"email": "user12@example.com",
|
|
7993
9142
|
"events": [
|
|
7994
9143
|
"document_ready",
|
|
7995
9144
|
"signer_signed_document"
|
|
7996
9145
|
],
|
|
7997
9146
|
"is_active": true,
|
|
9147
|
+
"is_held": false,
|
|
9148
|
+
"held_since": null,
|
|
7998
9149
|
"signing_enabled": true,
|
|
7999
9150
|
"created_at": "2026-10-01T12:00:00Z",
|
|
8000
9151
|
"updated_at": "2026-10-01T12:00:00Z"
|
|
@@ -8105,7 +9256,7 @@ Stop delivering events to an endpoint and free its slot. Requires the `webhooks:
|
|
|
8105
9256
|
|
|
8106
9257
|
`GET /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret`
|
|
8107
9258
|
|
|
8108
|
-
Return the secret used to sign deliveries to this endpoint (see **Webhook Payloads → Verifying signatures**). Returns `400` when signing is disabled. Not available to OAuth applications
|
|
9259
|
+
Return the secret used to sign deliveries to this endpoint (see **Webhook Payloads → Verifying signatures**). Returns `400` when signing is disabled. Not available to OAuth applications: they receive a secret only when one is generated, in the **Create webhook endpoint** or **Update webhook endpoint** response (when that request turns signing on) or from **Rotate webhook endpoint signing secret**.
|
|
8109
9260
|
|
|
8110
9261
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
8111
9262
|
|
|
@@ -8174,7 +9325,7 @@ Return the secret used to sign deliveries to this endpoint (see **Webhook Payloa
|
|
|
8174
9325
|
|
|
8175
9326
|
`POST /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret/rotate`
|
|
8176
9327
|
|
|
8177
|
-
Replace the endpoint's signing secret and return the new one. The old secret stops working immediately, so update your receiver right away. Returns `400` when signing is disabled.
|
|
9328
|
+
Replace the endpoint's signing secret and return the new one. The old secret stops working immediately, so update your receiver right away. Returns `400` when signing is disabled. Requires the `webhooks:write` OAuth scope.
|
|
8178
9329
|
|
|
8179
9330
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
8180
9331
|
|