@assinafy/cli 2.5.3 → 2.6.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.
@@ -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: 106
10
- - Contract SHA-256: `c4913641cd4881b515b5b7ad1a180c393c321d97fd74fff73080618c8b130ecf`
9
+ - Operations: 112
10
+ - Contract SHA-256: `9bab4f24766a343c80c7176478c7b573ad1f1bf9ff83e82e105bf38b3d166df9`
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",
@@ -2552,8 +2554,16 @@ Per-unit costs (in credits) used to build the estimate:
2552
2554
  | Email notification | 0 credits |
2553
2555
  | WhatsApp notification | 0.45 credits |
2554
2556
  | Digital certificate signature (per signer) | 0.5 credits |
2557
+ | Identity document verification (per signer) | depends on the plan, see the table below |
2555
2558
 
2556
- Verification methods are not priced separately — every line in the `breakdown` is a notification or a signature. A `Whatsapp`-verified signer therefore shows up as a WhatsApp notification, because that channel is mandatory for that verification method. A `DigitalCertificate` signer adds the digital-certificate signature cost **on top of** its notification cost; it appears in the `breakdown` under the `SignatureDigitalCertificate` code.
2559
+ | Plan | Price per signer |
2560
+ |------|------------------|
2561
+ | Free | 1.5 credits |
2562
+ | Standard | 1 credit |
2563
+ | Pro | 0.5 credits |
2564
+ | Other plans and enterprise contracts | 0.25 credits |
2565
+
2566
+ `Email` and `Whatsapp` verification are not priced separately — their only line in the `breakdown` is their notification. A `Whatsapp`-verified signer therefore shows up as a WhatsApp notification, because that channel is mandatory for that verification method. A `DigitalCertificate` signer adds the digital-certificate signature cost **on top of** its notification cost; it appears in the `breakdown` under the `SignatureDigitalCertificate` code. An `IdDocumentFaceMatchBasic` signer likewise adds your plan's verification price on top of its notification, under the `VerificationIdDocumentFaceMatchBasic` code.
2557
2567
 
2558
2568
  **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
2559
2569
 
@@ -2822,6 +2832,7 @@ Example:
2822
2832
  ],
2823
2833
  "step": 1,
2824
2834
  "notified": null,
2835
+ "identity_verification_status": "InReview",
2825
2836
  "completed": null,
2826
2837
  "notification_history": null,
2827
2838
  "resource": "signer",
@@ -2906,6 +2917,240 @@ Example:
2906
2917
  }
