@inklok/api-spec 7.10.0 → 7.11.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/openapi.yaml +162 -10
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -8,7 +8,7 @@ info:
|
|
|
8
8
|
Authenticate using an API key or bearer token, then use the resources below to manage
|
|
9
9
|
templates, agreements, documents, and signing. For your first integration, start with
|
|
10
10
|
the Quick Start guide.
|
|
11
|
-
version: "7.
|
|
11
|
+
version: "7.11.1"
|
|
12
12
|
contact:
|
|
13
13
|
name: Inklok API Support
|
|
14
14
|
email: support@inklok.com
|
|
@@ -1278,12 +1278,13 @@ paths:
|
|
|
1278
1278
|
operationId: exchangeMagicLink
|
|
1279
1279
|
summary: Exchange a signing link for an access token
|
|
1280
1280
|
description: |
|
|
1281
|
-
Exchanges
|
|
1282
|
-
recipient view or sign an agreement.
|
|
1281
|
+
Exchanges an agreement-link code for a short-lived party-scoped bearer token.
|
|
1283
1282
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1283
|
+
SIGNING links are one-time capabilities. When an eligible signing link is no
|
|
1284
|
+
longer usable, callers may request a replacement signing link. COMPLETED_VIEW
|
|
1285
|
+
links are read-only capabilities that may be exchanged repeatedly during their
|
|
1286
|
+
finite validity window so a client can renew an expired signer JWT. The backend
|
|
1287
|
+
stored link purpose, not a URL query parameter, controls replay policy.
|
|
1287
1288
|
tags:
|
|
1288
1289
|
- Authentication
|
|
1289
1290
|
requestBody:
|
|
@@ -1296,8 +1297,16 @@ paths:
|
|
|
1296
1297
|
properties:
|
|
1297
1298
|
code:
|
|
1298
1299
|
type: string
|
|
1300
|
+
request_reissue:
|
|
1301
|
+
type: boolean
|
|
1302
|
+
default: false
|
|
1303
|
+
description: |
|
|
1304
|
+
Requests a replacement link when an eligible one-time SIGNING code
|
|
1305
|
+
can no longer be used. COMPLETED_VIEW links are reusable and are not
|
|
1306
|
+
reissued through this mechanism.
|
|
1299
1307
|
example:
|
|
1300
1308
|
code: "7f3c9e2a-4d7a-4f35-a977-2d2b7e0fd9a1"
|
|
1309
|
+
request_reissue: false
|
|
1301
1310
|
responses:
|
|
1302
1311
|
'200':
|
|
1303
1312
|
description: Token issued, link reissued, or signing unavailable
|
|
@@ -1306,7 +1315,7 @@ paths:
|
|
|
1306
1315
|
schema:
|
|
1307
1316
|
oneOf:
|
|
1308
1317
|
- type: object
|
|
1309
|
-
required: [access_token, token_type, expires_in]
|
|
1318
|
+
required: [access_token, token_type, expires_in, link_purpose, reusable]
|
|
1310
1319
|
properties:
|
|
1311
1320
|
access_token:
|
|
1312
1321
|
type: string
|
|
@@ -1316,6 +1325,13 @@ paths:
|
|
|
1316
1325
|
expires_in:
|
|
1317
1326
|
type: integer
|
|
1318
1327
|
description: Token lifetime in seconds
|
|
1328
|
+
link_purpose:
|
|
1329
|
+
type: string
|
|
1330
|
+
enum: [SIGNING, COMPLETED_VIEW]
|
|
1331
|
+
description: Server-authoritative purpose stored with the link record.
|
|
1332
|
+
reusable:
|
|
1333
|
+
type: boolean
|
|
1334
|
+
description: Whether the same code may be exchanged again during its validity window.
|
|
1319
1335
|
- type: object
|
|
1320
1336
|
required: [status, message]
|
|
1321
1337
|
properties:
|
|
@@ -1339,6 +1355,8 @@ paths:
|
|
|
1339
1355
|
access_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
1340
1356
|
token_type: "Bearer"
|
|
1341
1357
|
expires_in: 900
|
|
1358
|
+
link_purpose: "COMPLETED_VIEW"
|
|
1359
|
+
reusable: true
|
|
1342
1360
|
'400':
|
|
1343
1361
|
$ref: '#/components/responses/BadRequest'
|
|
1344
1362
|
'401':
|
|
@@ -2567,6 +2585,38 @@ paths:
|
|
|
2567
2585
|
'500':
|
|
2568
2586
|
$ref: '#/components/responses/InternalServerError'
|
|
2569
2587
|
|
|
2588
|
+
/v1/templates/{workflowId}/agreements/prepare:
|
|
2589
|
+
post:
|
|
2590
|
+
operationId: prepareAgreementGuestInvitationsV1
|
|
2591
|
+
summary: Prepare an agreement cryptographic context
|
|
2592
|
+
description: |
|
|
2593
|
+
First stage of agreement creation. Reserves the authoritative execution and party IDs,
|
|
2594
|
+
then returns short-lived one-time bootstrap material used by the client to construct the
|
|
2595
|
+
guest invitation capabilities required by the create/finalize request. Preparation does
|
|
2596
|
+
not create a Vault-visible agreement or consume agreement creation usage.
|
|
2597
|
+
|
|
2598
|
+
The response must be finalized against the same workflow, organization, and authenticated
|
|
2599
|
+
principal before `expiresIn` elapses. Raw bootstrap values are never persisted by Inklok.
|
|
2600
|
+
x-required-roles: [workflow-operator, organization-admin]
|
|
2601
|
+
x-required-scopes: [agreements:write]
|
|
2602
|
+
tags: [Agreements]
|
|
2603
|
+
parameters:
|
|
2604
|
+
- name: workflowId
|
|
2605
|
+
in: path
|
|
2606
|
+
required: true
|
|
2607
|
+
schema: { type: string }
|
|
2608
|
+
responses:
|
|
2609
|
+
'200':
|
|
2610
|
+
description: Short-lived authoritative context and one-time material for agreement creation
|
|
2611
|
+
content:
|
|
2612
|
+
application/json:
|
|
2613
|
+
schema:
|
|
2614
|
+
$ref: '#/components/schemas/PrepareGuestInvitationsResponse'
|
|
2615
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
2616
|
+
'403': { $ref: '#/components/responses/Forbidden' }
|
|
2617
|
+
'404': { $ref: '#/components/responses/NotFound' }
|
|
2618
|
+
'500': { $ref: '#/components/responses/InternalServerError' }
|
|
2619
|
+
|
|
2570
2620
|
/v1/agreements/{executionId}:
|
|
2571
2621
|
get:
|
|
2572
2622
|
operationId: getAgreementV1
|
|
@@ -3075,6 +3125,10 @@ paths:
|
|
|
3075
3125
|
properties:
|
|
3076
3126
|
execution_id:
|
|
3077
3127
|
type: string
|
|
3128
|
+
expires_at:
|
|
3129
|
+
type: string
|
|
3130
|
+
format: date-time
|
|
3131
|
+
description: Immutable agreement deadline; signing is rejected at or after this instant.
|
|
3078
3132
|
agreement_title:
|
|
3079
3133
|
type: string
|
|
3080
3134
|
nullable: true
|
|
@@ -3131,6 +3185,19 @@ paths:
|
|
|
3131
3185
|
type: string
|
|
3132
3186
|
example: RSA-OAEP-256
|
|
3133
3187
|
description: Encrypted document key metadata for this signer
|
|
3188
|
+
key_scopes:
|
|
3189
|
+
type: array
|
|
3190
|
+
items:
|
|
3191
|
+
$ref: '#/components/schemas/KeyScope'
|
|
3192
|
+
key_envelopes:
|
|
3193
|
+
type: array
|
|
3194
|
+
items:
|
|
3195
|
+
$ref: '#/components/schemas/KeyEnvelope'
|
|
3196
|
+
invitation_capabilities:
|
|
3197
|
+
type: array
|
|
3198
|
+
description: Active agreement-specific guest capabilities. Only the authenticated party receives its encrypted private-key package; other parties expose public addressing data only.
|
|
3199
|
+
items:
|
|
3200
|
+
$ref: '#/components/schemas/GuestInvitationCapability'
|
|
3134
3201
|
parties:
|
|
3135
3202
|
type: array
|
|
3136
3203
|
items:
|
|
@@ -6183,7 +6250,7 @@ components:
|
|
|
6183
6250
|
|
|
6184
6251
|
ExecutionStatus:
|
|
6185
6252
|
type: string
|
|
6186
|
-
enum: [pending, in_progress, completed, cancelled]
|
|
6253
|
+
enum: [pending, in_progress, completed, cancelled, expired]
|
|
6187
6254
|
|
|
6188
6255
|
ParticipantStatus:
|
|
6189
6256
|
type: string
|
|
@@ -6288,8 +6355,16 @@ components:
|
|
|
6288
6355
|
|
|
6289
6356
|
CreateExecutionRequest:
|
|
6290
6357
|
type: object
|
|
6291
|
-
required: [agreementTitle, participants, crypto]
|
|
6358
|
+
required: [agreementTitle, participants, crypto, preparedExecutionId, guestInvitations]
|
|
6292
6359
|
properties:
|
|
6360
|
+
preparedExecutionId:
|
|
6361
|
+
type: string
|
|
6362
|
+
format: uuid
|
|
6363
|
+
guestInvitations:
|
|
6364
|
+
type: array
|
|
6365
|
+
minItems: 1
|
|
6366
|
+
items:
|
|
6367
|
+
$ref: '#/components/schemas/CreateGuestInvitationInput'
|
|
6293
6368
|
agreementTitle:
|
|
6294
6369
|
type: string
|
|
6295
6370
|
minLength: 1
|
|
@@ -6324,6 +6399,65 @@ components:
|
|
|
6324
6399
|
items:
|
|
6325
6400
|
$ref: '#/components/schemas/ManagedRecoveryCapability'
|
|
6326
6401
|
|
|
6402
|
+
PrepareGuestInvitationsResponse:
|
|
6403
|
+
type: object
|
|
6404
|
+
required: [executionId, expiresIn, parties]
|
|
6405
|
+
properties:
|
|
6406
|
+
executionId: { type: string, format: uuid }
|
|
6407
|
+
expiresIn: { type: integer }
|
|
6408
|
+
parties:
|
|
6409
|
+
type: array
|
|
6410
|
+
items:
|
|
6411
|
+
type: object
|
|
6412
|
+
required: [roleId, partyId, authorizationCode, bootstrapSecret]
|
|
6413
|
+
properties:
|
|
6414
|
+
roleId: { type: string }
|
|
6415
|
+
partyId: { type: string }
|
|
6416
|
+
authorizationCode: { type: string, writeOnly: true }
|
|
6417
|
+
bootstrapSecret: { type: string, writeOnly: true }
|
|
6418
|
+
|
|
6419
|
+
CreateGuestInvitationInput:
|
|
6420
|
+
type: object
|
|
6421
|
+
required: [partyId, authorizationCode, bootstrapSecret, capability]
|
|
6422
|
+
properties:
|
|
6423
|
+
partyId: { type: string }
|
|
6424
|
+
authorizationCode: { type: string, writeOnly: true }
|
|
6425
|
+
bootstrapSecret: { type: string, writeOnly: true }
|
|
6426
|
+
capability:
|
|
6427
|
+
$ref: '#/components/schemas/GuestInvitationCapabilityInput'
|
|
6428
|
+
|
|
6429
|
+
GuestInvitationCapabilityInput:
|
|
6430
|
+
type: object
|
|
6431
|
+
required: [protocol, invitationKeyId, publicKeySpki, encryptedPrivateKey, iv, salt, aad, kdf, cipher]
|
|
6432
|
+
properties:
|
|
6433
|
+
protocol: { type: string, enum: [inklok-guest-invitation-v1] }
|
|
6434
|
+
invitationKeyId: { type: string }
|
|
6435
|
+
publicKeySpki: { type: string }
|
|
6436
|
+
encryptedPrivateKey: { type: string }
|
|
6437
|
+
iv: { type: string }
|
|
6438
|
+
salt: { type: string }
|
|
6439
|
+
aad: { type: string }
|
|
6440
|
+
kdf: { type: string, enum: [HKDF-SHA-256] }
|
|
6441
|
+
cipher: { type: string, enum: [AES-256-GCM] }
|
|
6442
|
+
|
|
6443
|
+
GuestInvitationCapability:
|
|
6444
|
+
type: object
|
|
6445
|
+
required: [protocol, partyId, invitationKeyId, invitationPrincipalId, publicKeySpki, status]
|
|
6446
|
+
properties:
|
|
6447
|
+
protocol: { type: string, enum: [inklok-guest-invitation-v1] }
|
|
6448
|
+
partyId: { type: string }
|
|
6449
|
+
invitationKeyId: { type: string }
|
|
6450
|
+
invitationPrincipalId: { type: string }
|
|
6451
|
+
publicKeySpki: { type: string }
|
|
6452
|
+
encryptedPrivateKey: { type: string }
|
|
6453
|
+
iv: { type: string }
|
|
6454
|
+
salt: { type: string }
|
|
6455
|
+
aad: { type: string }
|
|
6456
|
+
kdf: { type: string, enum: [HKDF-SHA-256] }
|
|
6457
|
+
cipher: { type: string, enum: [AES-256-GCM] }
|
|
6458
|
+
status: { type: string, enum: [active] }
|
|
6459
|
+
createdAt: { type: string, format: date-time }
|
|
6460
|
+
|
|
6327
6461
|
KeyScope:
|
|
6328
6462
|
type: object
|
|
6329
6463
|
required: [keyScopeId, type, version]
|
|
@@ -6342,6 +6476,13 @@ components:
|
|
|
6342
6476
|
type: array
|
|
6343
6477
|
items:
|
|
6344
6478
|
type: string
|
|
6479
|
+
fieldIds:
|
|
6480
|
+
type: array
|
|
6481
|
+
minItems: 1
|
|
6482
|
+
uniqueItems: true
|
|
6483
|
+
description: Protected workflow fields assigned to this scope. Required by new agreement creation clients so one party may own multiple scopes with different sharing policies.
|
|
6484
|
+
items:
|
|
6485
|
+
type: string
|
|
6345
6486
|
authorizationPolicy:
|
|
6346
6487
|
type: object
|
|
6347
6488
|
additionalProperties: true
|
|
@@ -6355,7 +6496,7 @@ components:
|
|
|
6355
6496
|
protectionMode:
|
|
6356
6497
|
type: string
|
|
6357
6498
|
enum: [MANAGED, STRICT_ZK]
|
|
6358
|
-
description:
|
|
6499
|
+
description: Agreement signing creation requires STRICT_ZK. MANAGED remains in the response model for legacy records.
|
|
6359
6500
|
createdAt:
|
|
6360
6501
|
type: string
|
|
6361
6502
|
format: date-time
|
|
@@ -6912,6 +7053,7 @@ components:
|
|
|
6912
7053
|
currentStep,
|
|
6913
7054
|
totalSteps,
|
|
6914
7055
|
createdAt,
|
|
7056
|
+
expiresAt,
|
|
6915
7057
|
updatedAt,
|
|
6916
7058
|
pdfEngineVersion,
|
|
6917
7059
|
agreementTitle,
|
|
@@ -6944,6 +7086,11 @@ components:
|
|
|
6944
7086
|
type: string
|
|
6945
7087
|
format: date-time
|
|
6946
7088
|
readOnly: true
|
|
7089
|
+
expiresAt:
|
|
7090
|
+
type: string
|
|
7091
|
+
format: date-time
|
|
7092
|
+
readOnly: true
|
|
7093
|
+
description: Immutable deadline exactly 30 days after agreement creation.
|
|
6947
7094
|
updatedAt:
|
|
6948
7095
|
type: string
|
|
6949
7096
|
format: date-time
|
|
@@ -7036,6 +7183,11 @@ components:
|
|
|
7036
7183
|
executionId:
|
|
7037
7184
|
type: string
|
|
7038
7185
|
description: The identifier of an agreement instance.
|
|
7186
|
+
expiresAt:
|
|
7187
|
+
type: string
|
|
7188
|
+
format: date-time
|
|
7189
|
+
nullable: true
|
|
7190
|
+
description: Immutable agreement deadline for active agreements.
|
|
7039
7191
|
organizationId:
|
|
7040
7192
|
type: string
|
|
7041
7193
|
nullable: true
|