@workos/openapi-spec 0.71.0 → 0.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,980 @@
1
1
  openapi: 3.1.1
2
2
  paths:
3
+ /agents/blueprints:
4
+ post:
5
+ description: >-
6
+ Creates an agent blueprint: the template describing what an agent may do
7
+ (its permission ceiling), who may invoke it, and the lifetimes of its
8
+ sessions.
9
+ operationId: AgentBlueprintsController_create
10
+ parameters: []
11
+ requestBody:
12
+ required: true
13
+ content:
14
+ application/json:
15
+ schema:
16
+ type: object
17
+ properties:
18
+ name:
19
+ type: string
20
+ minLength: 1
21
+ maxLength: 255
22
+ description: Human-readable name of the agent blueprint.
23
+ example: Prospecting Agent
24
+ description:
25
+ type: string
26
+ minLength: 1
27
+ maxLength: 1000
28
+ description: Human-readable description of the agent blueprint.
29
+ example: Finds and qualifies sales prospects.
30
+ permissions:
31
+ default: []
32
+ type: array
33
+ items:
34
+ type: string
35
+ minLength: 1
36
+ maxItems: 1000
37
+ description: >-
38
+ Permission slugs forming the ceiling on what sessions minted
39
+ from this blueprint may do. Each slug must exist in the
40
+ environment.
41
+ example:
42
+ - crm:read
43
+ - email:send
44
+ invocable_by:
45
+ default: {}
46
+ type: object
47
+ properties:
48
+ role_slugs:
49
+ default: []
50
+ type: array
51
+ items:
52
+ type: string
53
+ minLength: 1
54
+ maxItems: 100
55
+ description: >-
56
+ Role slugs whose members may mint user-delegated
57
+ sessions from this blueprint. An empty list allows any
58
+ member.
59
+ example:
60
+ - manager
61
+ organization_ids:
62
+ default: []
63
+ type: array
64
+ items:
65
+ type: string
66
+ minLength: 1
67
+ maxItems: 1000
68
+ description: >-
69
+ Organizations in which sessions may be minted from this
70
+ blueprint, enforced on user-delegated, autonomous, and
71
+ agent-delegated mints. An empty list allows any
72
+ organization in the environment.
73
+ example:
74
+ - org_01EHWNCE74X7JSDV0X3SZ3KJNY
75
+ description: Who may mint sessions from this blueprint.
76
+ session_settings:
77
+ type: object
78
+ properties:
79
+ max_age_seconds:
80
+ type: integer
81
+ exclusiveMinimum: 0
82
+ maximum: 31536000
83
+ description: >-
84
+ Maximum lifetime of a session in seconds; refreshes
85
+ never extend a session past this. At most 31,536,000
86
+ (365 days).
87
+ example: 3600
88
+ access_token_ttl_seconds:
89
+ type: integer
90
+ exclusiveMinimum: 0
91
+ maximum: 3600
92
+ description: >-
93
+ Lifetime of each minted access token in seconds. At most
94
+ 3,600 (1 hour).
95
+ example: 300
96
+ refresh_token_ttl_seconds:
97
+ type: integer
98
+ exclusiveMinimum: 0
99
+ maximum: 5184000
100
+ description: >-
101
+ Lifetime of each rotated refresh token in seconds. At
102
+ most 5,184,000 (60 days).
103
+ example: 3600
104
+ required:
105
+ - max_age_seconds
106
+ - access_token_ttl_seconds
107
+ - refresh_token_ttl_seconds
108
+ description: >-
109
+ Token and session lifetimes for sessions minted from this
110
+ blueprint.
111
+ required:
112
+ - name
113
+ - session_settings
114
+ description: Configuration for the new agent blueprint.
115
+ responses:
116
+ '201':
117
+ description: Created
118
+ content:
119
+ application/json:
120
+ schema:
121
+ $ref: '#/components/schemas/AgentBlueprint'
122
+ '400':
123
+ description: Bad Request
124
+ content:
125
+ application/json:
126
+ schema:
127
+ type: object
128
+ properties:
129
+ code:
130
+ type: string
131
+ description: The error code identifying the type of error.
132
+ example: invalid_request
133
+ const: invalid_request
134
+ message:
135
+ type: string
136
+ description: A human-readable description of the error.
137
+ example: Request could not be processed.
138
+ required:
139
+ - code
140
+ - message
141
+ '409':
142
+ description: ''
143
+ content:
144
+ application/json:
145
+ schema:
146
+ type: object
147
+ properties:
148
+ code:
149
+ type: string
150
+ description: The error code identifying the type of error.
151
+ example: name_already_in_use
152
+ const: name_already_in_use
153
+ message:
154
+ type: string
155
+ description: A human-readable description of the error.
156
+ example: Request could not be processed.
157
+ required:
158
+ - code
159
+ - message
160
+ '422':
161
+ description: Unprocessable Entity
162
+ content:
163
+ application/json:
164
+ schema:
165
+ oneOf:
166
+ - type: object
167
+ properties:
168
+ code:
169
+ type: string
170
+ description: The error code identifying the type of error.
171
+ example: permission_not_found
172
+ const: permission_not_found
173
+ message:
174
+ type: string
175
+ description: A human-readable description of the error.
176
+ example: Request could not be processed.
177
+ required:
178
+ - code
179
+ - message
180
+ - type: object
181
+ properties:
182
+ code:
183
+ type: string
184
+ description: The error code identifying the type of error.
185
+ example: role_not_found
186
+ const: role_not_found
187
+ message:
188
+ type: string
189
+ description: A human-readable description of the error.
190
+ example: Request could not be processed.
191
+ required:
192
+ - code
193
+ - message
194
+ - type: object
195
+ properties:
196
+ code:
197
+ type: string
198
+ description: The error code identifying the type of error.
199
+ example: organization_not_found
200
+ const: organization_not_found
201
+ message:
202
+ type: string
203
+ description: A human-readable description of the error.
204
+ example: Request could not be processed.
205
+ required:
206
+ - code
207
+ - message
208
+ summary: Create an agent blueprint
209
+ tags:
210
+ - agents.blueprints
211
+ x-feature-flag: agent-blueprints-public-api
212
+ get:
213
+ description: Lists the agent blueprints in the current environment.
214
+ operationId: AgentBlueprintsController_list
215
+ parameters:
216
+ - name: before
217
+ required: false
218
+ in: query
219
+ description: >-
220
+ An object ID that defines your place in the list. When the ID is not
221
+ present, you are at the end of the list. For example, if you make a
222
+ list request and receive 100 objects, ending with `"obj_123"`, your
223
+ subsequent call can include `before="obj_123"` to fetch a new batch
224
+ of objects before `"obj_123"`.
225
+ schema:
226
+ example: xxx_01HXYZ123456789ABCDEFGHIJ
227
+ type: string
228
+ - name: after
229
+ required: false
230
+ in: query
231
+ description: >-
232
+ An object ID that defines your place in the list. When the ID is not
233
+ present, you are at the end of the list. For example, if you make a
234
+ list request and receive 100 objects, ending with `"obj_123"`, your
235
+ subsequent call can include `after="obj_123"` to fetch a new batch
236
+ of objects after `"obj_123"`.
237
+ schema:
238
+ example: xxx_01HXYZ987654321KJIHGFEDCBA
239
+ type: string
240
+ - name: limit
241
+ required: false
242
+ in: query
243
+ description: >-
244
+ Upper limit on the number of objects to return, between `1` and
245
+ `100`.
246
+ schema:
247
+ minimum: 1
248
+ maximum: 100
249
+ default: 10
250
+ example: 10
251
+ type: integer
252
+ - name: order
253
+ required: false
254
+ in: query
255
+ description: >-
256
+ Order the results by the creation time. Supported values are `"asc"`
257
+ (ascending), `"desc"` (descending), and `"normal"` (descending with
258
+ reversed cursor semantics where `before` fetches older records and
259
+ `after` fetches newer records). Defaults to `normal`.
260
+ schema:
261
+ $ref: '#/components/schemas/PaginationOrder'
262
+ responses:
263
+ '200':
264
+ description: OK
265
+ content:
266
+ application/json:
267
+ schema:
268
+ allOf:
269
+ - type: object
270
+ properties:
271
+ object:
272
+ type: string
273
+ description: Indicates this is a list response.
274
+ const: list
275
+ list_metadata:
276
+ type: object
277
+ properties:
278
+ before:
279
+ type:
280
+ - string
281
+ - 'null'
282
+ description: >-
283
+ An object ID that defines your place in the list.
284
+ When the ID is not present, you are at the start
285
+ of the list.
286
+ example: agent_blueprint_01HXYZ123456789ABCDEFGHIJ
287
+ after:
288
+ type:
289
+ - string
290
+ - 'null'
291
+ description: >-
292
+ An object ID that defines your place in the list.
293
+ When the ID is not present, you are at the end of
294
+ the list.
295
+ example: agent_blueprint_01HXYZ987654321KJIHGFEDCBA
296
+ required:
297
+ - before
298
+ - after
299
+ description: >-
300
+ Pagination cursors for navigating between pages of
301
+ results.
302
+ - type: object
303
+ properties:
304
+ data:
305
+ type: array
306
+ description: The list of records for the current page.
307
+ items:
308
+ $ref: '#/components/schemas/AgentBlueprint'
309
+ '401':
310
+ description: Unauthorized
311
+ content:
312
+ application/json:
313
+ schema:
314
+ type: object
315
+ properties:
316
+ message:
317
+ type: string
318
+ description: A human-readable description of the error.
319
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
320
+ required:
321
+ - message
322
+ summary: List agent blueprints
323
+ tags:
324
+ - agents.blueprints
325
+ x-feature-flag: agent-blueprints-public-api
326
+ /agents/blueprints/{agent_blueprint_id}:
327
+ get:
328
+ description: Retrieves an agent blueprint by ID.
329
+ operationId: AgentBlueprintsController_get
330
+ parameters:
331
+ - name: agent_blueprint_id
332
+ required: true
333
+ in: path
334
+ description: The unique ID of the agent blueprint.
335
+ schema:
336
+ type: string
337
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
338
+ responses:
339
+ '200':
340
+ description: OK
341
+ content:
342
+ application/json:
343
+ schema:
344
+ $ref: '#/components/schemas/AgentBlueprint'
345
+ '404':
346
+ description: Not Found
347
+ content:
348
+ application/json:
349
+ schema:
350
+ type: object
351
+ properties:
352
+ message:
353
+ type: string
354
+ description: A human-readable description of the error.
355
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
356
+ required:
357
+ - message
358
+ summary: Get an agent blueprint
359
+ tags:
360
+ - agents.blueprints
361
+ x-feature-flag: agent-blueprints-public-api
362
+ patch:
363
+ description: >-
364
+ Updates an agent blueprint. Omitted fields are left unchanged; provided
365
+ lists replace the existing configuration.
366
+ operationId: AgentBlueprintsController_update
367
+ parameters:
368
+ - name: agent_blueprint_id
369
+ required: true
370
+ in: path
371
+ description: The unique ID of the agent blueprint.
372
+ schema:
373
+ type: string
374
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
375
+ requestBody:
376
+ required: true
377
+ content:
378
+ application/json:
379
+ schema:
380
+ type: object
381
+ properties:
382
+ name:
383
+ type: string
384
+ minLength: 1
385
+ maxLength: 255
386
+ description: Human-readable name of the agent blueprint.
387
+ example: Prospecting Agent
388
+ description:
389
+ type:
390
+ - string
391
+ - 'null'
392
+ minLength: 1
393
+ maxLength: 1000
394
+ description: >-
395
+ Human-readable description of the agent blueprint. Pass
396
+ `null` to clear it.
397
+ example: Finds and qualifies sales prospects.
398
+ permissions:
399
+ type: array
400
+ items:
401
+ type: string
402
+ minLength: 1
403
+ maxItems: 1000
404
+ description: >-
405
+ Permission slugs forming the ceiling on what sessions minted
406
+ from this blueprint may do. Each slug must exist in the
407
+ environment.
408
+ example:
409
+ - crm:read
410
+ - email:send
411
+ invocable_by:
412
+ type: object
413
+ properties:
414
+ role_slugs:
415
+ type: array
416
+ items:
417
+ type: string
418
+ minLength: 1
419
+ maxItems: 100
420
+ description: >-
421
+ Role slugs whose members may mint user-delegated
422
+ sessions from this blueprint. An empty list allows any
423
+ member.
424
+ example:
425
+ - manager
426
+ organization_ids:
427
+ type: array
428
+ items:
429
+ type: string
430
+ minLength: 1
431
+ maxItems: 1000
432
+ description: >-
433
+ Organizations in which sessions may be minted from this
434
+ blueprint, enforced on user-delegated, autonomous, and
435
+ agent-delegated mints. An empty list allows any
436
+ organization in the environment.
437
+ example:
438
+ - org_01EHWNCE74X7JSDV0X3SZ3KJNY
439
+ description: >-
440
+ Who may mint sessions from this blueprint. Omitted lists are
441
+ left unchanged.
442
+ session_settings:
443
+ type: object
444
+ properties:
445
+ max_age_seconds:
446
+ type: integer
447
+ exclusiveMinimum: 0
448
+ maximum: 31536000
449
+ description: >-
450
+ Maximum lifetime of a session in seconds; refreshes
451
+ never extend a session past this. At most 31,536,000
452
+ (365 days).
453
+ example: 3600
454
+ access_token_ttl_seconds:
455
+ type: integer
456
+ exclusiveMinimum: 0
457
+ maximum: 3600
458
+ description: >-
459
+ Lifetime of each minted access token in seconds. At most
460
+ 3,600 (1 hour).
461
+ example: 300
462
+ refresh_token_ttl_seconds:
463
+ type: integer
464
+ exclusiveMinimum: 0
465
+ maximum: 5184000
466
+ description: >-
467
+ Lifetime of each rotated refresh token in seconds. At
468
+ most 5,184,000 (60 days).
469
+ example: 3600
470
+ description: >-
471
+ Token and session lifetimes for sessions minted from this
472
+ blueprint. Omitted fields are left unchanged.
473
+ description: >-
474
+ Fields to update on the agent blueprint. Omitted fields are left
475
+ unchanged; provided lists replace the existing configuration.
476
+ responses:
477
+ '200':
478
+ description: OK
479
+ content:
480
+ application/json:
481
+ schema:
482
+ $ref: '#/components/schemas/AgentBlueprint'
483
+ '400':
484
+ description: Bad Request
485
+ content:
486
+ application/json:
487
+ schema:
488
+ type: object
489
+ properties:
490
+ code:
491
+ type: string
492
+ description: The error code identifying the type of error.
493
+ example: invalid_request
494
+ const: invalid_request
495
+ message:
496
+ type: string
497
+ description: A human-readable description of the error.
498
+ example: Request could not be processed.
499
+ required:
500
+ - code
501
+ - message
502
+ '404':
503
+ description: Not Found
504
+ content:
505
+ application/json:
506
+ schema:
507
+ type: object
508
+ properties:
509
+ message:
510
+ type: string
511
+ description: A human-readable description of the error.
512
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
513
+ required:
514
+ - message
515
+ '409':
516
+ description: ''
517
+ content:
518
+ application/json:
519
+ schema:
520
+ type: object
521
+ properties:
522
+ code:
523
+ type: string
524
+ description: The error code identifying the type of error.
525
+ example: name_already_in_use
526
+ const: name_already_in_use
527
+ message:
528
+ type: string
529
+ description: A human-readable description of the error.
530
+ example: Request could not be processed.
531
+ required:
532
+ - code
533
+ - message
534
+ '422':
535
+ description: Unprocessable Entity
536
+ content:
537
+ application/json:
538
+ schema:
539
+ oneOf:
540
+ - type: object
541
+ properties:
542
+ code:
543
+ type: string
544
+ description: The error code identifying the type of error.
545
+ example: permission_not_found
546
+ const: permission_not_found
547
+ message:
548
+ type: string
549
+ description: A human-readable description of the error.
550
+ example: Request could not be processed.
551
+ required:
552
+ - code
553
+ - message
554
+ - type: object
555
+ properties:
556
+ code:
557
+ type: string
558
+ description: The error code identifying the type of error.
559
+ example: role_not_found
560
+ const: role_not_found
561
+ message:
562
+ type: string
563
+ description: A human-readable description of the error.
564
+ example: Request could not be processed.
565
+ required:
566
+ - code
567
+ - message
568
+ - type: object
569
+ properties:
570
+ code:
571
+ type: string
572
+ description: The error code identifying the type of error.
573
+ example: organization_not_found
574
+ const: organization_not_found
575
+ message:
576
+ type: string
577
+ description: A human-readable description of the error.
578
+ example: Request could not be processed.
579
+ required:
580
+ - code
581
+ - message
582
+ summary: Update an agent blueprint
583
+ tags:
584
+ - agents.blueprints
585
+ x-feature-flag: agent-blueprints-public-api
586
+ delete:
587
+ description: >-
588
+ Deletes an agent blueprint along with its configuration, instances, and
589
+ sessions.
590
+ operationId: AgentBlueprintsController_delete
591
+ parameters:
592
+ - name: agent_blueprint_id
593
+ required: true
594
+ in: path
595
+ description: The unique ID of the agent blueprint.
596
+ schema:
597
+ type: string
598
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
599
+ responses:
600
+ '204':
601
+ description: Agent blueprint deleted.
602
+ '404':
603
+ description: Not Found
604
+ content:
605
+ application/json:
606
+ schema:
607
+ type: object
608
+ properties:
609
+ message:
610
+ type: string
611
+ description: A human-readable description of the error.
612
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
613
+ required:
614
+ - message
615
+ summary: Delete an agent blueprint
616
+ tags:
617
+ - agents.blueprints
618
+ x-feature-flag: agent-blueprints-public-api
619
+ /agents/blueprints/{agent_blueprint_id}/tokens:
620
+ post:
621
+ description: >-
622
+ Mint an agent access token (and backing session) from an agent
623
+ blueprint. The session can be user-delegated (exchanging a user access
624
+ token), autonomous (the agent acting as itself in an organization),
625
+ agent-delegated (the agent exchanging its own access token for a new
626
+ session on the same instance), or a refresh of a previously issued
627
+ refresh token.
628
+ operationId: AgentBlueprintsTokenController_mintToken
629
+ parameters:
630
+ - name: agent_blueprint_id
631
+ required: true
632
+ in: path
633
+ description: The unique ID of the agent blueprint.
634
+ schema:
635
+ type: string
636
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
637
+ requestBody:
638
+ required: true
639
+ content:
640
+ application/json:
641
+ schema:
642
+ discriminator:
643
+ propertyName: type
644
+ oneOf:
645
+ - type: object
646
+ properties:
647
+ type:
648
+ type: string
649
+ description: >-
650
+ How the session is minted: `user_delegated`,
651
+ `autonomous`, `agent_delegated`, or `refresh`.
652
+ const: user_delegated
653
+ user_access_token:
654
+ type: string
655
+ minLength: 1
656
+ description: >-
657
+ The access token of the user delegating to the agent.
658
+ The token identifies the user and organization;
659
+ effective permissions are resolved server-side.
660
+ example: eyJhbGciOiJSUzI1NiIsImtpZCI6...
661
+ intent:
662
+ type: string
663
+ minLength: 1
664
+ maxLength: 255
665
+ description: >-
666
+ Optional caller-supplied context, echoed as an object
667
+ with a `text` field in the `intent` claim of the minted
668
+ access token.
669
+ example: renew-contract-123
670
+ required:
671
+ - type
672
+ - user_access_token
673
+ - type: object
674
+ properties:
675
+ type:
676
+ type: string
677
+ description: >-
678
+ How the session is minted: `user_delegated`,
679
+ `autonomous`, `agent_delegated`, or `refresh`.
680
+ const: autonomous
681
+ organization_id:
682
+ type: string
683
+ minLength: 1
684
+ description: >-
685
+ The organization the agent acts within when operating as
686
+ itself.
687
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
688
+ intent:
689
+ type: string
690
+ minLength: 1
691
+ maxLength: 255
692
+ description: >-
693
+ Optional caller-supplied context, echoed as an object
694
+ with a `text` field in the `intent` claim of the minted
695
+ access token.
696
+ example: renew-contract-123
697
+ required:
698
+ - type
699
+ - organization_id
700
+ - type: object
701
+ properties:
702
+ type:
703
+ type: string
704
+ description: >-
705
+ How the session is minted: `user_delegated`,
706
+ `autonomous`, `agent_delegated`, or `refresh`.
707
+ const: agent_delegated
708
+ agent_access_token:
709
+ type: string
710
+ minLength: 1
711
+ description: >-
712
+ The agent's own access token to exchange for a new
713
+ session on the same instance. The token must have been
714
+ minted from this blueprint; permissions are re-derived
715
+ from current authority.
716
+ example: eyJhbGciOiJSUzI1NiIsImtpZCI6...
717
+ intent:
718
+ type: string
719
+ minLength: 1
720
+ maxLength: 255
721
+ description: >-
722
+ Optional caller-supplied context, echoed as an object
723
+ with a `text` field in the `intent` claim of the minted
724
+ access token.
725
+ example: renew-contract-123
726
+ required:
727
+ - type
728
+ - agent_access_token
729
+ - type: object
730
+ properties:
731
+ type:
732
+ type: string
733
+ description: >-
734
+ How the session is minted: `user_delegated`,
735
+ `autonomous`, `agent_delegated`, or `refresh`.
736
+ const: refresh
737
+ refresh_token:
738
+ type: string
739
+ minLength: 1
740
+ description: >-
741
+ The refresh token issued with a previous agent access
742
+ token. Refresh tokens are single-use: each refresh
743
+ rotates it.
744
+ example: njGkA8Wyht0GBEGGA0Zh1Q3wZzL2...
745
+ intent:
746
+ type: string
747
+ minLength: 1
748
+ maxLength: 255
749
+ description: >-
750
+ Optional caller-supplied context, echoed as an object
751
+ with a `text` field in the `intent` claim of the minted
752
+ access token.
753
+ example: renew-contract-123
754
+ required:
755
+ - type
756
+ - refresh_token
757
+ description: >-
758
+ How to mint the agent session, discriminated by `type`. `intent`
759
+ is optional on every variant.
760
+ responses:
761
+ '200':
762
+ description: OK
763
+ content:
764
+ application/json:
765
+ schema:
766
+ $ref: '#/components/schemas/AgentToken'
767
+ '400':
768
+ description: Bad Request
769
+ content:
770
+ application/json:
771
+ schema:
772
+ oneOf:
773
+ - type: object
774
+ properties:
775
+ code:
776
+ type: string
777
+ description: The error code identifying the type of error.
778
+ example: invalid_request
779
+ const: invalid_request
780
+ message:
781
+ type: string
782
+ description: A human-readable description of the error.
783
+ example: Request could not be processed.
784
+ required:
785
+ - code
786
+ - message
787
+ - type: object
788
+ properties:
789
+ code:
790
+ type: string
791
+ description: The error code identifying the type of error.
792
+ example: invalid_user_access_token
793
+ const: invalid_user_access_token
794
+ message:
795
+ type: string
796
+ description: A human-readable description of the error.
797
+ example: Request could not be processed.
798
+ required:
799
+ - code
800
+ - message
801
+ - type: object
802
+ properties:
803
+ code:
804
+ type: string
805
+ description: The error code identifying the type of error.
806
+ example: invalid_agent_access_token
807
+ const: invalid_agent_access_token
808
+ message:
809
+ type: string
810
+ description: A human-readable description of the error.
811
+ example: Request could not be processed.
812
+ required:
813
+ - code
814
+ - message
815
+ - type: object
816
+ properties:
817
+ code:
818
+ type: string
819
+ description: The error code identifying the type of error.
820
+ example: invalid_refresh_token
821
+ const: invalid_refresh_token
822
+ message:
823
+ type: string
824
+ description: A human-readable description of the error.
825
+ example: Request could not be processed.
826
+ required:
827
+ - code
828
+ - message
829
+ - type: object
830
+ properties:
831
+ code:
832
+ type: string
833
+ description: The error code identifying the type of error.
834
+ example: session_revoked
835
+ const: session_revoked
836
+ message:
837
+ type: string
838
+ description: A human-readable description of the error.
839
+ example: Request could not be processed.
840
+ required:
841
+ - code
842
+ - message
843
+ - type: object
844
+ properties:
845
+ code:
846
+ type: string
847
+ description: The error code identifying the type of error.
848
+ example: session_expired
849
+ const: session_expired
850
+ message:
851
+ type: string
852
+ description: A human-readable description of the error.
853
+ example: Request could not be processed.
854
+ required:
855
+ - code
856
+ - message
857
+ - type: object
858
+ properties:
859
+ code:
860
+ type: string
861
+ description: The error code identifying the type of error.
862
+ example: user_session_ended
863
+ const: user_session_ended
864
+ message:
865
+ type: string
866
+ description: A human-readable description of the error.
867
+ example: Request could not be processed.
868
+ required:
869
+ - code
870
+ - message
871
+ - type: object
872
+ properties:
873
+ code:
874
+ type: string
875
+ description: The error code identifying the type of error.
876
+ example: max_age_exceeded
877
+ const: max_age_exceeded
878
+ message:
879
+ type: string
880
+ description: A human-readable description of the error.
881
+ example: Request could not be processed.
882
+ required:
883
+ - code
884
+ - message
885
+ - type: object
886
+ properties:
887
+ code:
888
+ type: string
889
+ description: The error code identifying the type of error.
890
+ example: session_settings_not_found
891
+ const: session_settings_not_found
892
+ message:
893
+ type: string
894
+ description: A human-readable description of the error.
895
+ example: Request could not be processed.
896
+ required:
897
+ - code
898
+ - message
899
+ - type: object
900
+ properties:
901
+ code:
902
+ type: string
903
+ description: The error code identifying the type of error.
904
+ example: chain_depth_exceeded
905
+ const: chain_depth_exceeded
906
+ message:
907
+ type: string
908
+ description: A human-readable description of the error.
909
+ example: Request could not be processed.
910
+ required:
911
+ - code
912
+ - message
913
+ '403':
914
+ description: Forbidden
915
+ content:
916
+ application/json:
917
+ schema:
918
+ oneOf:
919
+ - type: object
920
+ properties:
921
+ code:
922
+ type: string
923
+ description: The error code identifying the type of error.
924
+ example: user_not_member_of_organization
925
+ const: user_not_member_of_organization
926
+ message:
927
+ type: string
928
+ description: A human-readable description of the error.
929
+ example: Request could not be processed.
930
+ required:
931
+ - code
932
+ - message
933
+ - type: object
934
+ properties:
935
+ code:
936
+ type: string
937
+ description: The error code identifying the type of error.
938
+ example: organization_not_invocable
939
+ const: organization_not_invocable
940
+ message:
941
+ type: string
942
+ description: A human-readable description of the error.
943
+ example: Request could not be processed.
944
+ required:
945
+ - code
946
+ - message
947
+ - type: object
948
+ properties:
949
+ code:
950
+ type: string
951
+ description: The error code identifying the type of error.
952
+ example: role_not_invocable
953
+ const: role_not_invocable
954
+ message:
955
+ type: string
956
+ description: A human-readable description of the error.
957
+ example: Request could not be processed.
958
+ required:
959
+ - code
960
+ - message
961
+ '404':
962
+ description: Not Found
963
+ content:
964
+ application/json:
965
+ schema:
966
+ type: object
967
+ properties:
968
+ message:
969
+ type: string
970
+ description: A human-readable description of the error.
971
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
972
+ required:
973
+ - message
974
+ summary: Mint an agent token
975
+ tags:
976
+ - agents.blueprints.tokens
977
+ x-feature-flag: agent-blueprints-public-api
3
978
  /agents/claims/attempts:
