@assinafy/cli 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +1 -1
- package/README.en.md +24 -3
- package/README.md +22 -2
- package/dist/api.cjs +124 -29
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +124 -29
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +606 -418
- package/dist/types/api/client.d.ts.map +1 -1
- package/dist/types/api/resources/assignments.d.ts +7 -1
- package/dist/types/api/resources/assignments.d.ts.map +1 -1
- package/dist/types/api/resources/documents.d.ts.map +1 -1
- package/dist/types/api/resources/signer-documents.d.ts +24 -11
- package/dist/types/api/resources/signer-documents.d.ts.map +1 -1
- package/dist/types/api/resources/webhooks.d.ts +10 -5
- package/dist/types/api/resources/webhooks.d.ts.map +1 -1
- package/dist/types/api/support/webhook-verifier.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +87 -4
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/api/utils.d.ts.map +1 -1
- package/docs/README.md +1 -1
- package/docs/api-operations.json +49 -1
- package/docs/api-reference.md +464 -45
- package/docs/assignments.md +67 -9
- package/docs/sdk-reference.md +86 -11
- package/docs/signer.md +27 -0
- package/docs/signers.md +14 -12
- package/docs/webhooks.md +18 -2
- package/package.json +1 -1
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: 112
|
|
10
|
+
- Contract SHA-256: `da98836f863bccd621c104499c96621e67f12016538398c3496859db5f049b75`
|
|
11
11
|
|
|
12
12
|
## Accounts
|
|
13
13
|
|
|
@@ -1023,6 +1023,7 @@ The supported document statuses and whether a document in each status can be del
|
|
|
1023
1023
|
| `certificated` | no | The document is certificated. |
|
|
1024
1024
|
| `rejected_by_signer` | yes | A signer declined signing the document. |
|
|
1025
1025
|
| `pending_signature` | yes | The document is waiting for signatures. |
|
|
1026
|
+
| `pending_identity_review` | yes | Every signer has signed; the document waits for the account to review a signer's identity before it is certificated. Deleting it cancels it and notifies the signers. |
|
|
1026
1027
|
| `rejected_by_user` | yes | The signature process was cancelled by a user. |
|
|
1027
1028
|
| `failed` | yes | The document processing has failed. |
|
|
1028
1029
|
|
|
@@ -2023,6 +2024,7 @@ List the assignments belonging to the authenticated user's current account.
|
|
|
2023
2024
|
],
|
|
2024
2025
|
"step": 1,
|
|
2025
2026
|
"notified": null,
|
|
2027
|
+
"identity_verification_status": "InReview",
|
|
2026
2028
|
"completed": null,
|
|
2027
2029
|
"notification_history": null,
|
|
2028
2030
|
"resource": "signer",
|
|
@@ -2822,6 +2824,7 @@ Example:
|
|
|
2822
2824
|
],
|
|
2823
2825
|
"step": 1,
|
|
2824
2826
|
"notified": null,
|
|
2827
|
+
"identity_verification_status": "InReview",
|
|
2825
2828
|
"completed": null,
|
|
2826
2829
|
"notification_history": null,
|
|
2827
2830
|
"resource": "signer",
|
|
@@ -2906,6 +2909,240 @@ Example:
|
|
|
2906
2909
|
}
|
|
2907
2910
|
```
|
|
2908
2911
|
|
|
2912
|
+
### Signer identity review
|
|
2913
|
+
|
|
2914
|
+
`GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification`
|
|
2915
|
+
|
|
2916
|
+
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).
|
|
2917
|
+
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.
|
|
2918
|
+
|
|
2919
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
2920
|
+
|
|
2921
|
+
#### Parameters
|
|
2922
|
+
|
|
2923
|
+
| Name | In | Type | Required | Description |
|
|
2924
|
+
|---|---|---|---|---|
|
|
2925
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
2926
|
+
| `assignmentId` | path | string | yes | The assignment ID. |
|
|
2927
|
+
| `signerId` | path | string | yes | The signer ID. |
|
|
2928
|
+
|
|
2929
|
+
#### Responses
|
|
2930
|
+
|
|
2931
|
+
##### 200 — Identity review
|
|
2932
|
+
|
|
2933
|
+
```json
|
|
2934
|
+
{
|
|
2935
|
+
"data": {
|
|
2936
|
+
"id": "example_id_26",
|
|
2937
|
+
"status": "InReview",
|
|
2938
|
+
"provider": "AssinafyVerify",
|
|
2939
|
+
"verification_method": "IdDocumentFaceMatchBasic",
|
|
2940
|
+
"reason_codes": [
|
|
2941
|
+
{
|
|
2942
|
+
"code": "NAME_MISMATCH",
|
|
2943
|
+
"description": "Nome no documento difere do cadastrado (similaridade 52%)"
|
|
2944
|
+
}
|
|
2945
|
+
],
|
|
2946
|
+
"evidence_available": true,
|
|
2947
|
+
"expected": null,
|
|
2948
|
+
"document": null,
|
|
2949
|
+
"matches": null,
|
|
2950
|
+
"checks": [
|
|
2951
|
+
{
|
|
2952
|
+
"name": "name",
|
|
2953
|
+
"result": "review",
|
|
2954
|
+
"score": 0.5217,
|
|
2955
|
+
"reasons": [
|
|
2956
|
+
"NAME_MISMATCH"
|
|
2957
|
+
]
|
|
2958
|
+
}
|
|
2959
|
+
],
|
|
2960
|
+
"images": [
|
|
2961
|
+
"document_front",
|
|
2962
|
+
"document_back",
|
|
2963
|
+
"face"
|
|
2964
|
+
],
|
|
2965
|
+
"ruleset_version": "2026-10-12.2",
|
|
2966
|
+
"evidence_sha256": "9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2",
|
|
2967
|
+
"reviewed_by": null,
|
|
2968
|
+
"reviewed_at": "2026-10-13T21:05:00Z",
|
|
2969
|
+
"review_note": "Conferido por videochamada.",
|
|
2970
|
+
"completed_at": "2026-10-13T21:05:00Z"
|
|
2971
|
+
},
|
|
2972
|
+
"status": 200,
|
|
2973
|
+
"message": ""
|
|
2974
|
+
}
|
|
2975
|
+
```
|
|
2976
|
+
|
|
2977
|
+
##### 404 — Assignment, signer or verification not found.
|
|
2978
|
+
|
|
2979
|
+
##### 401 — Missing or invalid credentials.
|
|
2980
|
+
|
|
2981
|
+
```json
|
|
2982
|
+
{
|
|
2983
|
+
"status": 401,
|
|
2984
|
+
"message": "Bad request.",
|
|
2985
|
+
"data": null
|
|
2986
|
+
}
|
|
2987
|
+
```
|
|
2988
|
+
|
|
2989
|
+
##### 500 — Unexpected server error.
|
|
2990
|
+
|
|
2991
|
+
```json
|
|
2992
|
+
{
|
|
2993
|
+
"status": 500,
|
|
2994
|
+
"message": "Bad request.",
|
|
2995
|
+
"data": null
|
|
2996
|
+
}
|
|
2997
|
+
```
|
|
2998
|
+
|
|
2999
|
+
### Signer identity review image
|
|
3000
|
+
|
|
3001
|
+
`GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/images/{name}`
|
|
3002
|
+
|
|
3003
|
+
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`.
|
|
3004
|
+
|
|
3005
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
3006
|
+
|
|
3007
|
+
#### Parameters
|
|
3008
|
+
|
|
3009
|
+
| Name | In | Type | Required | Description |
|
|
3010
|
+
|---|---|---|---|---|
|
|
3011
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
3012
|
+
| `assignmentId` | path | string | yes | The assignment ID. |
|
|
3013
|
+
| `signerId` | path | string | yes | The signer ID. |
|
|
3014
|
+
| `name` | path | string | yes | The image, as listed in the review's `images`. |
|
|
3015
|
+
|
|
3016
|
+
#### Responses
|
|
3017
|
+
|
|
3018
|
+
##### 200 — The image bytes (`image/jpeg`, `image/png`) or the document PDF (`application/pdf`). Sent with `Cache-Control: no-store`.
|
|
3019
|
+
|
|
3020
|
+
##### 404 — Assignment, signer or verification not found, the review is not open, or there is no such image.
|
|
3021
|
+
|
|
3022
|
+
##### 401 — Missing or invalid credentials.
|
|
3023
|
+
|
|
3024
|
+
```json
|
|
3025
|
+
{
|
|
3026
|
+
"status": 401,
|
|
3027
|
+
"message": "Bad request.",
|
|
3028
|
+
"data": null
|
|
3029
|
+
}
|
|
3030
|
+
```
|
|
3031
|
+
|
|
3032
|
+
##### 500 — Unexpected server error.
|
|
3033
|
+
|
|
3034
|
+
```json
|
|
3035
|
+
{
|
|
3036
|
+
"status": 500,
|
|
3037
|
+
"message": "Bad request.",
|
|
3038
|
+
"data": null
|
|
3039
|
+
}
|
|
3040
|
+
```
|
|
3041
|
+
|
|
3042
|
+
### Decide signer identity review
|
|
3043
|
+
|
|
3044
|
+
`POST /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/review`
|
|
3045
|
+
|
|
3046
|
+
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.
|
|
3047
|
+
|
|
3048
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
3049
|
+
|
|
3050
|
+
#### Parameters
|
|
3051
|
+
|
|
3052
|
+
| Name | In | Type | Required | Description |
|
|
3053
|
+
|---|---|---|---|---|
|
|
3054
|
+
| `documentId` | path | string | yes | Document ID. |
|
|
3055
|
+
| `assignmentId` | path | string | yes | The assignment ID. |
|
|
3056
|
+
| `signerId` | path | string | yes | The signer ID. |
|
|
3057
|
+
|
|
3058
|
+
#### Request Body (required)
|
|
3059
|
+
|
|
3060
|
+
Fields (`application/json`):
|
|
3061
|
+
|
|
3062
|
+
- `decision` (string, required)
|
|
3063
|
+
- `note` (string | null) — Optional. Recorded in the activity log and sent to the provider; never shown to the signer.
|
|
3064
|
+
|
|
3065
|
+
Example:
|
|
3066
|
+
|
|
3067
|
+
```json
|
|
3068
|
+
{
|
|
3069
|
+
"decision": "Approved",
|
|
3070
|
+
"note": "Conferido por videochamada."
|
|
3071
|
+
}
|
|
3072
|
+
```
|
|
3073
|
+
|
|
3074
|
+
#### Responses
|
|
3075
|
+
|
|
3076
|
+
##### 200 — Decided
|
|
3077
|
+
|
|
3078
|
+
```json
|
|
3079
|
+
{
|
|
3080
|
+
"data": {
|
|
3081
|
+
"id": "example_id_26",
|
|
3082
|
+
"status": "InReview",
|
|
3083
|
+
"provider": "AssinafyVerify",
|
|
3084
|
+
"verification_method": "IdDocumentFaceMatchBasic",
|
|
3085
|
+
"reason_codes": [
|
|
3086
|
+
{
|
|
3087
|
+
"code": "NAME_MISMATCH",
|
|
3088
|
+
"description": "Nome no documento difere do cadastrado (similaridade 52%)"
|
|
3089
|
+
}
|
|
3090
|
+
],
|
|
3091
|
+
"evidence_available": true,
|
|
3092
|
+
"expected": null,
|
|
3093
|
+
"document": null,
|
|
3094
|
+
"matches": null,
|
|
3095
|
+
"checks": [
|
|
3096
|
+
{
|
|
3097
|
+
"name": "name",
|
|
3098
|
+
"result": "review",
|
|
3099
|
+
"score": 0.5217,
|
|
3100
|
+
"reasons": [
|
|
3101
|
+
"NAME_MISMATCH"
|
|
3102
|
+
]
|
|
3103
|
+
}
|
|
3104
|
+
],
|
|
3105
|
+
"images": [
|
|
3106
|
+
"document_front",
|
|
3107
|
+
"document_back",
|
|
3108
|
+
"face"
|
|
3109
|
+
],
|
|
3110
|
+
"ruleset_version": "2026-10-12.2",
|
|
3111
|
+
"evidence_sha256": "9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2",
|
|
3112
|
+
"reviewed_by": null,
|
|
3113
|
+
"reviewed_at": "2026-10-13T21:05:00Z",
|
|
3114
|
+
"review_note": "Conferido por videochamada.",
|
|
3115
|
+
"completed_at": "2026-10-13T21:05:00Z"
|
|
3116
|
+
},
|
|
3117
|
+
"status": 200,
|
|
3118
|
+
"message": ""
|
|
3119
|
+
}
|
|
3120
|
+
```
|
|
3121
|
+
|
|
3122
|
+
##### 400 — Invalid decision, the verification is not `InReview`, or the document is no longer awaiting signatures.
|
|
3123
|
+
|
|
3124
|
+
##### 404 — Assignment, signer or verification not found.
|
|
3125
|
+
|
|
3126
|
+
##### 401 — Missing or invalid credentials.
|
|
3127
|
+
|
|
3128
|
+
```json
|
|
3129
|
+
{
|
|
3130
|
+
"status": 401,
|
|
3131
|
+
"message": "Bad request.",
|
|
3132
|
+
"data": null
|
|
3133
|
+
}
|
|
3134
|
+
```
|
|
3135
|
+
|
|
3136
|
+
##### 500 — Unexpected server error.
|
|
3137
|
+
|
|
3138
|
+
```json
|
|
3139
|
+
{
|
|
3140
|
+
"status": 500,
|
|
3141
|
+
"message": "Bad request.",
|
|
3142
|
+
"data": null
|
|
3143
|
+
}
|
|
3144
|
+
```
|
|
3145
|
+
|
|
2909
3146
|
### List WhatsApp notifications
|
|
2910
3147
|
|
|
2911
3148
|
`GET /v1/documents/{documentId}/assignments/{assignmentId}/whatsapp-notifications`
|
|
@@ -2938,7 +3175,7 @@ List all WhatsApp notification messages sent for an assignment. The response inc
|
|
|
2938
3175
|
}
|
|
2939
3176
|
],
|
|
2940
3177
|
"phone_number": "+5500000000000",
|
|
2941
|
-
"signer_id": "
|
|
3178
|
+
"signer_id": "example_id_27"
|
|
2942
3179
|
}
|
|
2943
3180
|
],
|
|
2944
3181
|
"status": 200,
|
|
@@ -3001,7 +3238,7 @@ Example:
|
|
|
3001
3238
|
"data": {
|
|
3002
3239
|
"access_token": "example_credential",
|
|
3003
3240
|
"user": {
|
|
3004
|
-
"id": "
|
|
3241
|
+
"id": "example_id_28",
|
|
3005
3242
|
"name": "John Smith",
|
|
3006
3243
|
"email": "user8@example.com",
|
|
3007
3244
|
"telephone": "+5500000000000",
|
|
@@ -3257,7 +3494,7 @@ Example:
|
|
|
3257
3494
|
"data": {
|
|
3258
3495
|
"access_token": "example_credential",
|
|
3259
3496
|
"user": {
|
|
3260
|
-
"id": "
|
|
3497
|
+
"id": "example_id_28",
|
|
3261
3498
|
"name": "John Smith",
|
|
3262
3499
|
"email": "user8@example.com",
|
|
3263
3500
|
"telephone": "+5500000000000",
|
|
@@ -3323,7 +3560,7 @@ The authenticated user's enrolled two-factor methods and how many recovery codes
|
|
|
3323
3560
|
"data": {
|
|
3324
3561
|
"methods": [
|
|
3325
3562
|
{
|
|
3326
|
-
"id": "
|
|
3563
|
+
"id": "example_id_29",
|
|
3327
3564
|
"type": "Totp",
|
|
3328
3565
|
"label": "My phone",
|
|
3329
3566
|
"confirmed_at": "2026-09-09T14:21:03Z",
|
|
@@ -3386,7 +3623,7 @@ Example:
|
|
|
3386
3623
|
```json
|
|
3387
3624
|
{
|
|
3388
3625
|
"data": {
|
|
3389
|
-
"id": "
|
|
3626
|
+
"id": "example_id_29",
|
|
3390
3627
|
"secret": "example_secret",
|
|
3391
3628
|
"provisioning_uri": "https://example.com/example-url-11"
|
|
3392
3629
|
},
|
|
@@ -3436,7 +3673,7 @@ Example:
|
|
|
3436
3673
|
|
|
3437
3674
|
```json
|
|
3438
3675
|
{
|
|
3439
|
-
"id": "
|
|
3676
|
+
"id": "example_id_29",
|
|
3440
3677
|
"code": "123456",
|
|
3441
3678
|
"password": "example_secret",
|
|
3442
3679
|
"reauth_code": "string"
|
|
@@ -3688,7 +3925,7 @@ Example:
|
|
|
3688
3925
|
"data": {
|
|
3689
3926
|
"access_token": "example_credential",
|
|
3690
3927
|
"user": {
|
|
3691
|
-
"id": "
|
|
3928
|
+
"id": "example_id_28",
|
|
3692
3929
|
"name": "John Smith",
|
|
3693
3930
|
"email": "user8@example.com",
|
|
3694
3931
|
"telephone": "+5500000000000",
|
|
@@ -4391,7 +4628,7 @@ Example:
|
|
|
4391
4628
|
```json
|
|
4392
4629
|
[
|
|
4393
4630
|
{
|
|
4394
|
-
"field_id": "
|
|
4631
|
+
"field_id": "example_id_30",
|
|
4395
4632
|
"value": "1111111111111"
|
|
4396
4633
|
}
|
|
4397
4634
|
]
|
|
@@ -4405,7 +4642,7 @@ Example:
|
|
|
4405
4642
|
{
|
|
4406
4643
|
"data": [
|
|
4407
4644
|
{
|
|
4408
|
-
"field_id": "
|
|
4645
|
+
"field_id": "example_id_30",
|
|
4409
4646
|
"type": "cpf",
|
|
4410
4647
|
"success": false,
|
|
4411
4648
|
"error_message": "Invalid CPF."
|
|
@@ -4712,7 +4949,7 @@ Returns the profile of the user owning the access token.
|
|
|
4712
4949
|
```json
|
|
4713
4950
|
{
|
|
4714
4951
|
"data": {
|
|
4715
|
-
"id": "
|
|
4952
|
+
"id": "example_id_28",
|
|
4716
4953
|
"name": "John Smith",
|
|
4717
4954
|
"email": "user8@example.com",
|
|
4718
4955
|
"telephone": "+5500000000000",
|
|
@@ -4917,7 +5154,7 @@ Claims about the user who authorized this token. Requires the openid scope; name
|
|
|
4917
5154
|
|
|
4918
5155
|
```json
|
|
4919
5156
|
{
|
|
4920
|
-
"sub": "
|
|
5157
|
+
"sub": "example_id_31",
|
|
4921
5158
|
"name": "Maria Silva",
|
|
4922
5159
|
"email": null,
|
|
4923
5160
|
"email_verified": null
|
|
@@ -5117,7 +5354,7 @@ Example:
|
|
|
5117
5354
|
"data": {
|
|
5118
5355
|
"document": {
|
|
5119
5356
|
"resource": "document",
|
|
5120
|
-
"id": "
|
|
5357
|
+
"id": "example_id_32",
|
|
5121
5358
|
"name": "Contract.pdf",
|
|
5122
5359
|
"page_count": 3,
|
|
5123
5360
|
"created_by": "Jane Doe"
|
|
@@ -5164,7 +5401,7 @@ Example:
|
|
|
5164
5401
|
|
|
5165
5402
|
`GET /v1/signers/self`
|
|
5166
5403
|
|
|
5167
|
-
Return the signer identified by the signer access code, including the `has_signature`/`has_initial`/`is_signature_reusable` flags.
|
|
5404
|
+
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.
|
|
5168
5405
|
|
|
5169
5406
|
**Authentication:** signer access code (`access_code` query parameter).
|
|
5170
5407
|
|
|
@@ -5178,6 +5415,7 @@ Return the signer identified by the signer access code, including the `has_signa
|
|
|
5178
5415
|
"has_signature": true,
|
|
5179
5416
|
"has_initial": false,
|
|
5180
5417
|
"is_signature_reusable": false,
|
|
5418
|
+
"verification_method": "Email",
|
|
5181
5419
|
"resource": "signer",
|
|
5182
5420
|
"id": "example_id_14",
|
|
5183
5421
|
"full_name": "Example User",
|
|
@@ -5211,6 +5449,118 @@ Return the signer identified by the signer access code, including the `has_signa
|
|
|
5211
5449
|
}
|
|
5212
5450
|
```
|
|
5213
5451
|
|
|
5452
|
+
### Identity document verification status
|
|
5453
|
+
|
|
5454
|
+
`GET /v1/signers/identity-verification`
|
|
5455
|
+
|
|
5456
|
+
Current state of the signer's identity document verification. Backfills a pending decision from the provider. Uses the signer access code.
|
|
5457
|
+
|
|
5458
|
+
**One live session per signer:** `can_start` is true before a provider session exists, and again once that session is Expired -- the capture link lapsed before anything was submitted, so the signer may open a new one. Once a session is Pending, In Review, Approved, Declined or Abandoned it is false. A signer who reaches Declined or Abandoned cannot restart here; the account must start a whole new process (new document, new assignment).
|
|
5459
|
+
|
|
5460
|
+
**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.
|
|
5461
|
+
|
|
5462
|
+
**Authentication:** signer access code (`access_code` query parameter).
|
|
5463
|
+
|
|
5464
|
+
#### Responses
|
|
5465
|
+
|
|
5466
|
+
##### 200 — Verification state
|
|
5467
|
+
|
|
5468
|
+
```json
|
|
5469
|
+
{
|
|
5470
|
+
"data": {
|
|
5471
|
+
"can_start": false,
|
|
5472
|
+
"status": "Pending",
|
|
5473
|
+
"url": "https://example.com/example-url-13",
|
|
5474
|
+
"expires_at": "2026-10-07T21:18:47Z",
|
|
5475
|
+
"completed_at": "2026-08-10T20:32:00Z"
|
|
5476
|
+
},
|
|
5477
|
+
"status": 200,
|
|
5478
|
+
"message": ""
|
|
5479
|
+
}
|
|
5480
|
+
```
|
|
5481
|
+
|
|
5482
|
+
##### 401 — Missing or invalid credentials.
|
|
5483
|
+
|
|
5484
|
+
```json
|
|
5485
|
+
{
|
|
5486
|
+
"status": 401,
|
|
5487
|
+
"message": "Bad request.",
|
|
5488
|
+
"data": null
|
|
5489
|
+
}
|
|
5490
|
+
```
|
|
5491
|
+
|
|
5492
|
+
##### 500 — Unexpected server error.
|
|
5493
|
+
|
|
5494
|
+
```json
|
|
5495
|
+
{
|
|
5496
|
+
"status": 500,
|
|
5497
|
+
"message": "Bad request.",
|
|
5498
|
+
"data": null
|
|
5499
|
+
}
|
|
5500
|
+
```
|
|
5501
|
+
|
|
5502
|
+
### Start identity document verification
|
|
5503
|
+
|
|
5504
|
+
`POST /v1/signers/identity-verification`
|
|
5505
|
+
|
|
5506
|
+
Records the signer's biometric-processing consent and opens a provider session. Returns the hosted verification URL to redirect to. Uses the signer access code.
|
|
5507
|
+
|
|
5508
|
+
**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).
|
|
5509
|
+
|
|
5510
|
+
**Authentication:** signer access code (`access_code` query parameter).
|
|
5511
|
+
|
|
5512
|
+
#### Request Body (required)
|
|
5513
|
+
|
|
5514
|
+
Fields (`application/json`):
|
|
5515
|
+
|
|
5516
|
+
- `consent` (boolean, required) — Must be true. Explicit consent to biometric processing.
|
|
5517
|
+
|
|
5518
|
+
Example:
|
|
5519
|
+
|
|
5520
|
+
```json
|
|
5521
|
+
{
|
|
5522
|
+
"consent": true
|
|
5523
|
+
}
|
|
5524
|
+
```
|
|
5525
|
+
|
|
5526
|
+
#### Responses
|
|
5527
|
+
|
|
5528
|
+
##### 200 — Session created
|
|
5529
|
+
|
|
5530
|
+
```json
|
|
5531
|
+
{
|
|
5532
|
+
"data": {
|
|
5533
|
+
"id": "example_id_20",
|
|
5534
|
+
"url": "https://example.com/example-url-13",
|
|
5535
|
+
"expires_at": "2026-10-07T21:18:47Z"
|
|
5536
|
+
},
|
|
5537
|
+
"status": 200,
|
|
5538
|
+
"message": ""
|
|
5539
|
+
}
|
|
5540
|
+
```
|
|
5541
|
+
|
|
5542
|
+
##### 400 — Consent missing, or this signer already has a verification session that is not Expired.
|
|
5543
|
+
|
|
5544
|
+
##### 401 — Missing or invalid credentials.
|
|
5545
|
+
|
|
5546
|
+
```json
|
|
5547
|
+
{
|
|
5548
|
+
"status": 401,
|
|
5549
|
+
"message": "Bad request.",
|
|
5550
|
+
"data": null
|
|
5551
|
+
}
|
|
5552
|
+
```
|
|
5553
|
+
|
|
5554
|
+
##### 500 — Unexpected server error.
|
|
5555
|
+
|
|
5556
|
+
```json
|
|
5557
|
+
{
|
|
5558
|
+
"status": 500,
|
|
5559
|
+
"message": "Bad request.",
|
|
5560
|
+
"data": null
|
|
5561
|
+
}
|
|
5562
|
+
```
|
|
5563
|
+
|
|
5214
5564
|
### Get signer's document
|
|
5215
5565
|
|
|
5216
5566
|
`GET /v1/signers/{signerId}/document`
|
|
@@ -5529,8 +5879,8 @@ Example:
|
|
|
5529
5879
|
```json
|
|
5530
5880
|
{
|
|
5531
5881
|
"document_ids": [
|
|
5532
|
-
"
|
|
5533
|
-
"
|
|
5882
|
+
"example_id_33",
|
|
5883
|
+
"example_id_34"
|
|
5534
5884
|
]
|
|
5535
5885
|
}
|
|
5536
5886
|
```
|
|
@@ -5587,8 +5937,8 @@ Example:
|
|
|
5587
5937
|
```json
|
|
5588
5938
|
{
|
|
5589
5939
|
"document_ids": [
|
|
5590
|
-
"
|
|
5591
|
-
"
|
|
5940
|
+
"example_id_33",
|
|
5941
|
+
"example_id_34"
|
|
5592
5942
|
],
|
|
5593
5943
|
"decline_reason": "Unfavorable terms."
|
|
5594
5944
|
}
|
|
@@ -5709,7 +6059,7 @@ Fields (`application/json`):
|
|
|
5709
6059
|
|
|
5710
6060
|
- `full_name` (string)
|
|
5711
6061
|
- `email` (string)
|
|
5712
|
-
- `government_id` (string)
|
|
6062
|
+
- `government_id` (string) — Signer's CPF/CNPJ; digits only on save.
|
|
5713
6063
|
|
|
5714
6064
|
Example:
|
|
5715
6065
|
|
|
@@ -6187,7 +6537,7 @@ Fields (`application/json`):
|
|
|
6187
6537
|
- `full_name` (string, required)
|
|
6188
6538
|
- `email` (string)
|
|
6189
6539
|
- `whatsapp_phone_number` (string) — E.164; normalized on save.
|
|
6190
|
-
- `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.
|
|
6540
|
+
- `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. Required before the signer can use a verification method that identifies them by CPF.
|
|
6191
6541
|
|
|
6192
6542
|
Example:
|
|
6193
6543
|
|
|
@@ -6804,7 +7154,7 @@ The `status` field of a template is one of:
|
|
|
6804
7154
|
"data": [
|
|
6805
7155
|
{
|
|
6806
7156
|
"resource": "template",
|
|
6807
|
-
"id": "
|
|
7157
|
+
"id": "example_id_35",
|
|
6808
7158
|
"name": "template.pdf",
|
|
6809
7159
|
"document_name": null,
|
|
6810
7160
|
"message": null,
|
|
@@ -6907,7 +7257,7 @@ Retrieve the account's oldest webhook endpoint — which events it is subscribed
|
|
|
6907
7257
|
"document_prepared"
|
|
6908
7258
|
],
|
|
6909
7259
|
"is_active": true,
|
|
6910
|
-
"url": "https://example.com/example-url-
|
|
7260
|
+
"url": "https://example.com/example-url-14",
|
|
6911
7261
|
"email": "user11@example.com",
|
|
6912
7262
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
6913
7263
|
},
|
|
@@ -6968,7 +7318,7 @@ Example:
|
|
|
6968
7318
|
"document_prepared"
|
|
6969
7319
|
],
|
|
6970
7320
|
"is_active": true,
|
|
6971
|
-
"url": "https://example.com/example-url-
|
|
7321
|
+
"url": "https://example.com/example-url-14",
|
|
6972
7322
|
"email": "user11@example.com"
|
|
6973
7323
|
}
|
|
6974
7324
|
```
|
|
@@ -6985,7 +7335,7 @@ Example:
|
|
|
6985
7335
|
"document_prepared"
|
|
6986
7336
|
],
|
|
6987
7337
|
"is_active": true,
|
|
6988
|
-
"url": "https://example.com/example-url-
|
|
7338
|
+
"url": "https://example.com/example-url-14",
|
|
6989
7339
|
"email": "user11@example.com",
|
|
6990
7340
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
6991
7341
|
},
|
|
@@ -7050,7 +7400,7 @@ Deactivate the account's oldest webhook endpoint. While inactive, no events are
|
|
|
7050
7400
|
"document_prepared"
|
|
7051
7401
|
],
|
|
7052
7402
|
"is_active": true,
|
|
7053
|
-
"url": "https://example.com/example-url-
|
|
7403
|
+
"url": "https://example.com/example-url-14",
|
|
7054
7404
|
"email": "user11@example.com",
|
|
7055
7405
|
"updated_at": "2023-05-10T14:58:24Z"
|
|
7056
7406
|
},
|
|
@@ -7154,11 +7504,11 @@ Retrieve the delivery history for webhooks sent to the account's endpoints — u
|
|
|
7154
7504
|
"data": [
|
|
7155
7505
|
{
|
|
7156
7506
|
"resource": "activity_dispatching_history",
|
|
7157
|
-
"id": "
|
|
7507
|
+
"id": "example_id_36",
|
|
7158
7508
|
"event": "document_ready",
|
|
7159
7509
|
"activity_id": 456,
|
|
7160
|
-
"endpoint_id": "
|
|
7161
|
-
"endpoint": "https://example.com/example-url-
|
|
7510
|
+
"endpoint_id": "example_id_37",
|
|
7511
|
+
"endpoint": "https://example.com/example-url-15",
|
|
7162
7512
|
"payload": null,
|
|
7163
7513
|
"delivered": true,
|
|
7164
7514
|
"http_status": 200,
|
|
@@ -7216,11 +7566,11 @@ Manually retry a webhook delivery for a specific entry, without waiting for auto
|
|
|
7216
7566
|
{
|
|
7217
7567
|
"data": {
|
|
7218
7568
|
"resource": "activity_dispatching_history",
|
|
7219
|
-
"id": "
|
|
7569
|
+
"id": "example_id_36",
|
|
7220
7570
|
"event": "document_ready",
|
|
7221
7571
|
"activity_id": 456,
|
|
7222
|
-
"endpoint_id": "
|
|
7223
|
-
"endpoint": "https://example.com/example-url-
|
|
7572
|
+
"endpoint_id": "example_id_37",
|
|
7573
|
+
"endpoint": "https://example.com/example-url-15",
|
|
7224
7574
|
"payload": null,
|
|
7225
7575
|
"delivered": true,
|
|
7226
7576
|
"http_status": 200,
|
|
@@ -7287,6 +7637,7 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
|
|
|
7287
7637
|
| Name | In | Type | Required | Description |
|
|
7288
7638
|
|---|---|---|---|---|
|
|
7289
7639
|
| `accountId` | path | string | yes | Workspace account ID. |
|
|
7640
|
+
| `url` | query | string | no | Only the endpoint registered with exactly this URL. |
|
|
7290
7641
|
|
|
7291
7642
|
#### Responses
|
|
7292
7643
|
|
|
@@ -7296,9 +7647,9 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
|
|
|
7296
7647
|
{
|
|
7297
7648
|
"data": [
|
|
7298
7649
|
{
|
|
7299
|
-
"id": "
|
|
7650
|
+
"id": "example_id_37",
|
|
7300
7651
|
"name": "ERP",
|
|
7301
|
-
"url": "https://example.com/example-url-
|
|
7652
|
+
"url": "https://example.com/example-url-16",
|
|
7302
7653
|
"email": "user12@example.com",
|
|
7303
7654
|
"events": [
|
|
7304
7655
|
"document_ready",
|
|
@@ -7339,7 +7690,7 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
|
|
|
7339
7690
|
|
|
7340
7691
|
`POST /v1/accounts/{accountId}/webhooks/endpoints`
|
|
7341
7692
|
|
|
7342
|
-
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
|
|
7693
|
+
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 must delete the endpoint and create a new one. Requires the `webhooks:write` OAuth scope.
|
|
7343
7694
|
|
|
7344
7695
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7345
7696
|
|
|
@@ -7364,7 +7715,7 @@ Example:
|
|
|
7364
7715
|
|
|
7365
7716
|
```json
|
|
7366
7717
|
{
|
|
7367
|
-
"url": "https://example.com/example-url-
|
|
7718
|
+
"url": "https://example.com/example-url-16",
|
|
7368
7719
|
"email": "user12@example.com",
|
|
7369
7720
|
"events": [
|
|
7370
7721
|
"document_ready",
|
|
@@ -7383,9 +7734,10 @@ Example:
|
|
|
7383
7734
|
```json
|
|
7384
7735
|
{
|
|
7385
7736
|
"data": {
|
|
7386
|
-
"
|
|
7737
|
+
"secret": "example_secret",
|
|
7738
|
+
"id": "example_id_37",
|
|
7387
7739
|
"name": "ERP",
|
|
7388
|
-
"url": "https://example.com/example-url-
|
|
7740
|
+
"url": "https://example.com/example-url-16",
|
|
7389
7741
|
"email": "user12@example.com",
|
|
7390
7742
|
"events": [
|
|
7391
7743
|
"document_ready",
|
|
@@ -7441,6 +7793,73 @@ Example:
|
|
|
7441
7793
|
}
|
|
7442
7794
|
```
|
|
7443
7795
|
|
|
7796
|
+
### Delete webhook endpoint by URL
|
|
7797
|
+
|
|
7798
|
+
`DELETE /v1/accounts/{accountId}/webhooks/endpoints`
|
|
7799
|
+
|
|
7800
|
+
Stop delivering events to the endpoint registered with `url` and free its slot, for integrations that keep the URL they registered rather than the endpoint ID. The URL must match exactly as it was registered. Returns `404` when no endpoint of the workspace uses it. Requires the `webhooks:write` OAuth scope.
|
|
7801
|
+
|
|
7802
|
+
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7803
|
+
|
|
7804
|
+
#### Parameters
|
|
7805
|
+
|
|
7806
|
+
| Name | In | Type | Required | Description |
|
|
7807
|
+
|---|---|---|---|---|
|
|
7808
|
+
| `accountId` | path | string | yes | Workspace account ID. |
|
|
7809
|
+
| `url` | query | string | yes | The endpoint's URL. |
|
|
7810
|
+
|
|
7811
|
+
#### Responses
|
|
7812
|
+
|
|
7813
|
+
##### 200 — Endpoint deleted
|
|
7814
|
+
|
|
7815
|
+
```json
|
|
7816
|
+
{
|
|
7817
|
+
"data": [],
|
|
7818
|
+
"status": 200,
|
|
7819
|
+
"message": ""
|
|
7820
|
+
}
|
|
7821
|
+
```
|
|
7822
|
+
|
|
7823
|
+
##### 400 — One or more fields failed validation.
|
|
7824
|
+
|
|
7825
|
+
```json
|
|
7826
|
+
{
|
|
7827
|
+
"status": 400,
|
|
7828
|
+
"message": "Bad request.",
|
|
7829
|
+
"data": null
|
|
7830
|
+
}
|
|
7831
|
+
```
|
|
7832
|
+
|
|
7833
|
+
##### 404 — The requested resource does not exist.
|
|
7834
|
+
|
|
7835
|
+
```json
|
|
7836
|
+
{
|
|
7837
|
+
"status": 404,
|
|
7838
|
+
"message": "Bad request.",
|
|
7839
|
+
"data": null
|
|
7840
|
+
}
|
|
7841
|
+
```
|
|
7842
|
+
|
|
7843
|
+
##### 401 — Missing or invalid credentials.
|
|
7844
|
+
|
|
7845
|
+
```json
|
|
7846
|
+
{
|
|
7847
|
+
"status": 401,
|
|
7848
|
+
"message": "Bad request.",
|
|
7849
|
+
"data": null
|
|
7850
|
+
}
|
|
7851
|
+
```
|
|
7852
|
+
|
|
7853
|
+
##### 500 — Unexpected server error.
|
|
7854
|
+
|
|
7855
|
+
```json
|
|
7856
|
+
{
|
|
7857
|
+
"status": 500,
|
|
7858
|
+
"message": "Bad request.",
|
|
7859
|
+
"data": null
|
|
7860
|
+
}
|
|
7861
|
+
```
|
|
7862
|
+
|
|
7444
7863
|
### Get webhook endpoint
|
|
7445
7864
|
|
|
7446
7865
|
`GET /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}`
|
|
@@ -7463,9 +7882,9 @@ Retrieve one webhook endpoint. Requires the `account:read` OAuth scope.
|
|
|
7463
7882
|
```json
|
|
7464
7883
|
{
|
|
7465
7884
|
"data": {
|
|
7466
|
-
"id": "
|
|
7885
|
+
"id": "example_id_37",
|
|
7467
7886
|
"name": "ERP",
|
|
7468
|
-
"url": "https://example.com/example-url-
|
|
7887
|
+
"url": "https://example.com/example-url-16",
|
|
7469
7888
|
"email": "user12@example.com",
|
|
7470
7889
|
"events": [
|
|
7471
7890
|
"document_ready",
|
|
@@ -7541,7 +7960,7 @@ Example:
|
|
|
7541
7960
|
|
|
7542
7961
|
```json
|
|
7543
7962
|
{
|
|
7544
|
-
"url": "https://example.com/example-url-
|
|
7963
|
+
"url": "https://example.com/example-url-16",
|
|
7545
7964
|
"email": "user12@example.com",
|
|
7546
7965
|
"events": [
|
|
7547
7966
|
"document_ready"
|
|
@@ -7559,9 +7978,9 @@ Example:
|
|
|
7559
7978
|
```json
|
|
7560
7979
|
{
|
|
7561
7980
|
"data": {
|
|
7562
|
-
"id": "
|
|
7981
|
+
"id": "example_id_37",
|
|
7563
7982
|
"name": "ERP",
|
|
7564
|
-
"url": "https://example.com/example-url-
|
|
7983
|
+
"url": "https://example.com/example-url-16",
|
|
7565
7984
|
"email": "user12@example.com",
|
|
7566
7985
|
"events": [
|
|
7567
7986
|
"document_ready",
|
|
@@ -7678,7 +8097,7 @@ Stop delivering events to an endpoint and free its slot. Requires the `webhooks:
|
|
|
7678
8097
|
|
|
7679
8098
|
`GET /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret`
|
|
7680
8099
|
|
|
7681
|
-
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.
|
|
8100
|
+
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, which receive the secret in the **Create webhook endpoint** response instead.
|
|
7682
8101
|
|
|
7683
8102
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7684
8103
|
|
|
@@ -7747,7 +8166,7 @@ Return the secret used to sign deliveries to this endpoint (see **Webhook Payloa
|
|
|
7747
8166
|
|
|
7748
8167
|
`POST /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret/rotate`
|
|
7749
8168
|
|
|
7750
|
-
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. Not available to OAuth applications.
|
|
8169
|
+
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. Not available to OAuth applications, which delete the endpoint and create a new one instead.
|
|
7751
8170
|
|
|
7752
8171
|
**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
|
|
7753
8172
|
|