2907
2918
  ```
2908
2919
 
2920
+ ### Signer identity review
2921
+
2922
+ `GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification`
2923
+
2924
+ 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.
2926
+
2927
+ **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
2928
+
2929
+ #### Parameters
2930
+
2931
+ | Name | In | Type | Required | Description |
2932
+ |---|---|---|---|---|
2933
+ | `documentId` | path | string | yes | Document ID. |
2934
+ | `assignmentId` | path | string | yes | The assignment ID. |
2935
+ | `signerId` | path | string | yes | The signer ID. |
2936
+
2937
+ #### Responses
2938
+
2939
+ ##### 200 — Identity review
2940
+
2941
+ ```json
2942
+ {
2943
+ "data": {
2944
+ "id": "example_id_26",
2945
+ "status": "InReview",
2946
+ "provider": "AssinafyVerify",
2947
+ "verification_method": "IdDocumentFaceMatchBasic",
2948
+ "reason_codes": [
2949
+ {
2950
+ "code": "NAME_MISMATCH",
2951
+ "description": "Nome no documento difere do cadastrado (similaridade 52%)"
2952
+ }
2953
+ ],
2954
+ "evidence_available": true,
2955
+ "expected": null,
2956
+ "document": null,
2957
+ "matches": null,
2958
+ "checks": [
2959
+ {
2960
+ "name": "name",
2961
+ "result": "review",
2962
+ "score": 0.5217,
2963
+ "reasons": [
2964
+ "NAME_MISMATCH"
2965
+ ]
2966
+ }
2967
+ ],
2968
+ "images": [
2969
+ "document_front",
2970
+ "document_back",
2971
+ "face"
2972
+ ],
2973
+ "ruleset_version": "2026-10-12.2",
2974
+ "evidence_sha256": "9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2",
2975
+ "reviewed_by": null,
2976
+ "reviewed_at": "2026-10-13T21:05:00Z",
2977
+ "review_note": "Conferido por videochamada.",
2978
+ "completed_at": "2026-10-13T21:05:00Z"
2979
+ },
2980
+ "status": 200,
2981
+ "message": ""
2982
+ }
2983
+ ```
2984
+
2985
+ ##### 404 — Assignment, signer or verification not found.
2986
+
2987
+ ##### 401 — Missing or invalid credentials.
2988
+
2989
+ ```json
2990
+ {
2991
+ "status": 401,
2992
+ "message": "Bad request.",
2993
+ "data": null
2994
+ }
2995
+ ```
2996
+
2997
+ ##### 500 — Unexpected server error.
2998
+
2999
+ ```json
3000
+ {
3001
+ "status": 500,
3002
+ "message": "Bad request.",
3003
+ "data": null
3004
+ }
3005
+ ```
3006
+
3007
+ ### Signer identity review image
3008
+
3009
+ `GET /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/images/{name}`
3010
+
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`.
3012
+
3013
+ **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
3014
+
3015
+ #### Parameters
3016
+
3017
+ | Name | In | Type | Required | Description |
3018
+ |---|---|---|---|---|
3019
+ | `documentId` | path | string | yes | Document ID. |
3020
+ | `assignmentId` | path | string | yes | The assignment ID. |
3021
+ | `signerId` | path | string | yes | The signer ID. |
3022
+ | `name` | path | string | yes | The image, as listed in the review's `images`. |
3023
+
3024
+ #### Responses
3025
+
3026
+ ##### 200 — The image bytes (`image/jpeg`, `image/png`) or the document PDF (`application/pdf`). Sent with `Cache-Control: no-store`.
3027
+
3028
+ ##### 404 — Assignment, signer or verification not found, the review is not open, or there is no such image.
3029
+
3030
+ ##### 401 — Missing or invalid credentials.
3031
+
3032
+ ```json
3033
+ {
3034
+ "status": 401,
3035
+ "message": "Bad request.",
3036
+ "data": null
3037
+ }
3038
+ ```
3039
+
3040
+ ##### 500 — Unexpected server error.
3041
+
3042
+ ```json
3043
+ {
3044
+ "status": 500,
3045
+ "message": "Bad request.",
3046
+ "data": null
3047
+ }
3048
+ ```
3049
+
3050
+ ### Decide signer identity review
3051
+
3052
+ `POST /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/identity-verification/review`
3053
+
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.
3055
+
3056
+ **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
3057
+
3058
+ #### Parameters
3059
+
3060
+ | Name | In | Type | Required | Description |
3061
+ |---|---|---|---|---|
3062
+ | `documentId` | path | string | yes | Document ID. |
3063
+ | `assignmentId` | path | string | yes | The assignment ID. |
3064
+ | `signerId` | path | string | yes | The signer ID. |
3065
+
3066
+ #### Request Body (required)
3067
+
3068
+ Fields (`application/json`):
3069
+
3070
+ - `decision` (string, required)
3071
+ - `note` (string | null) — Optional. Recorded in the activity log and sent to the provider; never shown to the signer.
3072
+
3073
+ Example:
3074
+
3075
+ ```json
3076
+ {
3077
+ "decision": "Approved",
3078
+ "note": "Conferido por videochamada."
3079
+ }
3080
+ ```
3081
+
3082
+ #### Responses
3083
+
3084
+ ##### 200 — Decided
3085
+
3086
+ ```json
3087
+ {
3088
+ "data": {
3089
+ "id": "example_id_26",
3090
+ "status": "InReview",
3091
+ "provider": "AssinafyVerify",
3092
+ "verification_method": "IdDocumentFaceMatchBasic",
3093
+ "reason_codes": [
3094
+ {
3095
+ "code": "NAME_MISMATCH",
3096
+ "description": "Nome no documento difere do cadastrado (similaridade 52%)"
3097
+ }
3098
+ ],
3099
+ "evidence_available": true,
3100
+ "expected": null,
3101
+ "document": null,
3102
+ "matches": null,
3103
+ "checks": [
3104
+ {
3105
+ "name": "name",
3106
+ "result": "review",
3107
+ "score": 0.5217,
3108
+ "reasons": [
3109
+ "NAME_MISMATCH"
3110
+ ]
3111
+ }
3112
+ ],
3113
+ "images": [
3114
+ "document_front",
3115
+ "document_back",
3116
+ "face"
3117
+ ],
3118
+ "ruleset_version": "2026-10-12.2",
3119
+ "evidence_sha256": "9f2c0d6e4b1a8c3f5e7d9b0a2c4e6f8a1b3d5f7091e2c4a6b8d0f2e4a6c8e0b2",
3120
+ "reviewed_by": null,
3121
+ "reviewed_at": "2026-10-13T21:05:00Z",
3122
+ "review_note": "Conferido por videochamada.",
3123
+ "completed_at": "2026-10-13T21:05:00Z"
3124
+ },
3125
+ "status": 200,
3126
+ "message": ""
3127
+ }
3128
+ ```
3129
+
3130
+ ##### 400 — Invalid decision, the verification is not `InReview`, or the document is no longer awaiting signatures.
3131
+
3132
+ ##### 404 — Assignment, signer or verification not found.
3133
+
3134
+ ##### 401 — Missing or invalid credentials.
3135
+
3136
+ ```json
3137
+ {
3138
+ "status": 401,
3139
+ "message": "Bad request.",
3140
+ "data": null
3141
+ }
3142
+ ```
3143
+
3144
+ ##### 500 — Unexpected server error.
3145
+
3146
+ ```json
3147
+ {
3148
+ "status": 500,
3149
+ "message": "Bad request.",
3150
+ "data": null
3151
+ }
3152
+ ```
3153
+
2909
3154
  ### List WhatsApp notifications