4
979
  patch:
5
980
  description: >-
@@ -286,7 +1261,7 @@ paths:
286
1261
  - message
287
1262
  summary: Link a claim attempt to an external user
288
1263
  tags:
289
- - agents
1264
+ - agents.registrations
290
1265
  x-feature-flag: agent-auth-public-api
291
1266
  /agents/credentials/validate:
292
1267
  post:
@@ -379,8 +1354,208 @@ paths:
379
1354
  - message
380
1355
  summary: Validate an agent credential
381
1356
  tags:
382
- - agents
1357
+ - agents.registrations
383
1358
  x-feature-flag: agent-auth-public-api
1359
+ /agents/instances:
1360
+ get:
1361
+ description: >-
1362
+ Lists the agent instances in the current environment. Instances are
1363
+ created implicitly when tokens are minted.
1364
+ operationId: AgentInstancesController_list
1365
+ parameters:
1366
+ - name: before
1367
+ required: false
1368
+ in: query
1369
+ description: >-
1370
+ An object ID that defines your place in the list. When the ID is not
1371
+ present, you are at the end of the list. For example, if you make a
1372
+ list request and receive 100 objects, ending with `"obj_123"`, your
1373
+ subsequent call can include `before="obj_123"` to fetch a new batch
1374
+ of objects before `"obj_123"`.
1375
+ schema:
1376
+ example: xxx_01HXYZ123456789ABCDEFGHIJ
1377
+ type: string
1378
+ - name: after
1379
+ required: false
1380
+ in: query
1381
+ description: >-
1382
+ An object ID that defines your place in the list. When the ID is not
1383
+ present, you are at the end of the list. For example, if you make a
1384
+ list request and receive 100 objects, ending with `"obj_123"`, your
1385
+ subsequent call can include `after="obj_123"` to fetch a new batch
1386
+ of objects after `"obj_123"`.
1387
+ schema:
1388
+ example: xxx_01HXYZ987654321KJIHGFEDCBA
1389
+ type: string
1390
+ - name: limit
1391
+ required: false
1392
+ in: query
1393
+ description: >-
1394
+ Upper limit on the number of objects to return, between `1` and
1395
+ `100`.
1396
+ schema:
1397
+ minimum: 1
1398
+ maximum: 100
1399
+ default: 10
1400
+ example: 10
1401
+ type: integer
1402
+ - name: order
1403
+ required: false
1404
+ in: query
1405
+ description: >-
1406
+ Order the results by the creation time. Supported values are `"asc"`
1407
+ (ascending), `"desc"` (descending), and `"normal"` (descending with
1408
+ reversed cursor semantics where `before` fetches older records and
1409
+ `after` fetches newer records). Defaults to `normal`.
1410
+ schema:
1411
+ $ref: '#/components/schemas/PaginationOrder'
1412
+ - name: organization_id
1413
+ required: false
1414
+ in: query
1415
+ description: Only return instances acting within this organization.
1416
+ schema:
1417
+ type: string
1418
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
1419
+ - name: agent_blueprint_id
1420
+ required: false
1421
+ in: query
1422
+ description: Only return instances minted from this blueprint.
1423
+ schema:
1424
+ type: string
1425
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
1426
+ responses:
1427
+ '200':
1428
+ description: OK
1429
+ content:
1430
+ application/json:
1431
+ schema:
1432
+ allOf:
1433
+ - type: object
1434
+ properties:
1435
+ object:
1436
+ type: string
1437
+ description: Indicates this is a list response.
1438
+ const: list
1439
+ list_metadata:
1440
+ type: object
1441
+ properties:
1442
+ before:
1443
+ type:
1444
+ - string
1445
+ - 'null'
1446
+ description: >-
1447
+ An object ID that defines your place in the list.
1448
+ When the ID is not present, you are at the start
1449
+ of the list.
1450
+ example: agent_01HXYZ123456789ABCDEFGHIJ
1451
+ after:
1452
+ type:
1453
+ - string
1454
+ - 'null'
1455
+ description: >-
1456
+ An object ID that defines your place in the list.
1457
+ When the ID is not present, you are at the end of
1458
+ the list.
1459
+ example: agent_01HXYZ987654321KJIHGFEDCBA
1460
+ required:
1461
+ - before
1462
+ - after
1463
+ description: >-
1464
+ Pagination cursors for navigating between pages of
1465
+ results.
1466
+ - type: object
1467
+ properties:
1468
+ data:
1469
+ type: array
1470
+ description: The list of records for the current page.
1471
+ items:
1472
+ $ref: '#/components/schemas/AgentInstance'
1473
+ '401':
1474
+ description: Unauthorized
1475
+ content:
1476
+ application/json:
1477
+ schema:
1478
+ type: object
1479
+ properties:
1480
+ message:
1481
+ type: string
1482
+ description: A human-readable description of the error.
1483
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1484
+ required:
1485
+ - message
1486
+ summary: List agent instances
1487
+ tags:
1488
+ - agents.instances
1489
+ x-feature-flag: agent-blueprints-public-api
1490
+ /agents/instances/{agent_instance_id}:
1491
+ get:
1492
+ description: Retrieves an agent instance by ID.
1493
+ operationId: AgentInstancesController_get
1494
+ parameters:
1495
+ - name: agent_instance_id
1496
+ required: true
1497
+ in: path
1498
+ description: The unique ID of the agent instance.
1499
+ schema:
1500
+ type: string
1501
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
1502
+ responses:
1503
+ '200':
1504
+ description: OK
1505
+ content:
1506
+ application/json:
1507
+ schema:
1508
+ $ref: '#/components/schemas/AgentInstance'
1509
+ '404':
1510
+ description: Not Found
1511
+ content:
1512
+ application/json:
1513
+ schema:
1514
+ type: object
1515
+ properties:
1516
+ message:
1517
+ type: string
1518
+ description: A human-readable description of the error.
1519
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1520
+ required:
1521
+ - message
1522
+ summary: Get an agent instance
1523
+ tags:
1524
+ - agents.instances
1525
+ x-feature-flag: agent-blueprints-public-api
1526
+ delete:
1527
+ description: >-
1528
+ Deletes an agent instance along with its sessions, invalidating their
1529
+ refresh tokens.
1530
+ operationId: AgentInstancesController_delete
1531
+ parameters:
1532
+ - name: agent_instance_id
1533
+ required: true
1534
+ in: path
1535
+ description: The unique ID of the agent instance.
1536
+ schema:
1537
+ type: string
1538
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
1539
+ responses:
1540
+ '204':
1541
+ description: Agent instance deleted.
1542
+ '404':
1543
+ description: Not Found
1544
+ content:
1545
+ application/json:
1546
+ schema:
1547
+ type: object
1548
+ properties:
1549
+ message:
1550
+ type: string
1551
+ description: A human-readable description of the error.
1552
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1553
+ required:
1554
+ - message
1555
+ summary: Delete an agent instance
1556
+ tags:
1557
+ - agents.instances
1558
+ x-feature-flag: agent-blueprints-public-api
384
1559
  /agents/registrations/{id}:
385
1560
  get:
386
1561
  description: >-
@@ -418,8 +1593,247 @@ paths:
418
1593
  - message
419
1594
  summary: Get an agent registration
420
1595
  tags:
421
- - agents
1596
+ - agents.registrations
422
1597
  x-feature-flag: agent-auth-public-api
1598
+ /agents/sessions:
1599
+ get:
1600
+ description: >-
1601
+ Lists the agent instance sessions in the current environment. Sessions
1602
+ are created when tokens are minted.
1603
+ operationId: AgentInstanceSessionsController_list
1604
+ parameters:
1605
+ - name: before
1606
+ required: false
1607
+ in: query
1608
+ description: >-
1609
+ An object ID that defines your place in the list. When the ID is not
1610
+ present, you are at the end of the list. For example, if you make a
1611
+ list request and receive 100 objects, ending with `"obj_123"`, your
1612
+ subsequent call can include `before="obj_123"` to fetch a new batch
1613
+ of objects before `"obj_123"`.
1614
+ schema:
1615
+ example: xxx_01HXYZ123456789ABCDEFGHIJ
1616
+ type: string
1617
+ - name: after
1618
+ required: false
1619
+ in: query
1620
+ description: >-
1621
+ An object ID that defines your place in the list. When the ID is not
1622
+ present, you are at the end of the list. For example, if you make a
1623
+ list request and receive 100 objects, ending with `"obj_123"`, your
1624
+ subsequent call can include `after="obj_123"` to fetch a new batch
1625
+ of objects after `"obj_123"`.
1626
+ schema:
1627
+ example: xxx_01HXYZ987654321KJIHGFEDCBA
1628
+ type: string
1629
+ - name: limit
1630
+ required: false
1631
+ in: query
1632
+ description: >-
1633
+ Upper limit on the number of objects to return, between `1` and
1634
+ `100`.
1635
+ schema:
1636
+ minimum: 1
1637
+ maximum: 100
1638
+ default: 10
1639
+ example: 10
1640
+ type: integer
1641
+ - name: order
1642
+ required: false
1643
+ in: query
1644
+ description: >-
1645
+ Order the results by the creation time. Supported values are `"asc"`
1646
+ (ascending), `"desc"` (descending), and `"normal"` (descending with
1647
+ reversed cursor semantics where `before` fetches older records and
1648
+ `after` fetches newer records). Defaults to `normal`.
1649
+ schema:
1650
+ $ref: '#/components/schemas/PaginationOrder'
1651
+ - name: agent_blueprint_id
1652
+ required: false
1653
+ in: query
1654
+ description: Only return sessions of instances minted from this blueprint.
1655
+ schema:
1656
+ type: string
1657
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
1658
+ - name: agent_instance_id
1659
+ required: false
1660
+ in: query
1661
+ description: Only return sessions belonging to this agent instance.
1662
+ schema:
1663
+ type: string
1664
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
1665
+ responses:
1666
+ '200':
1667
+ description: OK
1668
+ content:
1669
+ application/json:
1670
+ schema:
1671
+ allOf:
1672
+ - type: object
1673
+ properties:
1674
+ object:
1675
+ type: string
1676
+ description: Indicates this is a list response.
1677
+ const: list
1678
+ list_metadata:
1679
+ type: object
1680
+ properties:
1681
+ before:
1682
+ type:
1683
+ - string
1684
+ - 'null'
1685
+ description: >-
1686
+ An object ID that defines your place in the list.
1687
+ When the ID is not present, you are at the start
1688
+ of the list.
1689
+ example: agent_session_01HXYZ123456789ABCDEFGHIJ
1690
+ after:
1691
+ type:
1692
+ - string
1693
+ - 'null'
1694
+ description: >-
1695
+ An object ID that defines your place in the list.
1696
+ When the ID is not present, you are at the end of
1697
+ the list.
1698
+ example: agent_session_01HXYZ987654321KJIHGFEDCBA
1699
+ required:
1700
+ - before
1701
+ - after
1702
+ description: >-
1703
+ Pagination cursors for navigating between pages of
1704
+ results.
1705
+ - type: object
1706
+ properties:
1707
+ data:
1708
+ type: array
1709
+ description: The list of records for the current page.
1710
+ items:
1711
+ $ref: '#/components/schemas/AgentInstanceSession'
1712
+ '401':
1713
+ description: Unauthorized
1714
+ content:
1715
+ application/json:
1716
+ schema:
1717
+ type: object
1718
+ properties:
1719
+ message:
1720
+ type: string
1721
+ description: A human-readable description of the error.
1722
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1723
+ required:
1724
+ - message
1725
+ '422':
1726
+ description: Unprocessable Entity
1727
+ content:
1728
+ application/json:
1729
+ schema:
1730
+ type: object
1731
+ properties:
1732
+ message:
1733
+ type: string
1734
+ description: A human-readable description of the error.
1735
+ example: Validation failed.
1736
+ errors:
1737
+ type: array
1738
+ items:
1739
+ type: object
1740
+ properties:
1741
+ code:
1742
+ type: string
1743
+ description: The validation error code.
1744
+ example: required
1745
+ field:
1746
+ type: string
1747
+ description: The field that failed validation.
1748
+ example: event.action
1749
+ required:
1750
+ - code
1751
+ - field
1752
+ description: The list of validation errors.
1753
+ required:
1754
+ - message
1755
+ - errors
1756
+ summary: List agent instance sessions
1757
+ tags:
1758
+ - agents.sessions
1759
+ x-feature-flag: agent-blueprints-public-api
1760
+ /agents/sessions/{agent_instance_session_id}:
1761
+ get:
1762
+ description: Retrieves an agent instance session by ID.
1763
+ operationId: AgentInstanceSessionsController_get
1764
+ parameters:
1765
+ - name: agent_instance_session_id
1766
+ required: true
1767
+ in: path
1768
+ description: The unique ID of the agent instance session.
1769
+ schema:
1770
+ type: string
1771
+ example: agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
1772
+ responses:
1773
+ '200':
1774
+ description: OK
1775
+ content:
1776
+ application/json:
1777
+ schema:
1778
+ $ref: '#/components/schemas/AgentInstanceSession'
1779
+ '404':
1780
+ description: Not Found
1781
+ content:
1782
+ application/json:
1783
+ schema:
1784
+ type: object
1785
+ properties:
1786
+ message:
1787
+ type: string
1788
+ description: A human-readable description of the error.
1789
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1790
+ required:
1791
+ - message
1792
+ summary: Get an agent instance session
1793
+ tags:
1794
+ - agents.sessions
1795
+ x-feature-flag: agent-blueprints-public-api
1796
+ /agents/sessions/{agent_instance_session_id}/revoke:
1797
+ post:
1798
+ description: >-
1799
+ Revokes an agent instance session, invalidating its refresh token and
1800
+ every access token minted under it. Revocation is idempotent: revoking
1801
+ an already-revoked session keeps the original `revoked_at`, and revoking
1802
+ an already-expired session returns the session with `status: expired`
1803
+ and a null `revoked_at`.
1804
+ operationId: AgentInstanceSessionsController_revoke
1805
+ parameters:
1806
+ - name: agent_instance_session_id
1807
+ required: true
1808
+ in: path
1809
+ description: The unique ID of the agent instance session.
1810
+ schema:
1811
+ type: string
1812
+ example: agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
1813
+ responses:
1814
+ '200':
1815
+ description: OK
1816
+ content:
1817
+ application/json:
1818
+ schema:
1819
+ $ref: '#/components/schemas/AgentInstanceSession'
1820
+ '404':
1821
+ description: Not Found
1822
+ content:
1823
+ application/json:
1824
+ schema:
1825
+ type: object
1826
+ properties:
1827
+ message:
1828
+ type: string
1829
+ description: A human-readable description of the error.
1830
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
1831
+ required:
1832
+ - message
1833
+ summary: Revoke an agent instance session
1834
+ tags:
1835
+ - agents.sessions
1836
+ x-feature-flag: agent-blueprints-public-api
423
1837
  /api_keys/validations:
424
1838
  post:
425
1839
  description: Validate an API key value and return the API key object if valid.
@@ -22346,8 +23760,16 @@ info:
22346
23760
  tags:
22347
23761
  - name: admin-portal
22348
23762
  description: Endpoints for the Admin Portal API.
22349
- - name: agents
22350
- description: Manage agents for environments.
23763
+ - name: agents.blueprints
23764
+ description: Manage agent blueprints.
23765
+ - name: agents.blueprints.tokens
23766
+ description: Mint and validate agent access tokens.
23767
+ - name: agents.instances
23768
+ description: Manage agent instances.
23769
+ - name: agents.registrations
23770
+ description: Register agents and validate agent credentials.
23771
+ - name: agents.sessions
23772
+ description: Manage agent instance sessions.
22351
23773
  - name: api_keys
22352
23774
  description: Manage API keys for environments.
22353
23775
  - name: application.client-secrets
@@ -22563,6 +23985,13 @@ components:
22563
23985
  required:
22564
23986
  - external_auth_id
22565
23987
  - user
23988
+ PaginationOrder:
23989
+ type: string
23990
+ enum:
23991
+ - normal
23992
+ - desc
23993
+ - asc
23994
+ example: desc
22566
23995
  ValidateApiKeyDto:
22567
23996
  type: object