2910
3155
 
2911
3156
  `GET /v1/documents/{documentId}/assignments/{assignmentId}/whatsapp-notifications`
@@ -2938,7 +3183,7 @@ List all WhatsApp notification messages sent for an assignment. The response inc
2938
3183
  }
2939
3184
  ],
2940
3185
  "phone_number": "+5500000000000",
2941
- "signer_id": "example_id_26"
3186
+ "signer_id": "example_id_27"
2942
3187
  }
2943
3188
  ],
2944
3189
  "status": 200,
@@ -3001,7 +3246,7 @@ Example:
3001
3246
  "data": {
3002
3247
  "access_token": "example_credential",
3003
3248
  "user": {
3004
- "id": "example_id_27",
3249
+ "id": "example_id_28",
3005
3250
  "name": "John Smith",
3006
3251
  "email": "user8@example.com",
3007
3252
  "telephone": "+5500000000000",
@@ -3257,7 +3502,7 @@ Example:
3257
3502
  "data": {
3258
3503
  "access_token": "example_credential",
3259
3504
  "user": {
3260
- "id": "example_id_27",
3505
+ "id": "example_id_28",
3261
3506
  "name": "John Smith",
3262
3507
  "email": "user8@example.com",
3263
3508
  "telephone": "+5500000000000",
@@ -3323,7 +3568,7 @@ The authenticated user's enrolled two-factor methods and how many recovery codes
3323
3568
  "data": {
3324
3569
  "methods": [
3325
3570
  {
3326
- "id": "example_id_28",
3571
+ "id": "example_id_29",
3327
3572
  "type": "Totp",
3328
3573
  "label": "My phone",
3329
3574
  "confirmed_at": "2026-09-09T14:21:03Z",
@@ -3386,7 +3631,7 @@ Example:
3386
3631
  ```json
3387
3632
  {
3388
3633
  "data": {
3389
- "id": "example_id_28",
3634
+ "id": "example_id_29",
3390
3635
  "secret": "example_secret",
3391
3636
  "provisioning_uri": "https://example.com/example-url-11"
3392
3637
  },
@@ -3436,7 +3681,7 @@ Example:
3436
3681
 
3437
3682
  ```json
3438
3683
  {
3439
- "id": "example_id_28",
3684
+ "id": "example_id_29",
3440
3685
  "code": "123456",
3441
3686
  "password": "example_secret",
3442
3687
  "reauth_code": "string"
@@ -3688,7 +3933,7 @@ Example:
3688
3933
  "data": {
3689
3934
  "access_token": "example_credential",
3690
3935
  "user": {
3691
- "id": "example_id_27",
3936
+ "id": "example_id_28",
3692
3937
  "name": "John Smith",
3693
3938
  "email": "user8@example.com",
3694
3939
  "telephone": "+5500000000000",
@@ -4391,7 +4636,7 @@ Example:
4391
4636
  ```json
4392
4637
  [
4393
4638
  {
4394
- "field_id": "example_id_29",
4639
+ "field_id": "example_id_30",
4395
4640
  "value": "1111111111111"
4396
4641
  }
4397
4642
  ]
@@ -4405,7 +4650,7 @@ Example:
4405
4650
  {
4406
4651
  "data": [
4407
4652
  {
4408
- "field_id": "example_id_29",
4653
+ "field_id": "example_id_30",
4409
4654
  "type": "cpf",
4410
4655
  "success": false,
4411
4656
  "error_message": "Invalid CPF."
@@ -4712,7 +4957,7 @@ Returns the profile of the user owning the access token.
4712
4957
  ```json
4713
4958
  {
4714
4959
  "data": {
4715
- "id": "example_id_27",
4960
+ "id": "example_id_28",
4716
4961
  "name": "John Smith",
4717
4962
  "email": "user8@example.com",
4718
4963
  "telephone": "+5500000000000",
@@ -4917,7 +5162,7 @@ Claims about the user who authorized this token. Requires the openid scope; name
4917
5162
 
4918
5163
  ```json
4919
5164
  {
4920
- "sub": "example_id_30",
5165
+ "sub": "example_id_31",
4921
5166
  "name": "Maria Silva",
4922
5167
  "email": null,
4923
5168
  "email_verified": null
@@ -5117,7 +5362,7 @@ Example:
5117
5362
  "data": {
5118
5363
  "document": {
5119
5364
  "resource": "document",
5120
- "id": "example_id_31",
5365
+ "id": "example_id_32",
5121
5366
  "name": "Contract.pdf",
5122
5367
  "page_count": 3,
5123
5368
  "created_by": "Jane Doe"
@@ -5164,7 +5409,7 @@ Example:
5164
5409
 
5165
5410
  `GET /v1/signers/self`
5166
5411
 
5167
- Return the signer identified by the signer access code, including the `has_signature`/`has_initial`/`is_signature_reusable` flags.
5412
+ 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
5413
 
5169
5414
  **Authentication:** signer access code (`access_code` query parameter).
5170
5415
 
@@ -5178,6 +5423,7 @@ Return the signer identified by the signer access code, including the `has_signa
5178
5423
  "has_signature": true,
5179
5424
  "has_initial": false,
5180
5425
  "is_signature_reusable": false,
5426
+ "verification_method": "Email",
5181
5427
  "resource": "signer",
5182
5428
  "id": "example_id_14",
5183
5429
  "full_name": "Example User",
@@ -5211,6 +5457,118 @@ Return the signer identified by the signer access code, including the `has_signa
5211
5457
  }
5212
5458
  ```
5213
5459
 
5460
+ ### Identity document verification status
5461
+
5462
+ `GET /v1/signers/identity-verification`
5463
+
5464
+ Current state of the signer's identity document verification. Backfills a pending decision from the provider. Uses the signer access code.
5465
+
5466
+ **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).
5467
+
5468
+ **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
+
5470
+ **Authentication:** signer access code (`access_code` query parameter).
5471
+
5472
+ #### Responses
5473
+
5474
+ ##### 200 — Verification state
5475
+
5476
+ ```json
5477
+ {
5478
+ "data": {
5479
+ "can_start": false,
5480
+ "status": "Pending",
5481
+ "url": "https://example.com/example-url-13",
5482
+ "expires_at": "2026-10-07T21:18:47Z",
5483
+ "completed_at": "2026-08-10T20:32:00Z"
5484
+ },
5485
+ "status": 200,
5486
+ "message": ""
5487
+ }
5488
+ ```
5489
+
5490
+ ##### 401 — Missing or invalid credentials.
5491
+
5492
+ ```json
5493
+ {
5494
+ "status": 401,
5495
+ "message": "Bad request.",
5496
+ "data": null
5497
+ }
5498
+ ```
5499
+
5500
+ ##### 500 — Unexpected server error.
5501
+
5502
+ ```json
5503
+ {
5504
+ "status": 500,
5505
+ "message": "Bad request.",
5506
+ "data": null
5507
+ }
5508
+ ```
5509
+
5510
+ ### Start identity document verification
5511
+
5512
+ `POST /v1/signers/identity-verification`
5513
+
5514
+ 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.
5515
+
5516
+ **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
+
5518
+ **Authentication:** signer access code (`access_code` query parameter).
5519
+
5520
+ #### Request Body (required)
5521
+
5522
+ Fields (`application/json`):
5523
+
5524
+ - `consent` (boolean, required) — Must be true. Explicit consent to biometric processing.
5525
+
5526
+ Example:
5527
+
5528
+ ```json
5529
+ {
5530
+ "consent": true
5531
+ }
5532
+ ```
5533
+
5534
+ #### Responses
5535
+
5536
+ ##### 200 — Session created
5537
+
5538
+ ```json
5539
+ {
5540
+ "data": {
5541
+ "id": "example_id_20",
5542
+ "url": "https://example.com/example-url-13",
5543
+ "expires_at": "2026-10-07T21:18:47Z"
5544
+ },
5545
+ "status": 200,
5546
+ "message": ""
5547
+ }
5548
+ ```
5549
+
5550
+ ##### 400 — Consent missing, or this signer already has a verification session that is not Expired.
5551
+
5552
+ ##### 401 — Missing or invalid credentials.
5553
+
5554
+ ```json
5555
+ {
5556
+ "status": 401,
5557
+ "message": "Bad request.",
5558
+ "data": null
5559
+ }
5560
+ ```
5561
+
5562
+ ##### 500 — Unexpected server error.
5563
+
5564
+ ```json
5565
+ {
5566
+ "status": 500,
5567
+ "message": "Bad request.",
5568
+ "data": null
5569
+ }
5570
+ ```
5571
+
5214
5572
  ### Get signer's document
5215
5573
 
5216
5574
  `GET /v1/signers/{signerId}/document`
@@ -5529,8 +5887,8 @@ Example:
5529
5887
  ```json
5530
5888
  {
5531
5889
  "document_ids": [
5532
- "example_id_32",
5533
- "example_id_33"
5890
+ "example_id_33",
5891
+ "example_id_34"
5534
5892
  ]
5535
5893
  }
5536
5894
  ```
@@ -5587,8 +5945,8 @@ Example:
5587
5945
  ```json
5588
5946
  {
5589
5947
  "document_ids": [
5590
- "example_id_32",
5591
- "example_id_33"
5948
+ "example_id_33",
5949
+ "example_id_34"
5592
5950
  ],
5593
5951
  "decline_reason": "Unfavorable terms."
5594
5952
  }
@@ -5709,7 +6067,7 @@ Fields (`application/json`):
5709
6067
 
5710
6068
  - `full_name` (string)
5711
6069
  - `email` (string)
5712
- - `government_id` (string)
6070
+ - `government_id` (string) — Signer's CPF/CNPJ; digits only on save.
5713
6071
 
5714
6072
  Example:
5715
6073
 
@@ -6187,7 +6545,7 @@ Fields (`application/json`):
6187
6545
  - `full_name` (string, required)
6188
6546
  - `email` (string)
6189
6547
  - `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.
6548
+ - `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
6549
 
6192
6550
  Example:
6193
6551
 
@@ -6804,7 +7162,7 @@ The `status` field of a template is one of:
6804
7162
  "data": [
6805
7163
  {
6806
7164
  "resource": "template",
6807
- "id": "example_id_34",
7165
+ "id": "example_id_35",
6808
7166
  "name": "template.pdf",
6809
7167
  "document_name": null,
6810
7168
  "message": null,
@@ -6907,7 +7265,7 @@ Retrieve the account's oldest webhook endpoint — which events it is subscribed
6907
7265
  "document_prepared"
6908
7266
  ],
6909
7267
  "is_active": true,
6910
- "url": "https://example.com/example-url-13",
7268
+ "url": "https://example.com/example-url-14",
6911
7269
  "email": "user11@example.com",
6912
7270
  "updated_at": "2023-05-10T14:58:24Z"
6913
7271
  },
@@ -6968,7 +7326,7 @@ Example:
6968
7326
  "document_prepared"
6969
7327
  ],
6970
7328
  "is_active": true,
6971
- "url": "https://example.com/example-url-13",
7329
+ "url": "https://example.com/example-url-14",
6972
7330
  "email": "user11@example.com"
6973
7331
  }
6974
7332
  ```
@@ -6985,7 +7343,7 @@ Example:
6985
7343
  "document_prepared"
6986
7344
  ],
6987
7345
  "is_active": true,
6988
- "url": "https://example.com/example-url-13",
7346
+ "url": "https://example.com/example-url-14",
6989
7347
  "email": "user11@example.com",
6990
7348
  "updated_at": "2023-05-10T14:58:24Z"
6991
7349
  },
@@ -7050,7 +7408,7 @@ Deactivate the account's oldest webhook endpoint. While inactive, no events are
7050
7408
  "document_prepared"
7051
7409
  ],
7052
7410
  "is_active": true,
7053
- "url": "https://example.com/example-url-13",
7411
+ "url": "https://example.com/example-url-14",
7054
7412
  "email": "user11@example.com",
7055
7413
  "updated_at": "2023-05-10T14:58:24Z"
7056
7414
  },
@@ -7154,11 +7512,11 @@ Retrieve the delivery history for webhooks sent to the account's endpoints — u
7154
7512
  "data": [
7155
7513
  {
7156
7514
  "resource": "activity_dispatching_history",
7157
- "id": "example_id_35",
7515
+ "id": "example_id_36",
7158
7516
  "event": "document_ready",
7159
7517
  "activity_id": 456,
7160
- "endpoint_id": "example_id_36",
7161
- "endpoint": "https://example.com/example-url-14",
7518
+ "endpoint_id": "example_id_37",
7519
+ "endpoint": "https://example.com/example-url-15",
7162
7520
  "payload": null,
7163
7521
  "delivered": true,
7164
7522
  "http_status": 200,
@@ -7216,11 +7574,11 @@ Manually retry a webhook delivery for a specific entry, without waiting for auto
7216
7574
  {
7217
7575
  "data": {
7218
7576
  "resource": "activity_dispatching_history",
7219
- "id": "example_id_35",
7577
+ "id": "example_id_36",
7220
7578
  "event": "document_ready",
7221
7579
  "activity_id": 456,
7222
- "endpoint_id": "example_id_36",
7223
- "endpoint": "https://example.com/example-url-14",
7580
+ "endpoint_id": "example_id_37",
7581
+ "endpoint": "https://example.com/example-url-15",
7224
7582
  "payload": null,
7225
7583
  "delivered": true,
7226
7584
  "http_status": 200,
@@ -7287,6 +7645,7 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
7287
7645
  | Name | In | Type | Required | Description |
7288
7646
  |---|---|---|---|---|
7289
7647
  | `accountId` | path | string | yes | Workspace account ID. |
7648
+ | `url` | query | string | no | Only the endpoint registered with exactly this URL. |
7290
7649
 
7291
7650
  #### Responses
7292
7651
 
@@ -7296,9 +7655,9 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
7296
7655
  {
7297
7656
  "data": [
7298
7657
  {
7299
- "id": "example_id_36",
7658
+ "id": "example_id_37",
7300
7659
  "name": "ERP",
7301
- "url": "https://example.com/example-url-15",
7660
+ "url": "https://example.com/example-url-16",
7302
7661
  "email": "user12@example.com",
7303
7662
  "events": [
7304
7663
  "document_ready",
@@ -7339,7 +7698,7 @@ List the account's webhook endpoints, oldest first. Requires the `account:read`
7339
7698
 
7340
7699
  `POST /v1/accounts/{accountId}/webhooks/endpoints`
7341
7700
 
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: read it with **Get webhook endpoint signing secret**. Requires the `webhooks:write` OAuth scope.
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 must delete the endpoint and create a new one. Requires the `webhooks:write` OAuth scope.
7343
7702
 
7344
7703
  **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
7345
7704
 
@@ -7364,7 +7723,7 @@ Example:
7364
7723
 
7365
7724
  ```json
7366
7725
  {
7367
- "url": "https://example.com/example-url-15",
7726
+ "url": "https://example.com/example-url-16",
7368
7727
  "email": "user12@example.com",
7369
7728
  "events": [
7370
7729
  "document_ready",
@@ -7383,9 +7742,10 @@ Example:
7383
7742
  ```json
7384
7743
  {
7385
7744
  "data": {
7386
- "id": "example_id_36",
7745
+ "secret": "example_secret",
7746
+ "id": "example_id_37",
7387
7747
  "name": "ERP",
7388
- "url": "https://example.com/example-url-15",
7748
+ "url": "https://example.com/example-url-16",
7389
7749
  "email": "user12@example.com",
7390
7750
  "events": [
7391
7751
  "document_ready",
@@ -7441,6 +7801,73 @@ Example:
7441
7801
  }
7442
7802
  ```
7443
7803
 
7804
+ ### Delete webhook endpoint by URL
7805
+
7806
+ `DELETE /v1/accounts/{accountId}/webhooks/endpoints`
7807
+
7808
+ 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.
7809
+
7810
+ **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
7811
+
7812
+ #### Parameters
7813
+
7814
+ | Name | In | Type | Required | Description |
7815
+ |---|---|---|---|---|
7816
+ | `accountId` | path | string | yes | Workspace account ID. |
7817
+ | `url` | query | string | yes | The endpoint's URL. |
7818
+
7819
+ #### Responses
7820
+
7821
+ ##### 200 — Endpoint deleted
7822
+
7823
+ ```json
7824
+ {
7825
+ "data": [],
7826
+ "status": 200,
7827
+ "message": ""
7828
+ }
7829
+ ```
7830
+
7831
+ ##### 400 — One or more fields failed validation.
7832
+
7833
+ ```json
7834
+ {
7835
+ "status": 400,
7836
+ "message": "Bad request.",
7837
+ "data": null
7838
+ }
7839
+ ```
7840
+
7841
+ ##### 404 — The requested resource does not exist.
7842
+
7843
+ ```json
7844
+ {
7845
+ "status": 404,
7846
+ "message": "Bad request.",
7847
+ "data": null
7848
+ }
7849
+ ```
7850
+
7851
+ ##### 401 — Missing or invalid credentials.
7852
+
7853
+ ```json
7854
+ {
7855
+ "status": 401,
7856
+ "message": "Bad request.",
7857
+ "data": null
7858
+ }
7859
+ ```
7860
+
7861
+ ##### 500 — Unexpected server error.
7862
+
7863
+ ```json
7864
+ {
7865
+ "status": 500,
7866
+ "message": "Bad request.",
7867
+ "data": null
7868
+ }
7869
+ ```
7870
+
7444
7871
  ### Get webhook endpoint
7445
7872
 
7446
7873
  `GET /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}`
@@ -7463,9 +7890,9 @@ Retrieve one webhook endpoint. Requires the `account:read` OAuth scope.
7463
7890
  ```json
7464
7891
  {
7465
7892
  "data": {
7466
- "id": "example_id_36",
7893
+ "id": "example_id_37",
7467
7894
  "name": "ERP",
7468
- "url": "https://example.com/example-url-15",
7895
+ "url": "https://example.com/example-url-16",
7469
7896
  "email": "user12@example.com",
7470
7897
  "events": [
7471
7898
  "document_ready",
@@ -7541,7 +7968,7 @@ Example:
7541
7968
 
7542
7969
  ```json
7543
7970
  {
7544
- "url": "https://example.com/example-url-15",
7971
+ "url": "https://example.com/example-url-16",
7545
7972
  "email": "user12@example.com",
7546
7973
  "events": [
7547
7974
  "document_ready"
@@ -7559,9 +7986,9 @@ Example:
7559
7986
  ```json
7560
7987
  {
7561
7988
  "data": {
7562
- "id": "example_id_36",
7989
+ "id": "example_id_37",
7563
7990
  "name": "ERP",
7564
- "url": "https://example.com/example-url-15",
7991
+ "url": "https://example.com/example-url-16",
7565
7992
  "email": "user12@example.com",
7566
7993
  "events": [
7567
7994
  "document_ready",
@@ -7678,7 +8105,7 @@ Stop delivering events to an endpoint and free its slot. Requires the `webhooks:
7678
8105
 
7679
8106
  `GET /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret`
7680
8107
 
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.
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, which receive the secret in the **Create webhook endpoint** response instead.
7682
8109
 
7683
8110
  **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
7684
8111
 
@@ -7747,7 +8174,7 @@ Return the secret used to sign deliveries to this endpoint (see **Webhook Payloa
7747
8174
 
7748
8175
  `POST /v1/accounts/{accountId}/webhooks/endpoints/{endpointId}/secret/rotate`
7749
8176
 
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.
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. Not available to OAuth applications, which delete the endpoint and create a new one instead.
7751
8178
 
7752
8179
  **Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).
7753
8180