22568
23997
  properties:
@@ -22585,13 +24014,6 @@ components:
22585
24014
  expiration.
22586
24015
  example: '2030-01-01T00:00:00.000Z'
22587
24016
  format: date-time
22588
- PaginationOrder:
22589
- type: string
22590
- enum:
22591
- - normal
22592
- - desc
22593
- - asc
22594
- example: desc
22595
24017
  RedirectUriDto:
22596
24018
  type: object
22597
24019
  properties:
@@ -26544,6 +27966,268 @@ components:
26544
27966
  - status
26545
27967
  - user_code
26546
27968
  - organizations
27969
+ AgentBlueprint:
27970
+ type: object
27971
+ properties:
27972
+ object:
27973
+ type: string
27974
+ description: Distinguishes the agent blueprint object.
27975
+ const: agent_blueprint
27976
+ id:
27977
+ type: string
27978
+ description: Unique identifier of the agent blueprint.
27979
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
27980
+ name:
27981
+ type: string
27982
+ description: Human-readable name of the agent blueprint.
27983
+ example: Prospecting Agent
27984
+ description:
27985
+ type:
27986
+ - string
27987
+ - 'null'
27988
+ description: Human-readable description of the agent blueprint.
27989
+ example: Finds and qualifies sales prospects.
27990
+ permissions:
27991
+ type: array
27992
+ items:
27993
+ type: string
27994
+ description: >-
27995
+ Permission slugs forming the ceiling on what sessions minted from
27996
+ this blueprint may do.
27997
+ example:
27998
+ - crm:read
27999
+ - email:send
28000
+ invocable_by:
28001
+ type: object
28002
+ properties:
28003
+ role_slugs:
28004
+ type: array
28005
+ items:
28006
+ type: string
28007
+ description: >-
28008
+ Role slugs whose members may mint user-delegated sessions from
28009
+ this blueprint.
28010
+ example:
28011
+ - manager
28012
+ organization_ids:
28013
+ type: array
28014
+ items:
28015
+ type: string
28016
+ description: >-
28017
+ Organizations in which sessions may be minted from this
28018
+ blueprint, enforced on user-delegated, autonomous, and
28019
+ agent-delegated mints.
28020
+ example:
28021
+ - org_01EHWNCE74X7JSDV0X3SZ3KJNY
28022
+ required:
28023
+ - role_slugs
28024
+ - organization_ids
28025
+ description: Who may mint sessions from this blueprint.
28026
+ session_settings:
28027
+ type: object
28028
+ properties:
28029
+ max_age_seconds:
28030
+ type: integer
28031
+ description: >-
28032
+ Maximum lifetime of a session in seconds; refreshes never extend
28033
+ a session past this.
28034
+ example: 3600
28035
+ access_token_ttl_seconds:
28036
+ type: integer
28037
+ description: Lifetime of each minted access token in seconds.
28038
+ example: 300
28039
+ refresh_token_ttl_seconds:
28040
+ type: integer
28041
+ description: Lifetime of each rotated refresh token in seconds.
28042
+ example: 3600
28043
+ required:
28044
+ - max_age_seconds
28045
+ - access_token_ttl_seconds
28046
+ - refresh_token_ttl_seconds
28047
+ description: Token and session lifetimes for sessions minted from this blueprint.
28048
+ created_at:
28049
+ type: string
28050
+ format: date-time
28051
+ description: Timestamp when the agent blueprint was created.
28052
+ example: '2026-01-15T12:00:00.000Z'
28053
+ updated_at:
28054
+ type: string
28055
+ format: date-time
28056
+ description: Timestamp when the agent blueprint was last updated.
28057
+ example: '2026-01-15T12:00:00.000Z'
28058
+ required:
28059
+ - object
28060
+ - id
28061
+ - name
28062
+ - description
28063
+ - permissions
28064
+ - invocable_by
28065
+ - session_settings
28066
+ - created_at
28067
+ - updated_at
28068
+ AgentInstance:
28069
+ type: object
28070
+ properties:
28071
+ object:
28072
+ type: string
28073
+ description: Distinguishes the agent instance object.
28074
+ const: agent_instance
28075
+ id:
28076
+ type: string
28077
+ description: Unique identifier of the agent instance.
28078
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
28079
+ agent_blueprint_id:
28080
+ type: string
28081
+ description: The blueprint this instance was minted from.
28082
+ example: agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
28083
+ organization_id:
28084
+ type: string
28085
+ description: The organization the instance acts within.
28086
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
28087
+ organization_membership_id:
28088
+ type:
28089
+ - string
28090
+ - 'null'
28091
+ description: >-
28092
+ The organization membership of the delegating user; `null` for
28093
+ autonomous instances.
28094
+ example: om_01EHWNCE74X7JSDV0X3SZ3KJNY
28095
+ type:
28096
+ type: string
28097
+ enum:
28098
+ - delegated
28099
+ - autonomous
28100
+ description: >-
28101
+ Whether the instance acts on behalf of a specific user (`delegated`)
28102
+ or as itself (`autonomous`).
28103
+ created_at:
28104
+ type: string
28105
+ format: date-time
28106
+ description: Timestamp when the agent instance was created.
28107
+ example: '2026-01-15T12:00:00.000Z'
28108
+ updated_at:
28109
+ type: string
28110
+ format: date-time
28111
+ description: Timestamp when the agent instance was last updated.
28112
+ example: '2026-01-15T12:00:00.000Z'
28113
+ required:
28114
+ - object
28115
+ - id
28116
+ - agent_blueprint_id
28117
+ - organization_id
28118
+ - organization_membership_id
28119
+ - type
28120
+ - created_at
28121
+ - updated_at
28122
+ AgentToken:
28123
+ type: object
28124
+ properties:
28125
+ access_token:
28126
+ type: string
28127
+ description: The agent access token (a JWT) carrying the effective permissions.
28128
+ example: eyJhbGciOiJSUzI1NiIsImtpZCI6...
28129
+ token_type:
28130
+ type: string
28131
+ description: Always `Bearer`.
28132
+ const: Bearer
28133
+ expires_in:
28134
+ type: integer
28135
+ description: Number of seconds until the access token expires.
28136
+ example: 300
28137
+ refresh_token:
28138
+ type: string
28139
+ description: >-
28140
+ Single-use refresh token for rotating the access token within the
28141
+ session lifetime.
28142
+ example: njGkA8Wyht0GBEGGA0Zh1Q3wZzL2...
28143
+ agent_instance_id:
28144
+ type: string
28145
+ description: The agent instance the session belongs to.
28146
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
28147
+ new_instance:
28148
+ type: boolean
28149
+ description: >-
28150
+ Whether this mint created the agent instance: `true` only for the
28151
+ mint that inserted the row, `false` when an existing instance was
28152
+ reused (including when a concurrent mint inserted it first).
28153
+ example: false
28154
+ agent_instance_session_id:
28155
+ type: string
28156
+ description: The backing agent instance session.
28157
+ example: agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
28158
+ permissions:
28159
+ type: array
28160
+ items:
28161
+ type: string
28162
+ description: The effective permission slugs carried by the token.
28163
+ example:
28164
+ - crm:read
28165
+ required:
28166
+ - access_token
28167
+ - token_type
28168
+ - expires_in
28169
+ - refresh_token
28170
+ - agent_instance_id
28171
+ - new_instance
28172
+ - agent_instance_session_id
28173
+ - permissions
28174
+ AgentInstanceSession:
28175
+ type: object
28176
+ properties:
28177
+ object:
28178
+ type: string
28179
+ description: Distinguishes the agent instance session object.
28180
+ const: agent_instance_session
28181
+ id:
28182
+ type: string
28183
+ description: Unique identifier of the agent instance session.
28184
+ example: agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
28185
+ agent_instance_id:
28186
+ type: string
28187
+ description: The agent instance the session belongs to.
28188
+ example: agent_01EHWNCE74X7JSDV0X3SZ3KJNY
28189
+ status:
28190
+ type: string
28191
+ enum:
28192
+ - active
28193
+ - revoked
28194
+ - expired
28195
+ description: >-
28196
+ Derived from `revoked_at` and `expires_at` at read time; a revoked
28197
+ session stays `revoked` even after it expires.
28198
+ expires_at:
28199
+ type: string
28200
+ format: date-time
28201
+ description: Timestamp when the session expires.
28202
+ example: '2026-01-15T13:00:00.000Z'
28203
+ revoked_at:
28204
+ type:
28205
+ - string
28206
+ - 'null'
28207
+ format: date-time
28208
+ description: >-
28209
+ Timestamp when the session was revoked; `null` if it has not been
28210
+ revoked.
28211
+ example: null
28212
+ created_at:
28213
+ type: string
28214
+ format: date-time
28215
+ description: Timestamp when the session was created.
28216
+ example: '2026-01-15T12:00:00.000Z'
28217
+ updated_at:
28218
+ type: string
28219
+ format: date-time
28220
+ description: Timestamp when the session was last updated.
28221
+ example: '2026-01-15T12:00:00.000Z'
28222
+ required:
28223
+ - object
28224
+ - id
28225
+ - agent_instance_id
28226
+ - status
28227
+ - expires_at
28228
+ - revoked_at
28229
+ - created_at
28230
+ - updated_at
26547
28231
  ApiKey:
26548
28232
  type: object
26549
28233
  properties:
@@ -37701,6 +39385,7 @@ components:
37701
39385
  - organizations
37702
39386
  - events
37703
39387
  - sessions
39388
+ - auditLogEvents
37704
39389
  description: The type of resource being exported.
37705
39390
  example: users
37706
39391
  required:
@@ -37747,6 +39432,7 @@ components:
37747
39432
  - organizations
37748
39433
  - events
37749
39434
  - sessions
39435
+ - auditLogEvents
37750
39436
  description: The type of resource being exported.
37751
39437
  example: users
37752
39438
  required:
@@ -37793,6 +39479,7 @@ components:
37793
39479
  - organizations
37794
39480
  - events
37795
39481
  - sessions
39482
+ - auditLogEvents
37796
39483
  description: The type of resource being exported.
37797
39484
  example: users
37798
39485
  required:
@@ -37839,6 +39526,7 @@ components:
37839
39526
  - organizations
37840
39527
  - events
37841
39528
  - sessions
39529
+ - auditLogEvents
37842
39530
  description: The type of resource being exported.
37843
39531
  example: users
37844
39532
  required: