@1claw/openapi-spec 0.1.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.
Files changed (4) hide show
  1. package/README.md +50 -0
  2. package/openapi.json +4940 -0
  3. package/openapi.yaml +3256 -0
  4. package/package.json +40 -0
package/openapi.json ADDED
@@ -0,0 +1,4940 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "1Claw API",
5
+ "version": "2.0.0",
6
+ "description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, crypto transaction proxy,\nsharing, billing, and audit logging.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
7
+ "contact": {
8
+ "email": "ops@1claw.xyz"
9
+ }
10
+ },
11
+ "servers": [
12
+ {
13
+ "url": "http://localhost:8443",
14
+ "description": "Development"
15
+ },
16
+ {
17
+ "url": "https://api.1claw.xyz",
18
+ "description": "Production"
19
+ }
20
+ ],
21
+ "security": [
22
+ {
23
+ "BearerAuth": []
24
+ }
25
+ ],
26
+ "tags": [
27
+ {
28
+ "name": "Authentication",
29
+ "description": "Credential exchange, MFA, device auth, token management"
30
+ },
31
+ {
32
+ "name": "API Keys",
33
+ "description": "Personal API key management"
34
+ },
35
+ {
36
+ "name": "Vaults",
37
+ "description": "Vault lifecycle operations"
38
+ },
39
+ {
40
+ "name": "Secrets",
41
+ "description": "Secret CRUD within vaults"
42
+ },
43
+ {
44
+ "name": "Policies",
45
+ "description": "Access policy management"
46
+ },
47
+ {
48
+ "name": "Agents",
49
+ "description": "Agent identity and key management"
50
+ },
51
+ {
52
+ "name": "Transactions",
53
+ "description": "Crypto transaction proxy (signing, simulation)"
54
+ },
55
+ {
56
+ "name": "Chains",
57
+ "description": "Blockchain chain registry"
58
+ },
59
+ {
60
+ "name": "Sharing",
61
+ "description": "Secret sharing links"
62
+ },
63
+ {
64
+ "name": "Organization",
65
+ "description": "Org membership and roles"
66
+ },
67
+ {
68
+ "name": "Billing",
69
+ "description": "Subscriptions, credits, and usage"
70
+ },
71
+ {
72
+ "name": "Audit",
73
+ "description": "Immutable audit event log"
74
+ },
75
+ {
76
+ "name": "Security",
77
+ "description": "IP rules and security configuration"
78
+ },
79
+ {
80
+ "name": "Admin",
81
+ "description": "Platform administration"
82
+ },
83
+ {
84
+ "name": "Health",
85
+ "description": "Service health checks"
86
+ }
87
+ ],
88
+ "paths": {
89
+ "/v1/auth/token": {
90
+ "post": {
91
+ "tags": [
92
+ "Authentication"
93
+ ],
94
+ "summary": "Login with email and password",
95
+ "operationId": "login",
96
+ "security": [],
97
+ "requestBody": {
98
+ "required": true,
99
+ "content": {
100
+ "application/json": {
101
+ "schema": {
102
+ "$ref": "#/components/schemas/LoginRequest"
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "responses": {
108
+ "200": {
109
+ "description": "Authenticated (or MFA required)",
110
+ "content": {
111
+ "application/json": {
112
+ "schema": {
113
+ "$ref": "#/components/schemas/LoginResponse"
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "401": {
119
+ "$ref": "#/components/responses/Unauthorized"
120
+ }
121
+ }
122
+ },
123
+ "delete": {
124
+ "tags": [
125
+ "Authentication"
126
+ ],
127
+ "summary": "Revoke current token",
128
+ "operationId": "revokeToken",
129
+ "responses": {
130
+ "204": {
131
+ "description": "Token revoked"
132
+ },
133
+ "401": {
134
+ "$ref": "#/components/responses/Unauthorized"
135
+ }
136
+ }
137
+ }
138
+ },
139
+ "/v1/auth/agent-token": {
140
+ "post": {
141
+ "tags": [
142
+ "Authentication"
143
+ ],
144
+ "summary": "Exchange agent credentials for JWT",
145
+ "operationId": "agentToken",
146
+ "security": [],
147
+ "requestBody": {
148
+ "required": true,
149
+ "content": {
150
+ "application/json": {
151
+ "schema": {
152
+ "$ref": "#/components/schemas/AgentTokenRequest"
153
+ }
154
+ }
155
+ }
156
+ },
157
+ "responses": {
158
+ "200": {
159
+ "description": "Agent JWT issued",
160
+ "content": {
161
+ "application/json": {
162
+ "schema": {
163
+ "$ref": "#/components/schemas/TokenResponse"
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "401": {
169
+ "$ref": "#/components/responses/Unauthorized"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "/v1/auth/api-key-token": {
175
+ "post": {
176
+ "tags": [
177
+ "Authentication"
178
+ ],
179
+ "summary": "Exchange user API key for JWT",
180
+ "operationId": "apiKeyToken",
181
+ "security": [],
182
+ "requestBody": {
183
+ "required": true,
184
+ "content": {
185
+ "application/json": {
186
+ "schema": {
187
+ "$ref": "#/components/schemas/UserApiKeyTokenRequest"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "responses": {
193
+ "200": {
194
+ "description": "JWT issued",
195
+ "content": {
196
+ "application/json": {
197
+ "schema": {
198
+ "$ref": "#/components/schemas/TokenResponse"
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "401": {
204
+ "$ref": "#/components/responses/Unauthorized"
205
+ }
206
+ }
207
+ }
208
+ },
209
+ "/v1/auth/refresh": {
210
+ "post": {
211
+ "tags": [
212
+ "Authentication"
213
+ ],
214
+ "summary": "Refresh an expiring JWT",
215
+ "operationId": "refreshToken",
216
+ "security": [],
217
+ "requestBody": {
218
+ "required": true,
219
+ "content": {
220
+ "application/json": {
221
+ "schema": {
222
+ "type": "object",
223
+ "required": [
224
+ "refresh_token"
225
+ ],
226
+ "properties": {
227
+ "refresh_token": {
228
+ "type": "string"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ }
234
+ },
235
+ "responses": {
236
+ "200": {
237
+ "description": "Token refreshed",
238
+ "content": {
239
+ "application/json": {
240
+ "schema": {
241
+ "$ref": "#/components/schemas/TokenResponse"
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "401": {
247
+ "$ref": "#/components/responses/Unauthorized"
248
+ }
249
+ }
250
+ }
251
+ },
252
+ "/v1/auth/signup": {
253
+ "post": {
254
+ "tags": [
255
+ "Authentication"
256
+ ],
257
+ "summary": "Create a new account",
258
+ "operationId": "signup",
259
+ "security": [],
260
+ "requestBody": {
261
+ "required": true,
262
+ "content": {
263
+ "application/json": {
264
+ "schema": {
265
+ "$ref": "#/components/schemas/SignupRequest"
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "responses": {
271
+ "200": {
272
+ "description": "Account created (pending verification or auto-login)",
273
+ "content": {
274
+ "application/json": {
275
+ "schema": {
276
+ "$ref": "#/components/schemas/SignupResponse"
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "400": {
282
+ "$ref": "#/components/responses/BadRequest"
283
+ }
284
+ }
285
+ }
286
+ },
287
+ "/v1/auth/verify-email": {
288
+ "post": {
289
+ "tags": [
290
+ "Authentication"
291
+ ],
292
+ "summary": "Verify email address",
293
+ "operationId": "verifyEmail",
294
+ "security": [],
295
+ "requestBody": {
296
+ "required": true,
297
+ "content": {
298
+ "application/json": {
299
+ "schema": {
300
+ "type": "object",
301
+ "required": [
302
+ "token"
303
+ ],
304
+ "properties": {
305
+ "token": {
306
+ "type": "string"
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "responses": {
314
+ "200": {
315
+ "description": "Email verified",
316
+ "content": {
317
+ "application/json": {
318
+ "schema": {
319
+ "$ref": "#/components/schemas/TokenResponse"
320
+ }
321
+ }
322
+ }
323
+ },
324
+ "400": {
325
+ "$ref": "#/components/responses/BadRequest"
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "/v1/auth/google": {
331
+ "post": {
332
+ "tags": [
333
+ "Authentication"
334
+ ],
335
+ "summary": "Authenticate with Google OAuth",
336
+ "operationId": "googleAuth",
337
+ "security": [],
338
+ "requestBody": {
339
+ "required": true,
340
+ "content": {
341
+ "application/json": {
342
+ "schema": {
343
+ "$ref": "#/components/schemas/GoogleAuthRequest"
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "responses": {
349
+ "200": {
350
+ "description": "Authenticated",
351
+ "content": {
352
+ "application/json": {
353
+ "schema": {
354
+ "$ref": "#/components/schemas/TokenResponse"
355
+ }
356
+ }
357
+ }
358
+ },
359
+ "401": {
360
+ "$ref": "#/components/responses/Unauthorized"
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "/v1/auth/change-password": {
366
+ "post": {
367
+ "tags": [
368
+ "Authentication"
369
+ ],
370
+ "summary": "Change current user's password",
371
+ "operationId": "changePassword",
372
+ "requestBody": {
373
+ "required": true,
374
+ "content": {
375
+ "application/json": {
376
+ "schema": {
377
+ "$ref": "#/components/schemas/ChangePasswordRequest"
378
+ }
379
+ }
380
+ }
381
+ },
382
+ "responses": {
383
+ "204": {
384
+ "description": "Password changed"
385
+ },
386
+ "400": {
387
+ "$ref": "#/components/responses/BadRequest"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "/v1/auth/mfa/status": {
393
+ "get": {
394
+ "tags": [
395
+ "Authentication"
396
+ ],
397
+ "summary": "Check MFA enrollment status",
398
+ "operationId": "mfaStatus",
399
+ "responses": {
400
+ "200": {
401
+ "description": "MFA status",
402
+ "content": {
403
+ "application/json": {
404
+ "schema": {
405
+ "$ref": "#/components/schemas/MfaStatusResponse"
406
+ }
407
+ }
408
+ }
409
+ }
410
+ }
411
+ }
412
+ },
413
+ "/v1/auth/mfa/setup": {
414
+ "post": {
415
+ "tags": [
416
+ "Authentication"
417
+ ],
418
+ "summary": "Begin MFA enrollment",
419
+ "operationId": "mfaSetup",
420
+ "responses": {
421
+ "200": {
422
+ "description": "TOTP setup details",
423
+ "content": {
424
+ "application/json": {
425
+ "schema": {
426
+ "$ref": "#/components/schemas/MfaSetupResponse"
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ },
434
+ "/v1/auth/mfa/verify-setup": {
435
+ "post": {
436
+ "tags": [
437
+ "Authentication"
438
+ ],
439
+ "summary": "Confirm MFA enrollment with a TOTP code",
440
+ "operationId": "mfaVerifySetup",
441
+ "requestBody": {
442
+ "required": true,
443
+ "content": {
444
+ "application/json": {
445
+ "schema": {
446
+ "$ref": "#/components/schemas/MfaVerifySetupRequest"
447
+ }
448
+ }
449
+ }
450
+ },
451
+ "responses": {
452
+ "200": {
453
+ "description": "MFA enabled, recovery codes returned",
454
+ "content": {
455
+ "application/json": {
456
+ "schema": {
457
+ "$ref": "#/components/schemas/MfaVerifySetupResponse"
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "400": {
463
+ "$ref": "#/components/responses/BadRequest"
464
+ }
465
+ }
466
+ }
467
+ },
468
+ "/v1/auth/mfa/verify": {
469
+ "post": {
470
+ "tags": [
471
+ "Authentication"
472
+ ],
473
+ "summary": "Verify MFA code during login",
474
+ "operationId": "mfaVerify",
475
+ "security": [],
476
+ "requestBody": {
477
+ "required": true,
478
+ "content": {
479
+ "application/json": {
480
+ "schema": {
481
+ "$ref": "#/components/schemas/MfaVerifyRequest"
482
+ }
483
+ }
484
+ }
485
+ },
486
+ "responses": {
487
+ "200": {
488
+ "description": "MFA verified, JWT issued",
489
+ "content": {
490
+ "application/json": {
491
+ "schema": {
492
+ "$ref": "#/components/schemas/TokenResponse"
493
+ }
494
+ }
495
+ }
496
+ },
497
+ "401": {
498
+ "$ref": "#/components/responses/Unauthorized"
499
+ }
500
+ }
501
+ }
502
+ },
503
+ "/v1/auth/mfa": {
504
+ "delete": {
505
+ "tags": [
506
+ "Authentication"
507
+ ],
508
+ "summary": "Disable MFA",
509
+ "operationId": "mfaDisable",
510
+ "requestBody": {
511
+ "required": true,
512
+ "content": {
513
+ "application/json": {
514
+ "schema": {
515
+ "$ref": "#/components/schemas/MfaDisableRequest"
516
+ }
517
+ }
518
+ }
519
+ },
520
+ "responses": {
521
+ "204": {
522
+ "description": "MFA disabled"
523
+ },
524
+ "400": {
525
+ "$ref": "#/components/responses/BadRequest"
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "/v1/auth/device/code": {
531
+ "post": {
532
+ "tags": [
533
+ "Authentication"
534
+ ],
535
+ "summary": "Request a device authorization code",
536
+ "operationId": "deviceCode",
537
+ "security": [],
538
+ "requestBody": {
539
+ "required": true,
540
+ "content": {
541
+ "application/json": {
542
+ "schema": {
543
+ "$ref": "#/components/schemas/DeviceCodeRequest"
544
+ }
545
+ }
546
+ }
547
+ },
548
+ "responses": {
549
+ "200": {
550
+ "description": "Device code issued",
551
+ "content": {
552
+ "application/json": {
553
+ "schema": {
554
+ "$ref": "#/components/schemas/DeviceCodeResponse"
555
+ }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ }
561
+ },
562
+ "/v1/auth/device/token": {
563
+ "post": {
564
+ "tags": [
565
+ "Authentication"
566
+ ],
567
+ "summary": "Poll for device authorization token",
568
+ "operationId": "deviceToken",
569
+ "security": [],
570
+ "requestBody": {
571
+ "required": true,
572
+ "content": {
573
+ "application/json": {
574
+ "schema": {
575
+ "$ref": "#/components/schemas/DeviceTokenRequest"
576
+ }
577
+ }
578
+ }
579
+ },
580
+ "responses": {
581
+ "200": {
582
+ "description": "Token issued or authorization pending",
583
+ "content": {
584
+ "application/json": {
585
+ "schema": {
586
+ "$ref": "#/components/schemas/DeviceTokenResponse"
587
+ }
588
+ }
589
+ }
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "/v1/auth/device/code/{user_code}": {
595
+ "get": {
596
+ "tags": [
597
+ "Authentication"
598
+ ],
599
+ "summary": "Check device code status",
600
+ "operationId": "deviceCodeStatus",
601
+ "security": [],
602
+ "parameters": [
603
+ {
604
+ "name": "user_code",
605
+ "in": "path",
606
+ "required": true,
607
+ "schema": {
608
+ "type": "string"
609
+ }
610
+ }
611
+ ],
612
+ "responses": {
613
+ "200": {
614
+ "description": "Device code details"
615
+ },
616
+ "404": {
617
+ "$ref": "#/components/responses/NotFound"
618
+ }
619
+ }
620
+ }
621
+ },
622
+ "/v1/auth/device/approve": {
623
+ "post": {
624
+ "tags": [
625
+ "Authentication"
626
+ ],
627
+ "summary": "Approve a CLI device login",
628
+ "operationId": "deviceApprove",
629
+ "requestBody": {
630
+ "required": true,
631
+ "content": {
632
+ "application/json": {
633
+ "schema": {
634
+ "$ref": "#/components/schemas/DeviceApproveRequest"
635
+ }
636
+ }
637
+ }
638
+ },
639
+ "responses": {
640
+ "200": {
641
+ "description": "Device approved"
642
+ }
643
+ }
644
+ }
645
+ },
646
+ "/v1/auth/device/deny": {
647
+ "post": {
648
+ "tags": [
649
+ "Authentication"
650
+ ],
651
+ "summary": "Deny a CLI device login",
652
+ "operationId": "deviceDeny",
653
+ "requestBody": {
654
+ "required": true,
655
+ "content": {
656
+ "application/json": {
657
+ "schema": {
658
+ "$ref": "#/components/schemas/DeviceApproveRequest"
659
+ }
660
+ }
661
+ }
662
+ },
663
+ "responses": {
664
+ "200": {
665
+ "description": "Device denied"
666
+ }
667
+ }
668
+ }
669
+ },
670
+ "/v1/auth/api-keys": {
671
+ "post": {
672
+ "tags": [
673
+ "API Keys"
674
+ ],
675
+ "summary": "Create a personal API key",
676
+ "operationId": "createApiKey",
677
+ "requestBody": {
678
+ "required": true,
679
+ "content": {
680
+ "application/json": {
681
+ "schema": {
682
+ "$ref": "#/components/schemas/CreateApiKeyRequest"
683
+ }
684
+ }
685
+ }
686
+ },
687
+ "responses": {
688
+ "201": {
689
+ "description": "API key created (full key shown once)",
690
+ "content": {
691
+ "application/json": {
692
+ "schema": {
693
+ "$ref": "#/components/schemas/ApiKeyCreatedResponse"
694
+ }
695
+ }
696
+ }
697
+ },
698
+ "400": {
699
+ "$ref": "#/components/responses/BadRequest"
700
+ }
701
+ }
702
+ },
703
+ "get": {
704
+ "tags": [
705
+ "API Keys"
706
+ ],
707
+ "summary": "List personal API keys",
708
+ "operationId": "listApiKeys",
709
+ "responses": {
710
+ "200": {
711
+ "description": "List of API keys (masked)",
712
+ "content": {
713
+ "application/json": {
714
+ "schema": {
715
+ "$ref": "#/components/schemas/ApiKeyListResponse"
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ },
723
+ "/v1/auth/api-keys/{key_id}": {
724
+ "delete": {
725
+ "tags": [
726
+ "API Keys"
727
+ ],
728
+ "summary": "Revoke an API key",
729
+ "operationId": "revokeApiKey",
730
+ "parameters": [
731
+ {
732
+ "name": "key_id",
733
+ "in": "path",
734
+ "required": true,
735
+ "schema": {
736
+ "type": "string",
737
+ "format": "uuid"
738
+ }
739
+ }
740
+ ],
741
+ "responses": {
742
+ "204": {
743
+ "description": "Key revoked"
744
+ },
745
+ "404": {
746
+ "$ref": "#/components/responses/NotFound"
747
+ }
748
+ }
749
+ }
750
+ },
751
+ "/v1/vaults": {
752
+ "post": {
753
+ "tags": [
754
+ "Vaults"
755
+ ],
756
+ "summary": "Create a vault",
757
+ "operationId": "createVault",
758
+ "requestBody": {
759
+ "required": true,
760
+ "content": {
761
+ "application/json": {
762
+ "schema": {
763
+ "$ref": "#/components/schemas/CreateVaultRequest"
764
+ }
765
+ }
766
+ }
767
+ },
768
+ "responses": {
769
+ "201": {
770
+ "description": "Vault created",
771
+ "content": {
772
+ "application/json": {
773
+ "schema": {
774
+ "$ref": "#/components/schemas/VaultResponse"
775
+ }
776
+ }
777
+ }
778
+ },
779
+ "400": {
780
+ "$ref": "#/components/responses/BadRequest"
781
+ }
782
+ }
783
+ },
784
+ "get": {
785
+ "tags": [
786
+ "Vaults"
787
+ ],
788
+ "summary": "List vaults",
789
+ "operationId": "listVaults",
790
+ "responses": {
791
+ "200": {
792
+ "description": "List of vaults",
793
+ "content": {
794
+ "application/json": {
795
+ "schema": {
796
+ "$ref": "#/components/schemas/VaultListResponse"
797
+ }
798
+ }
799
+ }
800
+ }
801
+ }
802
+ }
803
+ },
804
+ "/v1/vaults/{vault_id}": {
805
+ "get": {
806
+ "tags": [
807
+ "Vaults"
808
+ ],
809
+ "summary": "Get vault details",
810
+ "operationId": "getVault",
811
+ "parameters": [
812
+ {
813
+ "$ref": "#/components/parameters/VaultId"
814
+ }
815
+ ],
816
+ "responses": {
817
+ "200": {
818
+ "description": "Vault details",
819
+ "content": {
820
+ "application/json": {
821
+ "schema": {
822
+ "$ref": "#/components/schemas/VaultResponse"
823
+ }
824
+ }
825
+ }
826
+ },
827
+ "404": {
828
+ "$ref": "#/components/responses/NotFound"
829
+ }
830
+ }
831
+ },
832
+ "delete": {
833
+ "tags": [
834
+ "Vaults"
835
+ ],
836
+ "summary": "Delete a vault",
837
+ "operationId": "deleteVault",
838
+ "parameters": [
839
+ {
840
+ "$ref": "#/components/parameters/VaultId"
841
+ }
842
+ ],
843
+ "responses": {
844
+ "204": {
845
+ "description": "Vault deleted"
846
+ },
847
+ "404": {
848
+ "$ref": "#/components/responses/NotFound"
849
+ }
850
+ }
851
+ }
852
+ },
853
+ "/v1/vaults/{vault_id}/secrets": {
854
+ "get": {
855
+ "tags": [
856
+ "Secrets"
857
+ ],
858
+ "summary": "List secrets in a vault",
859
+ "operationId": "listSecrets",
860
+ "parameters": [
861
+ {
862
+ "$ref": "#/components/parameters/VaultId"
863
+ },
864
+ {
865
+ "name": "prefix",
866
+ "in": "query",
867
+ "schema": {
868
+ "type": "string"
869
+ },
870
+ "description": "Filter by path prefix"
871
+ }
872
+ ],
873
+ "responses": {
874
+ "200": {
875
+ "description": "Secret metadata list",
876
+ "content": {
877
+ "application/json": {
878
+ "schema": {
879
+ "$ref": "#/components/schemas/SecretListResponse"
880
+ }
881
+ }
882
+ }
883
+ },
884
+ "404": {
885
+ "$ref": "#/components/responses/NotFound"
886
+ }
887
+ }
888
+ }
889
+ },
890
+ "/v1/vaults/{vault_id}/secrets/{path}": {
891
+ "put": {
892
+ "tags": [
893
+ "Secrets"
894
+ ],
895
+ "summary": "Store or update a secret",
896
+ "operationId": "putSecret",
897
+ "parameters": [
898
+ {
899
+ "$ref": "#/components/parameters/VaultId"
900
+ },
901
+ {
902
+ "$ref": "#/components/parameters/SecretPath"
903
+ }
904
+ ],
905
+ "requestBody": {
906
+ "required": true,
907
+ "content": {
908
+ "application/json": {
909
+ "schema": {
910
+ "$ref": "#/components/schemas/PutSecretRequest"
911
+ }
912
+ }
913
+ }
914
+ },
915
+ "responses": {
916
+ "201": {
917
+ "description": "Secret created or updated",
918
+ "content": {
919
+ "application/json": {
920
+ "schema": {
921
+ "$ref": "#/components/schemas/SecretMetadataResponse"
922
+ }
923
+ }
924
+ }
925
+ },
926
+ "400": {
927
+ "$ref": "#/components/responses/BadRequest"
928
+ }
929
+ }
930
+ },
931
+ "get": {
932
+ "tags": [
933
+ "Secrets"
934
+ ],
935
+ "summary": "Retrieve a decrypted secret",
936
+ "operationId": "getSecret",
937
+ "parameters": [
938
+ {
939
+ "$ref": "#/components/parameters/VaultId"
940
+ },
941
+ {
942
+ "$ref": "#/components/parameters/SecretPath"
943
+ }
944
+ ],
945
+ "responses": {
946
+ "200": {
947
+ "description": "Decrypted secret value",
948
+ "content": {
949
+ "application/json": {
950
+ "schema": {
951
+ "$ref": "#/components/schemas/SecretResponse"
952
+ }
953
+ }
954
+ }
955
+ },
956
+ "402": {
957
+ "$ref": "#/components/responses/PaymentRequired"
958
+ },
959
+ "404": {
960
+ "$ref": "#/components/responses/NotFound"
961
+ }
962
+ }
963
+ },
964
+ "delete": {
965
+ "tags": [
966
+ "Secrets"
967
+ ],
968
+ "summary": "Delete a secret",
969
+ "operationId": "deleteSecret",
970
+ "parameters": [
971
+ {
972
+ "$ref": "#/components/parameters/VaultId"
973
+ },
974
+ {
975
+ "$ref": "#/components/parameters/SecretPath"
976
+ }
977
+ ],
978
+ "responses": {
979
+ "204": {
980
+ "description": "Secret deleted"
981
+ },
982
+ "404": {
983
+ "$ref": "#/components/responses/NotFound"
984
+ }
985
+ }
986
+ }
987
+ },
988
+ "/v1/vaults/{vault_id}/policies": {
989
+ "post": {
990
+ "tags": [
991
+ "Policies"
992
+ ],
993
+ "summary": "Create an access policy",
994
+ "operationId": "createPolicy",
995
+ "parameters": [
996
+ {
997
+ "$ref": "#/components/parameters/VaultId"
998
+ }
999
+ ],
1000
+ "requestBody": {
1001
+ "required": true,
1002
+ "content": {
1003
+ "application/json": {
1004
+ "schema": {
1005
+ "$ref": "#/components/schemas/CreatePolicyRequest"
1006
+ }
1007
+ }
1008
+ }
1009
+ },
1010
+ "responses": {
1011
+ "201": {
1012
+ "description": "Policy created",
1013
+ "content": {
1014
+ "application/json": {
1015
+ "schema": {
1016
+ "$ref": "#/components/schemas/PolicyResponse"
1017
+ }
1018
+ }
1019
+ }
1020
+ },
1021
+ "400": {
1022
+ "$ref": "#/components/responses/BadRequest"
1023
+ }
1024
+ }
1025
+ },
1026
+ "get": {
1027
+ "tags": [
1028
+ "Policies"
1029
+ ],
1030
+ "summary": "List policies on a vault",
1031
+ "operationId": "listPolicies",
1032
+ "parameters": [
1033
+ {
1034
+ "$ref": "#/components/parameters/VaultId"
1035
+ }
1036
+ ],
1037
+ "responses": {
1038
+ "200": {
1039
+ "description": "Policy list",
1040
+ "content": {
1041
+ "application/json": {
1042
+ "schema": {
1043
+ "$ref": "#/components/schemas/PolicyListResponse"
1044
+ }
1045
+ }
1046
+ }
1047
+ }
1048
+ }
1049
+ }
1050
+ },
1051
+ "/v1/vaults/{vault_id}/policies/{policy_id}": {
1052
+ "put": {
1053
+ "tags": [
1054
+ "Policies"
1055
+ ],
1056
+ "summary": "Update a policy",
1057
+ "operationId": "updatePolicy",
1058
+ "parameters": [
1059
+ {
1060
+ "$ref": "#/components/parameters/VaultId"
1061
+ },
1062
+ {
1063
+ "$ref": "#/components/parameters/PolicyId"
1064
+ }
1065
+ ],
1066
+ "requestBody": {
1067
+ "required": true,
1068
+ "content": {
1069
+ "application/json": {
1070
+ "schema": {
1071
+ "$ref": "#/components/schemas/UpdatePolicyRequest"
1072
+ }
1073
+ }
1074
+ }
1075
+ },
1076
+ "responses": {
1077
+ "200": {
1078
+ "description": "Policy updated",
1079
+ "content": {
1080
+ "application/json": {
1081
+ "schema": {
1082
+ "$ref": "#/components/schemas/PolicyResponse"
1083
+ }
1084
+ }
1085
+ }
1086
+ },
1087
+ "404": {
1088
+ "$ref": "#/components/responses/NotFound"
1089
+ }
1090
+ }
1091
+ },
1092
+ "delete": {
1093
+ "tags": [
1094
+ "Policies"
1095
+ ],
1096
+ "summary": "Revoke a policy",
1097
+ "operationId": "deletePolicy",
1098
+ "parameters": [
1099
+ {
1100
+ "$ref": "#/components/parameters/VaultId"
1101
+ },
1102
+ {
1103
+ "$ref": "#/components/parameters/PolicyId"
1104
+ }
1105
+ ],
1106
+ "responses": {
1107
+ "204": {
1108
+ "description": "Policy revoked"
1109
+ },
1110
+ "404": {
1111
+ "$ref": "#/components/responses/NotFound"
1112
+ }
1113
+ }
1114
+ }
1115
+ },
1116
+ "/v1/agents": {
1117
+ "post": {
1118
+ "tags": [
1119
+ "Agents"
1120
+ ],
1121
+ "summary": "Register a new agent",
1122
+ "operationId": "createAgent",
1123
+ "requestBody": {
1124
+ "required": true,
1125
+ "content": {
1126
+ "application/json": {
1127
+ "schema": {
1128
+ "$ref": "#/components/schemas/CreateAgentRequest"
1129
+ }
1130
+ }
1131
+ }
1132
+ },
1133
+ "responses": {
1134
+ "201": {
1135
+ "description": "Agent created with one-time API key",
1136
+ "content": {
1137
+ "application/json": {
1138
+ "schema": {
1139
+ "$ref": "#/components/schemas/AgentCreatedResponse"
1140
+ }
1141
+ }
1142
+ }
1143
+ },
1144
+ "400": {
1145
+ "$ref": "#/components/responses/BadRequest"
1146
+ }
1147
+ }
1148
+ },
1149
+ "get": {
1150
+ "tags": [
1151
+ "Agents"
1152
+ ],
1153
+ "summary": "List agents",
1154
+ "operationId": "listAgents",
1155
+ "responses": {
1156
+ "200": {
1157
+ "description": "Agent list",
1158
+ "content": {
1159
+ "application/json": {
1160
+ "schema": {
1161
+ "$ref": "#/components/schemas/AgentListResponse"
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+ }
1167
+ }
1168
+ },
1169
+ "/v1/agents/me": {
1170
+ "get": {
1171
+ "tags": [
1172
+ "Agents"
1173
+ ],
1174
+ "summary": "Get the calling agent's own profile",
1175
+ "operationId": "getAgentSelf",
1176
+ "responses": {
1177
+ "200": {
1178
+ "description": "Agent self profile",
1179
+ "content": {
1180
+ "application/json": {
1181
+ "schema": {
1182
+ "$ref": "#/components/schemas/AgentSelfResponse"
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ "403": {
1188
+ "$ref": "#/components/responses/Forbidden"
1189
+ }
1190
+ }
1191
+ }
1192
+ },
1193
+ "/v1/agents/{agent_id}": {
1194
+ "get": {
1195
+ "tags": [
1196
+ "Agents"
1197
+ ],
1198
+ "summary": "Get agent details",
1199
+ "operationId": "getAgent",
1200
+ "parameters": [
1201
+ {
1202
+ "$ref": "#/components/parameters/AgentId"
1203
+ }
1204
+ ],
1205
+ "responses": {
1206
+ "200": {
1207
+ "description": "Agent details",
1208
+ "content": {
1209
+ "application/json": {
1210
+ "schema": {
1211
+ "$ref": "#/components/schemas/AgentResponse"
1212
+ }
1213
+ }
1214
+ }
1215
+ },
1216
+ "404": {
1217
+ "$ref": "#/components/responses/NotFound"
1218
+ }
1219
+ }
1220
+ },
1221
+ "patch": {
1222
+ "tags": [
1223
+ "Agents"
1224
+ ],
1225
+ "summary": "Update an agent",
1226
+ "operationId": "updateAgent",
1227
+ "parameters": [
1228
+ {
1229
+ "$ref": "#/components/parameters/AgentId"
1230
+ }
1231
+ ],
1232
+ "requestBody": {
1233
+ "required": true,
1234
+ "content": {
1235
+ "application/json": {
1236
+ "schema": {
1237
+ "$ref": "#/components/schemas/UpdateAgentRequest"
1238
+ }
1239
+ }
1240
+ }
1241
+ },
1242
+ "responses": {
1243
+ "200": {
1244
+ "description": "Agent updated",
1245
+ "content": {
1246
+ "application/json": {
1247
+ "schema": {
1248
+ "$ref": "#/components/schemas/AgentResponse"
1249
+ }
1250
+ }
1251
+ }
1252
+ },
1253
+ "404": {
1254
+ "$ref": "#/components/responses/NotFound"
1255
+ }
1256
+ }
1257
+ },
1258
+ "delete": {
1259
+ "tags": [
1260
+ "Agents"
1261
+ ],
1262
+ "summary": "Delete an agent",
1263
+ "operationId": "deleteAgent",
1264
+ "parameters": [
1265
+ {
1266
+ "$ref": "#/components/parameters/AgentId"
1267
+ }
1268
+ ],
1269
+ "responses": {
1270
+ "204": {
1271
+ "description": "Agent deleted"
1272
+ },
1273
+ "404": {
1274
+ "$ref": "#/components/responses/NotFound"
1275
+ }
1276
+ }
1277
+ }
1278
+ },
1279
+ "/v1/agents/{agent_id}/rotate-key": {
1280
+ "post": {
1281
+ "tags": [
1282
+ "Agents"
1283
+ ],
1284
+ "summary": "Rotate agent API key",
1285
+ "operationId": "rotateAgentKey",
1286
+ "parameters": [
1287
+ {
1288
+ "$ref": "#/components/parameters/AgentId"
1289
+ }
1290
+ ],
1291
+ "responses": {
1292
+ "200": {
1293
+ "description": "New API key returned",
1294
+ "content": {
1295
+ "application/json": {
1296
+ "schema": {
1297
+ "$ref": "#/components/schemas/AgentKeyRotatedResponse"
1298
+ }
1299
+ }
1300
+ }
1301
+ },
1302
+ "404": {
1303
+ "$ref": "#/components/responses/NotFound"
1304
+ }
1305
+ }
1306
+ }
1307
+ },
1308
+ "/v1/agents/{agent_id}/transactions": {
1309
+ "post": {
1310
+ "tags": [
1311
+ "Transactions"
1312
+ ],
1313
+ "summary": "Submit a transaction for signing",
1314
+ "operationId": "submitTransaction",
1315
+ "parameters": [
1316
+ {
1317
+ "$ref": "#/components/parameters/AgentId"
1318
+ }
1319
+ ],
1320
+ "requestBody": {
1321
+ "required": true,
1322
+ "content": {
1323
+ "application/json": {
1324
+ "schema": {
1325
+ "$ref": "#/components/schemas/SubmitTransactionRequest"
1326
+ }
1327
+ }
1328
+ }
1329
+ },
1330
+ "responses": {
1331
+ "201": {
1332
+ "description": "Transaction signed (and optionally broadcast)",
1333
+ "content": {
1334
+ "application/json": {
1335
+ "schema": {
1336
+ "$ref": "#/components/schemas/TransactionResponse"
1337
+ }
1338
+ }
1339
+ }
1340
+ },
1341
+ "403": {
1342
+ "$ref": "#/components/responses/Forbidden"
1343
+ },
1344
+ "422": {
1345
+ "description": "Simulation reverted (when simulate_first is true)",
1346
+ "content": {
1347
+ "application/json": {
1348
+ "schema": {
1349
+ "$ref": "#/components/schemas/TransactionResponse"
1350
+ }
1351
+ }
1352
+ }
1353
+ }
1354
+ }
1355
+ },
1356
+ "get": {
1357
+ "tags": [
1358
+ "Transactions"
1359
+ ],
1360
+ "summary": "List agent transactions",
1361
+ "operationId": "listTransactions",
1362
+ "parameters": [
1363
+ {
1364
+ "$ref": "#/components/parameters/AgentId"
1365
+ }
1366
+ ],
1367
+ "responses": {
1368
+ "200": {
1369
+ "description": "Transaction list",
1370
+ "content": {
1371
+ "application/json": {
1372
+ "schema": {
1373
+ "$ref": "#/components/schemas/TransactionListResponse"
1374
+ }
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+ }
1380
+ },
1381
+ "/v1/agents/{agent_id}/transactions/{tx_id}": {
1382
+ "get": {
1383
+ "tags": [
1384
+ "Transactions"
1385
+ ],
1386
+ "summary": "Get a transaction by ID",
1387
+ "operationId": "getTransaction",
1388
+ "parameters": [
1389
+ {
1390
+ "$ref": "#/components/parameters/AgentId"
1391
+ },
1392
+ {
1393
+ "name": "tx_id",
1394
+ "in": "path",
1395
+ "required": true,
1396
+ "schema": {
1397
+ "type": "string",
1398
+ "format": "uuid"
1399
+ }
1400
+ }
1401
+ ],
1402
+ "responses": {
1403
+ "200": {
1404
+ "description": "Transaction details",
1405
+ "content": {
1406
+ "application/json": {
1407
+ "schema": {
1408
+ "$ref": "#/components/schemas/TransactionResponse"
1409
+ }
1410
+ }
1411
+ }
1412
+ },
1413
+ "404": {
1414
+ "$ref": "#/components/responses/NotFound"
1415
+ }
1416
+ }
1417
+ }
1418
+ },
1419
+ "/v1/agents/{agent_id}/transactions/simulate": {
1420
+ "post": {
1421
+ "tags": [
1422
+ "Transactions"
1423
+ ],
1424
+ "summary": "Simulate a transaction via Tenderly",
1425
+ "operationId": "simulateTransaction",
1426
+ "parameters": [
1427
+ {
1428
+ "$ref": "#/components/parameters/AgentId"
1429
+ }
1430
+ ],
1431
+ "requestBody": {
1432
+ "required": true,
1433
+ "content": {
1434
+ "application/json": {
1435
+ "schema": {
1436
+ "$ref": "#/components/schemas/SimulateTransactionRequest"
1437
+ }
1438
+ }
1439
+ }
1440
+ },
1441
+ "responses": {
1442
+ "200": {
1443
+ "description": "Simulation result",
1444
+ "content": {
1445
+ "application/json": {
1446
+ "schema": {
1447
+ "$ref": "#/components/schemas/SimulationResponse"
1448
+ }
1449
+ }
1450
+ }
1451
+ },
1452
+ "400": {
1453
+ "$ref": "#/components/responses/BadRequest"
1454
+ },
1455
+ "403": {
1456
+ "$ref": "#/components/responses/Forbidden"
1457
+ }
1458
+ }
1459
+ }
1460
+ },
1461
+ "/v1/agents/{agent_id}/transactions/simulate-bundle": {
1462
+ "post": {
1463
+ "tags": [
1464
+ "Transactions"
1465
+ ],
1466
+ "summary": "Simulate a bundle of transactions",
1467
+ "operationId": "simulateBundle",
1468
+ "parameters": [
1469
+ {
1470
+ "$ref": "#/components/parameters/AgentId"
1471
+ }
1472
+ ],
1473
+ "requestBody": {
1474
+ "required": true,
1475
+ "content": {
1476
+ "application/json": {
1477
+ "schema": {
1478
+ "$ref": "#/components/schemas/SimulateBundleRequest"
1479
+ }
1480
+ }
1481
+ }
1482
+ },
1483
+ "responses": {
1484
+ "200": {
1485
+ "description": "Bundle simulation results",
1486
+ "content": {
1487
+ "application/json": {
1488
+ "schema": {
1489
+ "$ref": "#/components/schemas/BundleSimulationResponse"
1490
+ }
1491
+ }
1492
+ }
1493
+ },
1494
+ "400": {
1495
+ "$ref": "#/components/responses/BadRequest"
1496
+ }
1497
+ }
1498
+ }
1499
+ },
1500
+ "/v1/chains": {
1501
+ "get": {
1502
+ "tags": [
1503
+ "Chains"
1504
+ ],
1505
+ "summary": "List enabled chains",
1506
+ "operationId": "listChains",
1507
+ "security": [],
1508
+ "responses": {
1509
+ "200": {
1510
+ "description": "Chain list",
1511
+ "content": {
1512
+ "application/json": {
1513
+ "schema": {
1514
+ "$ref": "#/components/schemas/ChainListResponse"
1515
+ }
1516
+ }
1517
+ }
1518
+ }
1519
+ }
1520
+ }
1521
+ },
1522
+ "/v1/chains/{identifier}": {
1523
+ "get": {
1524
+ "tags": [
1525
+ "Chains"
1526
+ ],
1527
+ "summary": "Get chain by name or ID",
1528
+ "operationId": "getChain",
1529
+ "security": [],
1530
+ "parameters": [
1531
+ {
1532
+ "name": "identifier",
1533
+ "in": "path",
1534
+ "required": true,
1535
+ "schema": {
1536
+ "type": "string"
1537
+ },
1538
+ "description": "Chain name (e.g. \"ethereum\") or numeric chain ID"
1539
+ }
1540
+ ],
1541
+ "responses": {
1542
+ "200": {
1543
+ "description": "Chain details",
1544
+ "content": {
1545
+ "application/json": {
1546
+ "schema": {
1547
+ "$ref": "#/components/schemas/ChainResponse"
1548
+ }
1549
+ }
1550
+ }
1551
+ },
1552
+ "404": {
1553
+ "$ref": "#/components/responses/NotFound"
1554
+ }
1555
+ }
1556
+ }
1557
+ },
1558
+ "/v1/admin/chains": {
1559
+ "get": {
1560
+ "tags": [
1561
+ "Chains"
1562
+ ],
1563
+ "summary": "List all chains including disabled (admin)",
1564
+ "operationId": "adminListChains",
1565
+ "responses": {
1566
+ "200": {
1567
+ "description": "Full chain list",
1568
+ "content": {
1569
+ "application/json": {
1570
+ "schema": {
1571
+ "$ref": "#/components/schemas/ChainListResponse"
1572
+ }
1573
+ }
1574
+ }
1575
+ }
1576
+ }
1577
+ },
1578
+ "post": {
1579
+ "tags": [
1580
+ "Chains"
1581
+ ],
1582
+ "summary": "Add a chain (admin)",
1583
+ "operationId": "createChain",
1584
+ "requestBody": {
1585
+ "required": true,
1586
+ "content": {
1587
+ "application/json": {
1588
+ "schema": {
1589
+ "$ref": "#/components/schemas/CreateChainRequest"
1590
+ }
1591
+ }
1592
+ }
1593
+ },
1594
+ "responses": {
1595
+ "201": {
1596
+ "description": "Chain added",
1597
+ "content": {
1598
+ "application/json": {
1599
+ "schema": {
1600
+ "$ref": "#/components/schemas/ChainResponse"
1601
+ }
1602
+ }
1603
+ }
1604
+ }
1605
+ }
1606
+ }
1607
+ },
1608
+ "/v1/admin/chains/{chain_id}": {
1609
+ "put": {
1610
+ "tags": [
1611
+ "Chains"
1612
+ ],
1613
+ "summary": "Update a chain (admin)",
1614
+ "operationId": "updateChain",
1615
+ "parameters": [
1616
+ {
1617
+ "name": "chain_id",
1618
+ "in": "path",
1619
+ "required": true,
1620
+ "schema": {
1621
+ "type": "string",
1622
+ "format": "uuid"
1623
+ }
1624
+ }
1625
+ ],
1626
+ "requestBody": {
1627
+ "required": true,
1628
+ "content": {
1629
+ "application/json": {
1630
+ "schema": {
1631
+ "$ref": "#/components/schemas/UpdateChainRequest"
1632
+ }
1633
+ }
1634
+ }
1635
+ },
1636
+ "responses": {
1637
+ "200": {
1638
+ "description": "Chain updated",
1639
+ "content": {
1640
+ "application/json": {
1641
+ "schema": {
1642
+ "$ref": "#/components/schemas/ChainResponse"
1643
+ }
1644
+ }
1645
+ }
1646
+ }
1647
+ }
1648
+ },
1649
+ "delete": {
1650
+ "tags": [
1651
+ "Chains"
1652
+ ],
1653
+ "summary": "Remove a chain (admin)",
1654
+ "operationId": "deleteChain",
1655
+ "parameters": [
1656
+ {
1657
+ "name": "chain_id",
1658
+ "in": "path",
1659
+ "required": true,
1660
+ "schema": {
1661
+ "type": "string",
1662
+ "format": "uuid"
1663
+ }
1664
+ }
1665
+ ],
1666
+ "responses": {
1667
+ "204": {
1668
+ "description": "Chain removed"
1669
+ }
1670
+ }
1671
+ }
1672
+ },
1673
+ "/v1/secrets/{secret_id}/share": {
1674
+ "post": {
1675
+ "tags": [
1676
+ "Sharing"
1677
+ ],
1678
+ "summary": "Create a share link for a secret",
1679
+ "operationId": "createShare",
1680
+ "parameters": [
1681
+ {
1682
+ "name": "secret_id",
1683
+ "in": "path",
1684
+ "required": true,
1685
+ "schema": {
1686
+ "type": "string",
1687
+ "format": "uuid"
1688
+ }
1689
+ }
1690
+ ],
1691
+ "requestBody": {
1692
+ "required": true,
1693
+ "content": {
1694
+ "application/json": {
1695
+ "schema": {
1696
+ "$ref": "#/components/schemas/CreateShareRequest"
1697
+ }
1698
+ }
1699
+ }
1700
+ },
1701
+ "responses": {
1702
+ "201": {
1703
+ "description": "Share created",
1704
+ "content": {
1705
+ "application/json": {
1706
+ "schema": {
1707
+ "$ref": "#/components/schemas/ShareResponse"
1708
+ }
1709
+ }
1710
+ }
1711
+ },
1712
+ "404": {
1713
+ "$ref": "#/components/responses/NotFound"
1714
+ }
1715
+ }
1716
+ }
1717
+ },
1718
+ "/v1/share/{share_id}": {
1719
+ "get": {
1720
+ "tags": [
1721
+ "Sharing"
1722
+ ],
1723
+ "summary": "Access a shared secret",
1724
+ "operationId": "accessShare",
1725
+ "security": [],
1726
+ "parameters": [
1727
+ {
1728
+ "name": "share_id",
1729
+ "in": "path",
1730
+ "required": true,
1731
+ "schema": {
1732
+ "type": "string",
1733
+ "format": "uuid"
1734
+ }
1735
+ }
1736
+ ],
1737
+ "responses": {
1738
+ "200": {
1739
+ "description": "Shared secret value",
1740
+ "content": {
1741
+ "application/json": {
1742
+ "schema": {
1743
+ "$ref": "#/components/schemas/SharedSecretResponse"
1744
+ }
1745
+ }
1746
+ }
1747
+ },
1748
+ "402": {
1749
+ "$ref": "#/components/responses/PaymentRequired"
1750
+ },
1751
+ "404": {
1752
+ "$ref": "#/components/responses/NotFound"
1753
+ }
1754
+ }
1755
+ },
1756
+ "delete": {
1757
+ "tags": [
1758
+ "Sharing"
1759
+ ],
1760
+ "summary": "Revoke a share link",
1761
+ "operationId": "revokeShare",
1762
+ "parameters": [
1763
+ {
1764
+ "name": "share_id",
1765
+ "in": "path",
1766
+ "required": true,
1767
+ "schema": {
1768
+ "type": "string",
1769
+ "format": "uuid"
1770
+ }
1771
+ }
1772
+ ],
1773
+ "responses": {
1774
+ "204": {
1775
+ "description": "Share revoked"
1776
+ }
1777
+ }
1778
+ }
1779
+ },
1780
+ "/v1/shares/outbound": {
1781
+ "get": {
1782
+ "tags": [
1783
+ "Sharing"
1784
+ ],
1785
+ "summary": "List shares you have sent",
1786
+ "operationId": "listOutboundShares",
1787
+ "responses": {
1788
+ "200": {
1789
+ "description": "Outbound share list",
1790
+ "content": {
1791
+ "application/json": {
1792
+ "schema": {
1793
+ "$ref": "#/components/schemas/ShareListResponse"
1794
+ }
1795
+ }
1796
+ }
1797
+ }
1798
+ }
1799
+ }
1800
+ },
1801
+ "/v1/shares/inbound": {
1802
+ "get": {
1803
+ "tags": [
1804
+ "Sharing"
1805
+ ],
1806
+ "summary": "List shares sent to you",
1807
+ "operationId": "listInboundShares",
1808
+ "responses": {
1809
+ "200": {
1810
+ "description": "Inbound share list",
1811
+ "content": {
1812
+ "application/json": {
1813
+ "schema": {
1814
+ "$ref": "#/components/schemas/ShareListResponse"
1815
+ }
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ }
1821
+ },
1822
+ "/v1/shares/{share_id}/accept": {
1823
+ "post": {
1824
+ "tags": [
1825
+ "Sharing"
1826
+ ],
1827
+ "summary": "Accept an inbound share",
1828
+ "operationId": "acceptShare",
1829
+ "parameters": [
1830
+ {
1831
+ "name": "share_id",
1832
+ "in": "path",
1833
+ "required": true,
1834
+ "schema": {
1835
+ "type": "string",
1836
+ "format": "uuid"
1837
+ }
1838
+ }
1839
+ ],
1840
+ "responses": {
1841
+ "204": {
1842
+ "description": "Share accepted"
1843
+ }
1844
+ }
1845
+ }
1846
+ },
1847
+ "/v1/shares/{share_id}/decline": {
1848
+ "post": {
1849
+ "tags": [
1850
+ "Sharing"
1851
+ ],
1852
+ "summary": "Decline an inbound share",
1853
+ "operationId": "declineShare",
1854
+ "parameters": [
1855
+ {
1856
+ "name": "share_id",
1857
+ "in": "path",
1858
+ "required": true,
1859
+ "schema": {
1860
+ "type": "string",
1861
+ "format": "uuid"
1862
+ }
1863
+ }
1864
+ ],
1865
+ "responses": {
1866
+ "204": {
1867
+ "description": "Share declined"
1868
+ }
1869
+ }
1870
+ }
1871
+ },
1872
+ "/v1/org/members": {
1873
+ "get": {
1874
+ "tags": [
1875
+ "Organization"
1876
+ ],
1877
+ "summary": "List organization members",
1878
+ "operationId": "listOrgMembers",
1879
+ "responses": {
1880
+ "200": {
1881
+ "description": "Member list",
1882
+ "content": {
1883
+ "application/json": {
1884
+ "schema": {
1885
+ "$ref": "#/components/schemas/OrgMemberListResponse"
1886
+ }
1887
+ }
1888
+ }
1889
+ }
1890
+ }
1891
+ }
1892
+ },
1893
+ "/v1/org/invite": {
1894
+ "post": {
1895
+ "tags": [
1896
+ "Organization"
1897
+ ],
1898
+ "summary": "Invite a member by email",
1899
+ "operationId": "inviteMember",
1900
+ "requestBody": {
1901
+ "required": true,
1902
+ "content": {
1903
+ "application/json": {
1904
+ "schema": {
1905
+ "$ref": "#/components/schemas/InviteMemberRequest"
1906
+ }
1907
+ }
1908
+ }
1909
+ },
1910
+ "responses": {
1911
+ "200": {
1912
+ "description": "Invitation sent",
1913
+ "content": {
1914
+ "application/json": {
1915
+ "schema": {
1916
+ "$ref": "#/components/schemas/InviteMemberResponse"
1917
+ }
1918
+ }
1919
+ }
1920
+ }
1921
+ }
1922
+ }
1923
+ },
1924
+ "/v1/org/members/{user_id}": {
1925
+ "patch": {
1926
+ "tags": [
1927
+ "Organization"
1928
+ ],
1929
+ "summary": "Update a member's role",
1930
+ "operationId": "updateMemberRole",
1931
+ "parameters": [
1932
+ {
1933
+ "name": "user_id",
1934
+ "in": "path",
1935
+ "required": true,
1936
+ "schema": {
1937
+ "type": "string",
1938
+ "format": "uuid"
1939
+ }
1940
+ }
1941
+ ],
1942
+ "requestBody": {
1943
+ "required": true,
1944
+ "content": {
1945
+ "application/json": {
1946
+ "schema": {
1947
+ "$ref": "#/components/schemas/UpdateMemberRoleRequest"
1948
+ }
1949
+ }
1950
+ }
1951
+ },
1952
+ "responses": {
1953
+ "200": {
1954
+ "description": "Role updated",
1955
+ "content": {
1956
+ "application/json": {
1957
+ "schema": {
1958
+ "$ref": "#/components/schemas/OrgMemberResponse"
1959
+ }
1960
+ }
1961
+ }
1962
+ }
1963
+ }
1964
+ },
1965
+ "delete": {
1966
+ "tags": [
1967
+ "Organization"
1968
+ ],
1969
+ "summary": "Remove a member from the organization",
1970
+ "operationId": "removeMember",
1971
+ "parameters": [
1972
+ {
1973
+ "name": "user_id",
1974
+ "in": "path",
1975
+ "required": true,
1976
+ "schema": {
1977
+ "type": "string",
1978
+ "format": "uuid"
1979
+ }
1980
+ }
1981
+ ],
1982
+ "responses": {
1983
+ "204": {
1984
+ "description": "Member removed"
1985
+ }
1986
+ }
1987
+ }
1988
+ },
1989
+ "/v1/billing/usage": {
1990
+ "get": {
1991
+ "tags": [
1992
+ "Billing"
1993
+ ],
1994
+ "summary": "Get usage summary (legacy)",
1995
+ "operationId": "billingUsage",
1996
+ "responses": {
1997
+ "200": {
1998
+ "description": "Usage summary",
1999
+ "content": {
2000
+ "application/json": {
2001
+ "schema": {
2002
+ "$ref": "#/components/schemas/UsageSummaryResponse"
2003
+ }
2004
+ }
2005
+ }
2006
+ }
2007
+ }
2008
+ }
2009
+ },
2010
+ "/v1/billing/history": {
2011
+ "get": {
2012
+ "tags": [
2013
+ "Billing"
2014
+ ],
2015
+ "summary": "Get usage event history (legacy)",
2016
+ "operationId": "billingHistory",
2017
+ "parameters": [
2018
+ {
2019
+ "name": "limit",
2020
+ "in": "query",
2021
+ "schema": {
2022
+ "type": "integer",
2023
+ "default": 50
2024
+ }
2025
+ }
2026
+ ],
2027
+ "responses": {
2028
+ "200": {
2029
+ "description": "Usage event list",
2030
+ "content": {
2031
+ "application/json": {
2032
+ "schema": {
2033
+ "$ref": "#/components/schemas/UsageHistoryResponse"
2034
+ }
2035
+ }
2036
+ }
2037
+ }
2038
+ }
2039
+ }
2040
+ },
2041
+ "/v1/billing/subscribe": {
2042
+ "post": {
2043
+ "tags": [
2044
+ "Billing"
2045
+ ],
2046
+ "summary": "Start a subscription via Stripe Checkout",
2047
+ "operationId": "billingSubscribe",
2048
+ "requestBody": {
2049
+ "required": true,
2050
+ "content": {
2051
+ "application/json": {
2052
+ "schema": {
2053
+ "$ref": "#/components/schemas/SubscribeRequest"
2054
+ }
2055
+ }
2056
+ }
2057
+ },
2058
+ "responses": {
2059
+ "200": {
2060
+ "description": "Checkout URL",
2061
+ "content": {
2062
+ "application/json": {
2063
+ "schema": {
2064
+ "$ref": "#/components/schemas/CheckoutUrlResponse"
2065
+ }
2066
+ }
2067
+ }
2068
+ }
2069
+ }
2070
+ }
2071
+ },
2072
+ "/v1/billing/portal": {
2073
+ "post": {
2074
+ "tags": [
2075
+ "Billing"
2076
+ ],
2077
+ "summary": "Open Stripe Customer Portal",
2078
+ "operationId": "billingPortal",
2079
+ "responses": {
2080
+ "200": {
2081
+ "description": "Portal URL",
2082
+ "content": {
2083
+ "application/json": {
2084
+ "schema": {
2085
+ "$ref": "#/components/schemas/PortalUrlResponse"
2086
+ }
2087
+ }
2088
+ }
2089
+ }
2090
+ }
2091
+ }
2092
+ },
2093
+ "/v1/billing/subscription": {
2094
+ "get": {
2095
+ "tags": [
2096
+ "Billing"
2097
+ ],
2098
+ "summary": "Get subscription, usage, and credit summary",
2099
+ "operationId": "billingSubscription",
2100
+ "responses": {
2101
+ "200": {
2102
+ "description": "Full billing summary",
2103
+ "content": {
2104
+ "application/json": {
2105
+ "schema": {
2106
+ "$ref": "#/components/schemas/SubscriptionResponse"
2107
+ }
2108
+ }
2109
+ }
2110
+ }
2111
+ }
2112
+ }
2113
+ },
2114
+ "/v1/billing/credits/topup": {
2115
+ "post": {
2116
+ "tags": [
2117
+ "Billing"
2118
+ ],
2119
+ "summary": "Top up prepaid credits via Stripe",
2120
+ "operationId": "billingCreditTopup",
2121
+ "requestBody": {
2122
+ "required": true,
2123
+ "content": {
2124
+ "application/json": {
2125
+ "schema": {
2126
+ "$ref": "#/components/schemas/TopupRequest"
2127
+ }
2128
+ }
2129
+ }
2130
+ },
2131
+ "responses": {
2132
+ "200": {
2133
+ "description": "Checkout URL for top-up",
2134
+ "content": {
2135
+ "application/json": {
2136
+ "schema": {
2137
+ "$ref": "#/components/schemas/CheckoutUrlResponse"
2138
+ }
2139
+ }
2140
+ }
2141
+ }
2142
+ }
2143
+ }
2144
+ },
2145
+ "/v1/billing/credits/balance": {
2146
+ "get": {
2147
+ "tags": [
2148
+ "Billing"
2149
+ ],
2150
+ "summary": "Get credit balance",
2151
+ "operationId": "billingCreditBalance",
2152
+ "responses": {
2153
+ "200": {
2154
+ "description": "Credit balance",
2155
+ "content": {
2156
+ "application/json": {
2157
+ "schema": {
2158
+ "$ref": "#/components/schemas/CreditBalanceResponse"
2159
+ }
2160
+ }
2161
+ }
2162
+ }
2163
+ }
2164
+ }
2165
+ },
2166
+ "/v1/billing/credits/transactions": {
2167
+ "get": {
2168
+ "tags": [
2169
+ "Billing"
2170
+ ],
2171
+ "summary": "Get credit transaction ledger",
2172
+ "operationId": "billingCreditTransactions",
2173
+ "parameters": [
2174
+ {
2175
+ "name": "page",
2176
+ "in": "query",
2177
+ "schema": {
2178
+ "type": "integer",
2179
+ "default": 1
2180
+ }
2181
+ },
2182
+ {
2183
+ "name": "limit",
2184
+ "in": "query",
2185
+ "schema": {
2186
+ "type": "integer",
2187
+ "default": 50
2188
+ }
2189
+ }
2190
+ ],
2191
+ "responses": {
2192
+ "200": {
2193
+ "description": "Credit ledger",
2194
+ "content": {
2195
+ "application/json": {
2196
+ "schema": {
2197
+ "$ref": "#/components/schemas/CreditTransactionsListResponse"
2198
+ }
2199
+ }
2200
+ }
2201
+ }
2202
+ }
2203
+ }
2204
+ },
2205
+ "/v1/billing/overage-method": {
2206
+ "patch": {
2207
+ "tags": [
2208
+ "Billing"
2209
+ ],
2210
+ "summary": "Set overage payment method",
2211
+ "operationId": "billingOverageMethod",
2212
+ "requestBody": {
2213
+ "required": true,
2214
+ "content": {
2215
+ "application/json": {
2216
+ "schema": {
2217
+ "$ref": "#/components/schemas/OverageMethodRequest"
2218
+ }
2219
+ }
2220
+ }
2221
+ },
2222
+ "responses": {
2223
+ "200": {
2224
+ "description": "Overage method updated",
2225
+ "content": {
2226
+ "application/json": {
2227
+ "schema": {
2228
+ "$ref": "#/components/schemas/OverageMethodResponse"
2229
+ }
2230
+ }
2231
+ }
2232
+ }
2233
+ }
2234
+ }
2235
+ },
2236
+ "/v1/billing/webhooks": {
2237
+ "post": {
2238
+ "tags": [
2239
+ "Billing"
2240
+ ],
2241
+ "summary": "Stripe webhook receiver",
2242
+ "operationId": "billingWebhook",
2243
+ "security": [],
2244
+ "responses": {
2245
+ "200": {
2246
+ "description": "Webhook processed"
2247
+ }
2248
+ }
2249
+ }
2250
+ },
2251
+ "/v1/audit/events": {
2252
+ "get": {
2253
+ "tags": [
2254
+ "Audit"
2255
+ ],
2256
+ "summary": "Query audit events",
2257
+ "operationId": "queryAuditEvents",
2258
+ "parameters": [
2259
+ {
2260
+ "name": "resource_id",
2261
+ "in": "query",
2262
+ "schema": {
2263
+ "type": "string"
2264
+ }
2265
+ },
2266
+ {
2267
+ "name": "actor_id",
2268
+ "in": "query",
2269
+ "schema": {
2270
+ "type": "string"
2271
+ }
2272
+ },
2273
+ {
2274
+ "name": "action",
2275
+ "in": "query",
2276
+ "schema": {
2277
+ "type": "string"
2278
+ }
2279
+ },
2280
+ {
2281
+ "name": "from",
2282
+ "in": "query",
2283
+ "schema": {
2284
+ "type": "string",
2285
+ "format": "date-time"
2286
+ }
2287
+ },
2288
+ {
2289
+ "name": "to",
2290
+ "in": "query",
2291
+ "schema": {
2292
+ "type": "string",
2293
+ "format": "date-time"
2294
+ }
2295
+ },
2296
+ {
2297
+ "name": "limit",
2298
+ "in": "query",
2299
+ "schema": {
2300
+ "type": "integer",
2301
+ "default": 100
2302
+ }
2303
+ },
2304
+ {
2305
+ "name": "offset",
2306
+ "in": "query",
2307
+ "schema": {
2308
+ "type": "integer",
2309
+ "default": 0
2310
+ }
2311
+ }
2312
+ ],
2313
+ "responses": {
2314
+ "200": {
2315
+ "description": "Audit events",
2316
+ "content": {
2317
+ "application/json": {
2318
+ "schema": {
2319
+ "$ref": "#/components/schemas/AuditEventsResponse"
2320
+ }
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ }
2326
+ },
2327
+ "/v1/security/ip-rules": {
2328
+ "get": {
2329
+ "tags": [
2330
+ "Security"
2331
+ ],
2332
+ "summary": "List IP rules",
2333
+ "operationId": "listIpRules",
2334
+ "responses": {
2335
+ "200": {
2336
+ "description": "IP rule list",
2337
+ "content": {
2338
+ "application/json": {
2339
+ "schema": {
2340
+ "$ref": "#/components/schemas/IpRulesListResponse"
2341
+ }
2342
+ }
2343
+ }
2344
+ }
2345
+ }
2346
+ },
2347
+ "post": {
2348
+ "tags": [
2349
+ "Security"
2350
+ ],
2351
+ "summary": "Create an IP rule",
2352
+ "operationId": "createIpRule",
2353
+ "requestBody": {
2354
+ "required": true,
2355
+ "content": {
2356
+ "application/json": {
2357
+ "schema": {
2358
+ "$ref": "#/components/schemas/CreateIpRuleRequest"
2359
+ }
2360
+ }
2361
+ }
2362
+ },
2363
+ "responses": {
2364
+ "201": {
2365
+ "description": "Rule created",
2366
+ "content": {
2367
+ "application/json": {
2368
+ "schema": {
2369
+ "$ref": "#/components/schemas/IpRuleResponse"
2370
+ }
2371
+ }
2372
+ }
2373
+ }
2374
+ }
2375
+ }
2376
+ },
2377
+ "/v1/security/ip-rules/{rule_id}": {
2378
+ "delete": {
2379
+ "tags": [
2380
+ "Security"
2381
+ ],
2382
+ "summary": "Delete an IP rule",
2383
+ "operationId": "deleteIpRule",
2384
+ "parameters": [
2385
+ {
2386
+ "name": "rule_id",
2387
+ "in": "path",
2388
+ "required": true,
2389
+ "schema": {
2390
+ "type": "string",
2391
+ "format": "uuid"
2392
+ }
2393
+ }
2394
+ ],
2395
+ "responses": {
2396
+ "204": {
2397
+ "description": "Rule deleted"
2398
+ }
2399
+ }
2400
+ }
2401
+ },
2402
+ "/v1/admin/settings": {
2403
+ "get": {
2404
+ "tags": [
2405
+ "Admin"
2406
+ ],
2407
+ "summary": "List platform settings",
2408
+ "operationId": "adminListSettings",
2409
+ "responses": {
2410
+ "200": {
2411
+ "description": "Settings list",
2412
+ "content": {
2413
+ "application/json": {
2414
+ "schema": {
2415
+ "$ref": "#/components/schemas/SettingsListResponse"
2416
+ }
2417
+ }
2418
+ }
2419
+ }
2420
+ }
2421
+ }
2422
+ },
2423
+ "/v1/admin/settings/{key}": {
2424
+ "put": {
2425
+ "tags": [
2426
+ "Admin"
2427
+ ],
2428
+ "summary": "Update a platform setting",
2429
+ "operationId": "adminUpdateSetting",
2430
+ "parameters": [
2431
+ {
2432
+ "name": "key",
2433
+ "in": "path",
2434
+ "required": true,
2435
+ "schema": {
2436
+ "type": "string"
2437
+ }
2438
+ }
2439
+ ],
2440
+ "requestBody": {
2441
+ "required": true,
2442
+ "content": {
2443
+ "application/json": {
2444
+ "schema": {
2445
+ "$ref": "#/components/schemas/UpdateSettingRequest"
2446
+ }
2447
+ }
2448
+ }
2449
+ },
2450
+ "responses": {
2451
+ "200": {
2452
+ "description": "Setting updated",
2453
+ "content": {
2454
+ "application/json": {
2455
+ "schema": {
2456
+ "$ref": "#/components/schemas/SettingResponse"
2457
+ }
2458
+ }
2459
+ }
2460
+ }
2461
+ }
2462
+ },
2463
+ "delete": {
2464
+ "tags": [
2465
+ "Admin"
2466
+ ],
2467
+ "summary": "Delete a platform setting",
2468
+ "operationId": "adminDeleteSetting",
2469
+ "parameters": [
2470
+ {
2471
+ "name": "key",
2472
+ "in": "path",
2473
+ "required": true,
2474
+ "schema": {
2475
+ "type": "string"
2476
+ }
2477
+ }
2478
+ ],
2479
+ "responses": {
2480
+ "204": {
2481
+ "description": "Setting deleted"
2482
+ }
2483
+ }
2484
+ }
2485
+ },
2486
+ "/v1/admin/x402": {
2487
+ "get": {
2488
+ "tags": [
2489
+ "Admin"
2490
+ ],
2491
+ "summary": "Get x402 payment config",
2492
+ "operationId": "adminGetX402Config",
2493
+ "responses": {
2494
+ "200": {
2495
+ "description": "x402 config",
2496
+ "content": {
2497
+ "application/json": {
2498
+ "schema": {
2499
+ "$ref": "#/components/schemas/X402ConfigResponse"
2500
+ }
2501
+ }
2502
+ }
2503
+ }
2504
+ }
2505
+ },
2506
+ "put": {
2507
+ "tags": [
2508
+ "Admin"
2509
+ ],
2510
+ "summary": "Update x402 payment config",
2511
+ "operationId": "adminUpdateX402Config",
2512
+ "requestBody": {
2513
+ "required": true,
2514
+ "content": {
2515
+ "application/json": {
2516
+ "schema": {
2517
+ "$ref": "#/components/schemas/X402ConfigResponse"
2518
+ }
2519
+ }
2520
+ }
2521
+ },
2522
+ "responses": {
2523
+ "200": {
2524
+ "description": "Config updated",
2525
+ "content": {
2526
+ "application/json": {
2527
+ "schema": {
2528
+ "$ref": "#/components/schemas/X402ConfigResponse"
2529
+ }
2530
+ }
2531
+ }
2532
+ }
2533
+ }
2534
+ }
2535
+ },
2536
+ "/v1/admin/users": {
2537
+ "get": {
2538
+ "tags": [
2539
+ "Admin"
2540
+ ],
2541
+ "summary": "List all platform users",
2542
+ "operationId": "adminListUsers",
2543
+ "responses": {
2544
+ "200": {
2545
+ "description": "User list",
2546
+ "content": {
2547
+ "application/json": {
2548
+ "schema": {
2549
+ "$ref": "#/components/schemas/AdminUsersListResponse"
2550
+ }
2551
+ }
2552
+ }
2553
+ }
2554
+ }
2555
+ }
2556
+ },
2557
+ "/v1/admin/users/{user_id}": {
2558
+ "delete": {
2559
+ "tags": [
2560
+ "Admin"
2561
+ ],
2562
+ "summary": "Delete a user (cascade)",
2563
+ "operationId": "adminDeleteUser",
2564
+ "parameters": [
2565
+ {
2566
+ "name": "user_id",
2567
+ "in": "path",
2568
+ "required": true,
2569
+ "schema": {
2570
+ "type": "string",
2571
+ "format": "uuid"
2572
+ }
2573
+ }
2574
+ ],
2575
+ "responses": {
2576
+ "204": {
2577
+ "description": "User deleted"
2578
+ }
2579
+ }
2580
+ }
2581
+ },
2582
+ "/v1/admin/orgs/{org_id}/limits": {
2583
+ "get": {
2584
+ "tags": [
2585
+ "Admin"
2586
+ ],
2587
+ "summary": "Get org limits",
2588
+ "operationId": "adminGetOrgLimits",
2589
+ "parameters": [
2590
+ {
2591
+ "name": "org_id",
2592
+ "in": "path",
2593
+ "required": true,
2594
+ "schema": {
2595
+ "type": "string",
2596
+ "format": "uuid"
2597
+ }
2598
+ }
2599
+ ],
2600
+ "responses": {
2601
+ "200": {
2602
+ "description": "Org limits",
2603
+ "content": {
2604
+ "application/json": {
2605
+ "schema": {
2606
+ "$ref": "#/components/schemas/OrgLimitsResponse"
2607
+ }
2608
+ }
2609
+ }
2610
+ }
2611
+ }
2612
+ },
2613
+ "put": {
2614
+ "tags": [
2615
+ "Admin"
2616
+ ],
2617
+ "summary": "Update org limits",
2618
+ "operationId": "adminUpdateOrgLimits",
2619
+ "parameters": [
2620
+ {
2621
+ "name": "org_id",
2622
+ "in": "path",
2623
+ "required": true,
2624
+ "schema": {
2625
+ "type": "string",
2626
+ "format": "uuid"
2627
+ }
2628
+ }
2629
+ ],
2630
+ "requestBody": {
2631
+ "required": true,
2632
+ "content": {
2633
+ "application/json": {
2634
+ "schema": {
2635
+ "$ref": "#/components/schemas/UpdateOrgLimitsRequest"
2636
+ }
2637
+ }
2638
+ }
2639
+ },
2640
+ "responses": {
2641
+ "200": {
2642
+ "description": "Limits updated",
2643
+ "content": {
2644
+ "application/json": {
2645
+ "schema": {
2646
+ "$ref": "#/components/schemas/OrgLimitsResponse"
2647
+ }
2648
+ }
2649
+ }
2650
+ }
2651
+ }
2652
+ }
2653
+ },
2654
+ "/v1/health": {
2655
+ "get": {
2656
+ "tags": [
2657
+ "Health"
2658
+ ],
2659
+ "summary": "Service health check",
2660
+ "operationId": "healthCheck",
2661
+ "security": [],
2662
+ "responses": {
2663
+ "200": {
2664
+ "description": "Healthy",
2665
+ "content": {
2666
+ "application/json": {
2667
+ "schema": {
2668
+ "$ref": "#/components/schemas/HealthResponse"
2669
+ }
2670
+ }
2671
+ }
2672
+ }
2673
+ }
2674
+ }
2675
+ },
2676
+ "/v1/health/hsm": {
2677
+ "get": {
2678
+ "tags": [
2679
+ "Health"
2680
+ ],
2681
+ "summary": "HSM connectivity check",
2682
+ "operationId": "healthHsm",
2683
+ "security": [],
2684
+ "responses": {
2685
+ "200": {
2686
+ "description": "HSM status",
2687
+ "content": {
2688
+ "application/json": {
2689
+ "schema": {
2690
+ "type": "object",
2691
+ "properties": {
2692
+ "status": {
2693
+ "type": "string",
2694
+ "enum": [
2695
+ "ok",
2696
+ "degraded",
2697
+ "unavailable"
2698
+ ]
2699
+ }
2700
+ }
2701
+ }
2702
+ }
2703
+ }
2704
+ }
2705
+ }
2706
+ }
2707
+ }
2708
+ },
2709
+ "components": {
2710
+ "securitySchemes": {
2711
+ "BearerAuth": {
2712
+ "type": "http",
2713
+ "scheme": "bearer",
2714
+ "bearerFormat": "JWT"
2715
+ },
2716
+ "ApiKeyAuth": {
2717
+ "type": "http",
2718
+ "scheme": "bearer",
2719
+ "description": "1ck_ prefixed API key used as Bearer token"
2720
+ }
2721
+ },
2722
+ "parameters": {
2723
+ "VaultId": {
2724
+ "name": "vault_id",
2725
+ "in": "path",
2726
+ "required": true,
2727
+ "schema": {
2728
+ "type": "string",
2729
+ "format": "uuid"
2730
+ }
2731
+ },
2732
+ "SecretPath": {
2733
+ "name": "path",
2734
+ "in": "path",
2735
+ "required": true,
2736
+ "schema": {
2737
+ "type": "string"
2738
+ },
2739
+ "description": "Secret path (e.g. \"db/credentials\")"
2740
+ },
2741
+ "AgentId": {
2742
+ "name": "agent_id",
2743
+ "in": "path",
2744
+ "required": true,
2745
+ "schema": {
2746
+ "type": "string",
2747
+ "format": "uuid"
2748
+ }
2749
+ },
2750
+ "PolicyId": {
2751
+ "name": "policy_id",
2752
+ "in": "path",
2753
+ "required": true,
2754
+ "schema": {
2755
+ "type": "string",
2756
+ "format": "uuid"
2757
+ }
2758
+ }
2759
+ },
2760
+ "responses": {
2761
+ "BadRequest": {
2762
+ "description": "Invalid request",
2763
+ "content": {
2764
+ "application/json": {
2765
+ "schema": {
2766
+ "$ref": "#/components/schemas/ProblemDetails"
2767
+ }
2768
+ }
2769
+ }
2770
+ },
2771
+ "Unauthorized": {
2772
+ "description": "Authentication required or invalid",
2773
+ "content": {
2774
+ "application/json": {
2775
+ "schema": {
2776
+ "$ref": "#/components/schemas/ProblemDetails"
2777
+ }
2778
+ }
2779
+ }
2780
+ },
2781
+ "Forbidden": {
2782
+ "description": "Insufficient permissions",
2783
+ "content": {
2784
+ "application/json": {
2785
+ "schema": {
2786
+ "$ref": "#/components/schemas/ProblemDetails"
2787
+ }
2788
+ }
2789
+ }
2790
+ },
2791
+ "NotFound": {
2792
+ "description": "Resource not found",
2793
+ "content": {
2794
+ "application/json": {
2795
+ "schema": {
2796
+ "$ref": "#/components/schemas/ProblemDetails"
2797
+ }
2798
+ }
2799
+ }
2800
+ },
2801
+ "PaymentRequired": {
2802
+ "description": "x402 payment required",
2803
+ "content": {
2804
+ "application/json": {
2805
+ "schema": {
2806
+ "$ref": "#/components/schemas/PaymentRequirement"
2807
+ }
2808
+ }
2809
+ }
2810
+ }
2811
+ },
2812
+ "schemas": {
2813
+ "ProblemDetails": {
2814
+ "type": "object",
2815
+ "description": "RFC 7807 error envelope",
2816
+ "properties": {
2817
+ "type": {
2818
+ "type": "string"
2819
+ },
2820
+ "title": {
2821
+ "type": "string"
2822
+ },
2823
+ "status": {
2824
+ "type": "integer"
2825
+ },
2826
+ "detail": {
2827
+ "type": "string"
2828
+ }
2829
+ }
2830
+ },
2831
+ "LoginRequest": {
2832
+ "type": "object",
2833
+ "required": [
2834
+ "email",
2835
+ "password"
2836
+ ],
2837
+ "properties": {
2838
+ "email": {
2839
+ "type": "string",
2840
+ "format": "email"
2841
+ },
2842
+ "password": {
2843
+ "type": "string",
2844
+ "format": "password"
2845
+ }
2846
+ }
2847
+ },
2848
+ "LoginResponse": {
2849
+ "type": "object",
2850
+ "properties": {
2851
+ "access_token": {
2852
+ "type": "string"
2853
+ },
2854
+ "token_type": {
2855
+ "type": "string"
2856
+ },
2857
+ "expires_in": {
2858
+ "type": "integer"
2859
+ },
2860
+ "refresh_token": {
2861
+ "type": "string"
2862
+ },
2863
+ "mfa_required": {
2864
+ "type": "boolean"
2865
+ },
2866
+ "mfa_token": {
2867
+ "type": "string"
2868
+ }
2869
+ }
2870
+ },
2871
+ "TokenResponse": {
2872
+ "type": "object",
2873
+ "required": [
2874
+ "access_token",
2875
+ "token_type"
2876
+ ],
2877
+ "properties": {
2878
+ "access_token": {
2879
+ "type": "string"
2880
+ },
2881
+ "token_type": {
2882
+ "type": "string"
2883
+ },
2884
+ "expires_in": {
2885
+ "type": "integer"
2886
+ },
2887
+ "refresh_token": {
2888
+ "type": "string"
2889
+ }
2890
+ }
2891
+ },
2892
+ "AgentTokenRequest": {
2893
+ "type": "object",
2894
+ "required": [
2895
+ "agent_id",
2896
+ "api_key"
2897
+ ],
2898
+ "properties": {
2899
+ "agent_id": {
2900
+ "type": "string",
2901
+ "format": "uuid"
2902
+ },
2903
+ "api_key": {
2904
+ "type": "string"
2905
+ }
2906
+ }
2907
+ },
2908
+ "UserApiKeyTokenRequest": {
2909
+ "type": "object",
2910
+ "required": [
2911
+ "api_key"
2912
+ ],
2913
+ "properties": {
2914
+ "api_key": {
2915
+ "type": "string"
2916
+ }
2917
+ }
2918
+ },
2919
+ "SignupRequest": {
2920
+ "type": "object",
2921
+ "required": [
2922
+ "email",
2923
+ "password"
2924
+ ],
2925
+ "properties": {
2926
+ "email": {
2927
+ "type": "string",
2928
+ "format": "email"
2929
+ },
2930
+ "password": {
2931
+ "type": "string",
2932
+ "format": "password"
2933
+ },
2934
+ "display_name": {
2935
+ "type": "string"
2936
+ }
2937
+ }
2938
+ },
2939
+ "SignupResponse": {
2940
+ "type": "object",
2941
+ "properties": {
2942
+ "message": {
2943
+ "type": "string"
2944
+ },
2945
+ "email": {
2946
+ "type": "string"
2947
+ },
2948
+ "access_token": {
2949
+ "type": "string"
2950
+ },
2951
+ "token_type": {
2952
+ "type": "string"
2953
+ }
2954
+ }
2955
+ },
2956
+ "GoogleAuthRequest": {
2957
+ "type": "object",
2958
+ "required": [
2959
+ "id_token"
2960
+ ],
2961
+ "properties": {
2962
+ "id_token": {
2963
+ "type": "string"
2964
+ }
2965
+ }
2966
+ },
2967
+ "ChangePasswordRequest": {
2968
+ "type": "object",
2969
+ "required": [
2970
+ "current_password",
2971
+ "new_password"
2972
+ ],
2973
+ "properties": {
2974
+ "current_password": {
2975
+ "type": "string"
2976
+ },
2977
+ "new_password": {
2978
+ "type": "string"
2979
+ }
2980
+ }
2981
+ },
2982
+ "MfaStatusResponse": {
2983
+ "type": "object",
2984
+ "properties": {
2985
+ "enabled": {
2986
+ "type": "boolean"
2987
+ }
2988
+ }
2989
+ },
2990
+ "MfaSetupResponse": {
2991
+ "type": "object",
2992
+ "properties": {
2993
+ "otpauth_uri": {
2994
+ "type": "string"
2995
+ },
2996
+ "secret": {
2997
+ "type": "string"
2998
+ }
2999
+ }
3000
+ },
3001
+ "MfaVerifySetupRequest": {
3002
+ "type": "object",
3003
+ "required": [
3004
+ "code"
3005
+ ],
3006
+ "properties": {
3007
+ "code": {
3008
+ "type": "string"
3009
+ }
3010
+ }
3011
+ },
3012
+ "MfaVerifySetupResponse": {
3013
+ "type": "object",
3014
+ "properties": {
3015
+ "recovery_codes": {
3016
+ "type": "array",
3017
+ "items": {
3018
+ "type": "string"
3019
+ }
3020
+ }
3021
+ }
3022
+ },
3023
+ "MfaVerifyRequest": {
3024
+ "type": "object",
3025
+ "required": [
3026
+ "code",
3027
+ "mfa_token"
3028
+ ],
3029
+ "properties": {
3030
+ "code": {
3031
+ "type": "string"
3032
+ },
3033
+ "mfa_token": {
3034
+ "type": "string"
3035
+ }
3036
+ }
3037
+ },
3038
+ "MfaDisableRequest": {
3039
+ "type": "object",
3040
+ "properties": {
3041
+ "code": {
3042
+ "type": "string"
3043
+ },
3044
+ "password": {
3045
+ "type": "string"
3046
+ }
3047
+ }
3048
+ },
3049
+ "DeviceCodeRequest": {
3050
+ "type": "object",
3051
+ "required": [
3052
+ "client_id"
3053
+ ],
3054
+ "properties": {
3055
+ "client_id": {
3056
+ "type": "string"
3057
+ }
3058
+ }
3059
+ },
3060
+ "DeviceCodeResponse": {
3061
+ "type": "object",
3062
+ "properties": {
3063
+ "device_code": {
3064
+ "type": "string"
3065
+ },
3066
+ "user_code": {
3067
+ "type": "string"
3068
+ },
3069
+ "verification_uri": {
3070
+ "type": "string",
3071
+ "format": "uri"
3072
+ },
3073
+ "expires_in": {
3074
+ "type": "integer"
3075
+ },
3076
+ "interval": {
3077
+ "type": "integer"
3078
+ }
3079
+ }
3080
+ },
3081
+ "DeviceTokenRequest": {
3082
+ "type": "object",
3083
+ "required": [
3084
+ "device_code",
3085
+ "grant_type"
3086
+ ],
3087
+ "properties": {
3088
+ "device_code": {
3089
+ "type": "string"
3090
+ },
3091
+ "grant_type": {
3092
+ "type": "string"
3093
+ }
3094
+ }
3095
+ },
3096
+ "DeviceTokenResponse": {
3097
+ "type": "object",
3098
+ "properties": {
3099
+ "access_token": {
3100
+ "type": "string"
3101
+ },
3102
+ "token_type": {
3103
+ "type": "string"
3104
+ },
3105
+ "expires_in": {
3106
+ "type": "integer"
3107
+ },
3108
+ "error": {
3109
+ "type": "string"
3110
+ },
3111
+ "email": {
3112
+ "type": "string"
3113
+ },
3114
+ "user_id": {
3115
+ "type": "string"
3116
+ },
3117
+ "org_id": {
3118
+ "type": "string"
3119
+ }
3120
+ }
3121
+ },
3122
+ "DeviceApproveRequest": {
3123
+ "type": "object",
3124
+ "required": [
3125
+ "user_code"
3126
+ ],
3127
+ "properties": {
3128
+ "user_code": {
3129
+ "type": "string"
3130
+ }
3131
+ }
3132
+ },
3133
+ "CreateApiKeyRequest": {
3134
+ "type": "object",
3135
+ "required": [
3136
+ "name"
3137
+ ],
3138
+ "properties": {
3139
+ "name": {
3140
+ "type": "string"
3141
+ },
3142
+ "scopes": {
3143
+ "type": "array",
3144
+ "items": {
3145
+ "type": "string"
3146
+ }
3147
+ },
3148
+ "expires_at": {
3149
+ "type": "string",
3150
+ "format": "date-time"
3151
+ }
3152
+ }
3153
+ },
3154
+ "ApiKeyResponse": {
3155
+ "type": "object",
3156
+ "properties": {
3157
+ "id": {
3158
+ "type": "string",
3159
+ "format": "uuid"
3160
+ },
3161
+ "name": {
3162
+ "type": "string"
3163
+ },
3164
+ "key_prefix": {
3165
+ "type": "string"
3166
+ },
3167
+ "scopes": {
3168
+ "type": "array",
3169
+ "items": {
3170
+ "type": "string"
3171
+ }
3172
+ },
3173
+ "is_active": {
3174
+ "type": "boolean"
3175
+ },
3176
+ "created_at": {
3177
+ "type": "string",
3178
+ "format": "date-time"
3179
+ },
3180
+ "expires_at": {
3181
+ "type": "string",
3182
+ "format": "date-time"
3183
+ },
3184
+ "last_used_at": {
3185
+ "type": "string",
3186
+ "format": "date-time"
3187
+ }
3188
+ }
3189
+ },
3190
+ "ApiKeyCreatedResponse": {
3191
+ "type": "object",
3192
+ "properties": {
3193
+ "key": {
3194
+ "$ref": "#/components/schemas/ApiKeyResponse"
3195
+ },
3196
+ "api_key": {
3197
+ "type": "string",
3198
+ "description": "Full key (shown once)"
3199
+ }
3200
+ }
3201
+ },
3202
+ "ApiKeyListResponse": {
3203
+ "type": "object",
3204
+ "properties": {
3205
+ "keys": {
3206
+ "type": "array",
3207
+ "items": {
3208
+ "$ref": "#/components/schemas/ApiKeyResponse"
3209
+ }
3210
+ }
3211
+ }
3212
+ },
3213
+ "CreateVaultRequest": {
3214
+ "type": "object",
3215
+ "required": [
3216
+ "name"
3217
+ ],
3218
+ "properties": {
3219
+ "name": {
3220
+ "type": "string"
3221
+ },
3222
+ "description": {
3223
+ "type": "string"
3224
+ }
3225
+ }
3226
+ },
3227
+ "VaultResponse": {
3228
+ "type": "object",
3229
+ "required": [
3230
+ "id",
3231
+ "name",
3232
+ "created_at"
3233
+ ],
3234
+ "properties": {
3235
+ "id": {
3236
+ "type": "string",
3237
+ "format": "uuid"
3238
+ },
3239
+ "name": {
3240
+ "type": "string"
3241
+ },
3242
+ "description": {
3243
+ "type": "string"
3244
+ },
3245
+ "created_by": {
3246
+ "type": "string"
3247
+ },
3248
+ "created_by_type": {
3249
+ "type": "string"
3250
+ },
3251
+ "created_at": {
3252
+ "type": "string",
3253
+ "format": "date-time"
3254
+ }
3255
+ }
3256
+ },
3257
+ "VaultListResponse": {
3258
+ "type": "object",
3259
+ "properties": {
3260
+ "vaults": {
3261
+ "type": "array",
3262
+ "items": {
3263
+ "$ref": "#/components/schemas/VaultResponse"
3264
+ }
3265
+ }
3266
+ }
3267
+ },
3268
+ "PutSecretRequest": {
3269
+ "type": "object",
3270
+ "required": [
3271
+ "value"
3272
+ ],
3273
+ "properties": {
3274
+ "type": {
3275
+ "type": "string",
3276
+ "description": "Secret type (generic, password, api_key, certificate, private_key, ssh_key, env)",
3277
+ "default": "generic"
3278
+ },
3279
+ "value": {
3280
+ "type": "string"
3281
+ },
3282
+ "metadata": {
3283
+ "type": "object",
3284
+ "additionalProperties": true
3285
+ },
3286
+ "expires_at": {
3287
+ "type": "string",
3288
+ "format": "date-time"
3289
+ },
3290
+ "rotation_policy": {
3291
+ "type": "object",
3292
+ "additionalProperties": true
3293
+ },
3294
+ "max_access_count": {
3295
+ "type": "integer"
3296
+ }
3297
+ }
3298
+ },
3299
+ "SecretMetadataResponse": {
3300
+ "type": "object",
3301
+ "required": [
3302
+ "id",
3303
+ "path",
3304
+ "type",
3305
+ "version",
3306
+ "created_at"
3307
+ ],
3308
+ "properties": {
3309
+ "id": {
3310
+ "type": "string",
3311
+ "format": "uuid"
3312
+ },
3313
+ "path": {
3314
+ "type": "string"
3315
+ },
3316
+ "type": {
3317
+ "type": "string"
3318
+ },
3319
+ "version": {
3320
+ "type": "integer"
3321
+ },
3322
+ "metadata": {
3323
+ "type": "object",
3324
+ "additionalProperties": true
3325
+ },
3326
+ "created_at": {
3327
+ "type": "string",
3328
+ "format": "date-time"
3329
+ },
3330
+ "expires_at": {
3331
+ "type": "string",
3332
+ "format": "date-time"
3333
+ }
3334
+ }
3335
+ },
3336
+ "SecretResponse": {
3337
+ "type": "object",
3338
+ "required": [
3339
+ "id",
3340
+ "path",
3341
+ "type",
3342
+ "value",
3343
+ "version",
3344
+ "created_at"
3345
+ ],
3346
+ "properties": {
3347
+ "id": {
3348
+ "type": "string",
3349
+ "format": "uuid"
3350
+ },
3351
+ "path": {
3352
+ "type": "string"
3353
+ },
3354
+ "type": {
3355
+ "type": "string"
3356
+ },
3357
+ "value": {
3358
+ "type": "string"
3359
+ },
3360
+ "version": {
3361
+ "type": "integer"
3362
+ },
3363
+ "metadata": {
3364
+ "type": "object",
3365
+ "additionalProperties": true
3366
+ },
3367
+ "created_by": {
3368
+ "type": "string"
3369
+ },
3370
+ "created_at": {
3371
+ "type": "string",
3372
+ "format": "date-time"
3373
+ },
3374
+ "expires_at": {
3375
+ "type": "string",
3376
+ "format": "date-time"
3377
+ }
3378
+ }
3379
+ },
3380
+ "SecretListResponse": {
3381
+ "type": "object",
3382
+ "properties": {
3383
+ "secrets": {
3384
+ "type": "array",
3385
+ "items": {
3386
+ "$ref": "#/components/schemas/SecretMetadataResponse"
3387
+ }
3388
+ }
3389
+ }
3390
+ },
3391
+ "CreatePolicyRequest": {
3392
+ "type": "object",
3393
+ "required": [
3394
+ "secret_path_pattern",
3395
+ "principal_type",
3396
+ "principal_id",
3397
+ "permissions"
3398
+ ],
3399
+ "properties": {
3400
+ "secret_path_pattern": {
3401
+ "type": "string"
3402
+ },
3403
+ "principal_type": {
3404
+ "type": "string",
3405
+ "enum": [
3406
+ "user",
3407
+ "agent"
3408
+ ]
3409
+ },
3410
+ "principal_id": {
3411
+ "type": "string"
3412
+ },
3413
+ "permissions": {
3414
+ "type": "array",
3415
+ "items": {
3416
+ "type": "string"
3417
+ }
3418
+ },
3419
+ "conditions": {
3420
+ "type": "object",
3421
+ "additionalProperties": true
3422
+ },
3423
+ "expires_at": {
3424
+ "type": "string",
3425
+ "format": "date-time"
3426
+ }
3427
+ }
3428
+ },
3429
+ "UpdatePolicyRequest": {
3430
+ "type": "object",
3431
+ "properties": {
3432
+ "permissions": {
3433
+ "type": "array",
3434
+ "items": {
3435
+ "type": "string"
3436
+ }
3437
+ },
3438
+ "conditions": {
3439
+ "type": "object",
3440
+ "additionalProperties": true
3441
+ },
3442
+ "expires_at": {
3443
+ "type": "string",
3444
+ "format": "date-time"
3445
+ }
3446
+ }
3447
+ },
3448
+ "PolicyResponse": {
3449
+ "type": "object",
3450
+ "required": [
3451
+ "id",
3452
+ "vault_id",
3453
+ "secret_path_pattern",
3454
+ "principal_type",
3455
+ "principal_id",
3456
+ "permissions",
3457
+ "created_at"
3458
+ ],
3459
+ "properties": {
3460
+ "id": {
3461
+ "type": "string",
3462
+ "format": "uuid"
3463
+ },
3464
+ "vault_id": {
3465
+ "type": "string",
3466
+ "format": "uuid"
3467
+ },
3468
+ "secret_path_pattern": {
3469
+ "type": "string"
3470
+ },
3471
+ "principal_type": {
3472
+ "type": "string"
3473
+ },
3474
+ "principal_id": {
3475
+ "type": "string"
3476
+ },
3477
+ "permissions": {
3478
+ "type": "array",
3479
+ "items": {
3480
+ "type": "string"
3481
+ }
3482
+ },
3483
+ "conditions": {
3484
+ "type": "object",
3485
+ "additionalProperties": true
3486
+ },
3487
+ "expires_at": {
3488
+ "type": "string",
3489
+ "format": "date-time"
3490
+ },
3491
+ "created_by": {
3492
+ "type": "string"
3493
+ },
3494
+ "created_by_type": {
3495
+ "type": "string"
3496
+ },
3497
+ "created_at": {
3498
+ "type": "string",
3499
+ "format": "date-time"
3500
+ }
3501
+ }
3502
+ },
3503
+ "PolicyListResponse": {
3504
+ "type": "object",
3505
+ "properties": {
3506
+ "policies": {
3507
+ "type": "array",
3508
+ "items": {
3509
+ "$ref": "#/components/schemas/PolicyResponse"
3510
+ }
3511
+ }
3512
+ }
3513
+ },
3514
+ "CreateAgentRequest": {
3515
+ "type": "object",
3516
+ "required": [
3517
+ "name"
3518
+ ],
3519
+ "properties": {
3520
+ "name": {
3521
+ "type": "string"
3522
+ },
3523
+ "description": {
3524
+ "type": "string"
3525
+ },
3526
+ "auth_method": {
3527
+ "type": "string"
3528
+ },
3529
+ "scopes": {
3530
+ "type": "array",
3531
+ "items": {
3532
+ "type": "string"
3533
+ }
3534
+ },
3535
+ "expires_at": {
3536
+ "type": "string",
3537
+ "format": "date-time"
3538
+ },
3539
+ "crypto_proxy_enabled": {
3540
+ "type": "boolean",
3541
+ "default": false
3542
+ },
3543
+ "tx_to_allowlist": {
3544
+ "type": "array",
3545
+ "items": {
3546
+ "type": "string"
3547
+ }
3548
+ },
3549
+ "tx_max_value_eth": {
3550
+ "type": "string"
3551
+ },
3552
+ "tx_daily_limit_eth": {
3553
+ "type": "string"
3554
+ },
3555
+ "tx_allowed_chains": {
3556
+ "type": "array",
3557
+ "items": {
3558
+ "type": "string"
3559
+ }
3560
+ }
3561
+ }
3562
+ },
3563
+ "UpdateAgentRequest": {
3564
+ "type": "object",
3565
+ "properties": {
3566
+ "name": {
3567
+ "type": "string"
3568
+ },
3569
+ "scopes": {
3570
+ "type": "array",
3571
+ "items": {
3572
+ "type": "string"
3573
+ }
3574
+ },
3575
+ "is_active": {
3576
+ "type": "boolean"
3577
+ },
3578
+ "expires_at": {
3579
+ "type": "string",
3580
+ "format": "date-time"
3581
+ },
3582
+ "crypto_proxy_enabled": {
3583
+ "type": "boolean"
3584
+ },
3585
+ "tx_to_allowlist": {
3586
+ "type": "array",
3587
+ "items": {
3588
+ "type": "string"
3589
+ }
3590
+ },
3591
+ "tx_max_value_eth": {
3592
+ "type": "string"
3593
+ },
3594
+ "tx_daily_limit_eth": {
3595
+ "type": "string"
3596
+ },
3597
+ "tx_allowed_chains": {
3598
+ "type": "array",
3599
+ "items": {
3600
+ "type": "string"
3601
+ }
3602
+ }
3603
+ }
3604
+ },
3605
+ "AgentResponse": {
3606
+ "type": "object",
3607
+ "required": [
3608
+ "id",
3609
+ "name",
3610
+ "auth_method",
3611
+ "is_active",
3612
+ "crypto_proxy_enabled",
3613
+ "created_at"
3614
+ ],
3615
+ "properties": {
3616
+ "id": {
3617
+ "type": "string",
3618
+ "format": "uuid"
3619
+ },
3620
+ "name": {
3621
+ "type": "string"
3622
+ },
3623
+ "description": {
3624
+ "type": "string"
3625
+ },
3626
+ "auth_method": {
3627
+ "type": "string"
3628
+ },
3629
+ "scopes": {
3630
+ "type": "array",
3631
+ "items": {
3632
+ "type": "string"
3633
+ }
3634
+ },
3635
+ "is_active": {
3636
+ "type": "boolean"
3637
+ },
3638
+ "crypto_proxy_enabled": {
3639
+ "type": "boolean"
3640
+ },
3641
+ "tx_to_allowlist": {
3642
+ "type": "array",
3643
+ "items": {
3644
+ "type": "string"
3645
+ }
3646
+ },
3647
+ "tx_max_value_eth": {
3648
+ "type": "string"
3649
+ },
3650
+ "tx_daily_limit_eth": {
3651
+ "type": "string"
3652
+ },
3653
+ "tx_allowed_chains": {
3654
+ "type": "array",
3655
+ "items": {
3656
+ "type": "string"
3657
+ }
3658
+ },
3659
+ "created_at": {
3660
+ "type": "string",
3661
+ "format": "date-time"
3662
+ },
3663
+ "expires_at": {
3664
+ "type": "string",
3665
+ "format": "date-time"
3666
+ },
3667
+ "last_active_at": {
3668
+ "type": "string",
3669
+ "format": "date-time"
3670
+ }
3671
+ }
3672
+ },
3673
+ "AgentSelfResponse": {
3674
+ "type": "object",
3675
+ "properties": {
3676
+ "id": {
3677
+ "type": "string",
3678
+ "format": "uuid"
3679
+ },
3680
+ "name": {
3681
+ "type": "string"
3682
+ },
3683
+ "description": {
3684
+ "type": "string"
3685
+ },
3686
+ "org_id": {
3687
+ "type": "string",
3688
+ "format": "uuid"
3689
+ },
3690
+ "scopes": {
3691
+ "type": "array",
3692
+ "items": {
3693
+ "type": "string"
3694
+ }
3695
+ },
3696
+ "is_active": {
3697
+ "type": "boolean"
3698
+ },
3699
+ "crypto_proxy_enabled": {
3700
+ "type": "boolean"
3701
+ },
3702
+ "created_by": {
3703
+ "type": "string",
3704
+ "format": "uuid"
3705
+ },
3706
+ "created_at": {
3707
+ "type": "string",
3708
+ "format": "date-time"
3709
+ },
3710
+ "expires_at": {
3711
+ "type": "string",
3712
+ "format": "date-time"
3713
+ },
3714
+ "last_active_at": {
3715
+ "type": "string",
3716
+ "format": "date-time"
3717
+ }
3718
+ }
3719
+ },
3720
+ "AgentCreatedResponse": {
3721
+ "type": "object",
3722
+ "required": [
3723
+ "agent",
3724
+ "api_key"
3725
+ ],
3726
+ "properties": {
3727
+ "agent": {
3728
+ "$ref": "#/components/schemas/AgentResponse"
3729
+ },
3730
+ "api_key": {
3731
+ "type": "string",
3732
+ "description": "One-time API key (store securely)"
3733
+ }
3734
+ }
3735
+ },
3736
+ "AgentListResponse": {
3737
+ "type": "object",
3738
+ "properties": {
3739
+ "agents": {
3740
+ "type": "array",
3741
+ "items": {
3742
+ "$ref": "#/components/schemas/AgentResponse"
3743
+ }
3744
+ }
3745
+ }
3746
+ },
3747
+ "AgentKeyRotatedResponse": {
3748
+ "type": "object",
3749
+ "properties": {
3750
+ "api_key": {
3751
+ "type": "string"
3752
+ }
3753
+ }
3754
+ },
3755
+ "SubmitTransactionRequest": {
3756
+ "type": "object",
3757
+ "required": [
3758
+ "to",
3759
+ "value",
3760
+ "chain"
3761
+ ],
3762
+ "properties": {
3763
+ "to": {
3764
+ "type": "string",
3765
+ "description": "Destination address (0x-prefixed)"
3766
+ },
3767
+ "value": {
3768
+ "type": "string",
3769
+ "description": "Value in ETH"
3770
+ },
3771
+ "chain": {
3772
+ "type": "string",
3773
+ "description": "Chain name or numeric ID"
3774
+ },
3775
+ "data": {
3776
+ "type": "string",
3777
+ "description": "Hex-encoded calldata"
3778
+ },
3779
+ "signing_key_path": {
3780
+ "type": "string"
3781
+ },
3782
+ "nonce": {
3783
+ "type": "integer"
3784
+ },
3785
+ "gas_price": {
3786
+ "type": "string"
3787
+ },
3788
+ "gas_limit": {
3789
+ "type": "integer"
3790
+ },
3791
+ "max_fee_per_gas": {
3792
+ "type": "string"
3793
+ },
3794
+ "max_priority_fee_per_gas": {
3795
+ "type": "string"
3796
+ },
3797
+ "simulate_first": {
3798
+ "type": "boolean",
3799
+ "default": false
3800
+ }
3801
+ }
3802
+ },
3803
+ "SimulateTransactionRequest": {
3804
+ "type": "object",
3805
+ "required": [
3806
+ "to",
3807
+ "value",
3808
+ "chain"
3809
+ ],
3810
+ "properties": {
3811
+ "to": {
3812
+ "type": "string"
3813
+ },
3814
+ "value": {
3815
+ "type": "string"
3816
+ },
3817
+ "chain": {
3818
+ "type": "string"
3819
+ },
3820
+ "data": {
3821
+ "type": "string"
3822
+ },
3823
+ "signing_key_path": {
3824
+ "type": "string"
3825
+ },
3826
+ "gas_limit": {
3827
+ "type": "integer"
3828
+ }
3829
+ }
3830
+ },
3831
+ "SimulateBundleRequest": {
3832
+ "type": "object",
3833
+ "required": [
3834
+ "transactions"
3835
+ ],
3836
+ "properties": {
3837
+ "transactions": {
3838
+ "type": "array",
3839
+ "items": {
3840
+ "$ref": "#/components/schemas/SimulateTransactionRequest"
3841
+ }
3842
+ }
3843
+ }
3844
+ },
3845
+ "TransactionResponse": {
3846
+ "type": "object",
3847
+ "properties": {
3848
+ "id": {
3849
+ "type": "string",
3850
+ "format": "uuid"
3851
+ },
3852
+ "agent_id": {
3853
+ "type": "string",
3854
+ "format": "uuid"
3855
+ },
3856
+ "chain": {
3857
+ "type": "string"
3858
+ },
3859
+ "chain_id": {
3860
+ "type": "integer"
3861
+ },
3862
+ "to": {
3863
+ "type": "string"
3864
+ },
3865
+ "value_wei": {
3866
+ "type": "string"
3867
+ },
3868
+ "status": {
3869
+ "type": "string",
3870
+ "enum": [
3871
+ "pending",
3872
+ "signed",
3873
+ "broadcast",
3874
+ "failed",
3875
+ "simulation_failed"
3876
+ ]
3877
+ },
3878
+ "signed_tx": {
3879
+ "type": "string"
3880
+ },
3881
+ "tx_hash": {
3882
+ "type": "string"
3883
+ },
3884
+ "error_message": {
3885
+ "type": "string"
3886
+ },
3887
+ "created_at": {
3888
+ "type": "string",
3889
+ "format": "date-time"
3890
+ },
3891
+ "signed_at": {
3892
+ "type": "string",
3893
+ "format": "date-time"
3894
+ },
3895
+ "simulation_id": {
3896
+ "type": "string"
3897
+ },
3898
+ "simulation_status": {
3899
+ "type": "string"
3900
+ },
3901
+ "tenderly_dashboard_url": {
3902
+ "type": "string",
3903
+ "format": "uri"
3904
+ },
3905
+ "max_fee_per_gas": {
3906
+ "type": "string"
3907
+ },
3908
+ "max_priority_fee_per_gas": {
3909
+ "type": "string"
3910
+ }
3911
+ }
3912
+ },
3913
+ "TransactionListResponse": {
3914
+ "type": "object",
3915
+ "properties": {
3916
+ "transactions": {
3917
+ "type": "array",
3918
+ "items": {
3919
+ "$ref": "#/components/schemas/TransactionResponse"
3920
+ }
3921
+ }
3922
+ }
3923
+ },
3924
+ "BalanceChange": {
3925
+ "type": "object",
3926
+ "properties": {
3927
+ "address": {
3928
+ "type": "string"
3929
+ },
3930
+ "token": {
3931
+ "type": "string"
3932
+ },
3933
+ "token_symbol": {
3934
+ "type": "string"
3935
+ },
3936
+ "before": {
3937
+ "type": "string"
3938
+ },
3939
+ "after": {
3940
+ "type": "string"
3941
+ },
3942
+ "change": {
3943
+ "type": "string"
3944
+ }
3945
+ }
3946
+ },
3947
+ "SimulationResponse": {
3948
+ "type": "object",
3949
+ "properties": {
3950
+ "simulation_id": {
3951
+ "type": "string"
3952
+ },
3953
+ "status": {
3954
+ "type": "string",
3955
+ "enum": [
3956
+ "success",
3957
+ "reverted",
3958
+ "error"
3959
+ ]
3960
+ },
3961
+ "gas_used": {
3962
+ "type": "integer"
3963
+ },
3964
+ "gas_estimate_usd": {
3965
+ "type": "string"
3966
+ },
3967
+ "balance_changes": {
3968
+ "type": "array",
3969
+ "items": {
3970
+ "$ref": "#/components/schemas/BalanceChange"
3971
+ }
3972
+ },
3973
+ "error": {
3974
+ "type": "string"
3975
+ },
3976
+ "error_code": {
3977
+ "type": "string"
3978
+ },
3979
+ "error_human_readable": {
3980
+ "type": "string"
3981
+ },
3982
+ "revert_reason": {
3983
+ "type": "string"
3984
+ },
3985
+ "tenderly_dashboard_url": {
3986
+ "type": "string",
3987
+ "format": "uri"
3988
+ },
3989
+ "simulated_at": {
3990
+ "type": "string",
3991
+ "format": "date-time"
3992
+ }
3993
+ }
3994
+ },
3995
+ "BundleSimulationResponse": {
3996
+ "type": "object",
3997
+ "properties": {
3998
+ "simulations": {
3999
+ "type": "array",
4000
+ "items": {
4001
+ "$ref": "#/components/schemas/SimulationResponse"
4002
+ }
4003
+ }
4004
+ }
4005
+ },
4006
+ "ChainResponse": {
4007
+ "type": "object",
4008
+ "properties": {
4009
+ "id": {
4010
+ "type": "string",
4011
+ "format": "uuid"
4012
+ },
4013
+ "name": {
4014
+ "type": "string"
4015
+ },
4016
+ "display_name": {
4017
+ "type": "string"
4018
+ },
4019
+ "chain_id": {
4020
+ "type": "integer"
4021
+ },
4022
+ "rpc_url": {
4023
+ "type": "string"
4024
+ },
4025
+ "ws_url": {
4026
+ "type": "string"
4027
+ },
4028
+ "explorer_url": {
4029
+ "type": "string"
4030
+ },
4031
+ "native_currency": {
4032
+ "type": "string"
4033
+ },
4034
+ "is_testnet": {
4035
+ "type": "boolean"
4036
+ },
4037
+ "is_enabled": {
4038
+ "type": "boolean"
4039
+ },
4040
+ "created_at": {
4041
+ "type": "string",
4042
+ "format": "date-time"
4043
+ },
4044
+ "updated_at": {
4045
+ "type": "string",
4046
+ "format": "date-time"
4047
+ }
4048
+ }
4049
+ },
4050
+ "ChainListResponse": {
4051
+ "type": "object",
4052
+ "properties": {
4053
+ "chains": {
4054
+ "type": "array",
4055
+ "items": {
4056
+ "$ref": "#/components/schemas/ChainResponse"
4057
+ }
4058
+ }
4059
+ }
4060
+ },
4061
+ "CreateChainRequest": {
4062
+ "type": "object",
4063
+ "required": [
4064
+ "name",
4065
+ "display_name",
4066
+ "chain_id"
4067
+ ],
4068
+ "properties": {
4069
+ "name": {
4070
+ "type": "string"
4071
+ },
4072
+ "display_name": {
4073
+ "type": "string"
4074
+ },
4075
+ "chain_id": {
4076
+ "type": "integer"
4077
+ },
4078
+ "rpc_url": {
4079
+ "type": "string"
4080
+ },
4081
+ "ws_url": {
4082
+ "type": "string"
4083
+ },
4084
+ "explorer_url": {
4085
+ "type": "string"
4086
+ },
4087
+ "native_currency": {
4088
+ "type": "string",
4089
+ "default": "ETH"
4090
+ },
4091
+ "is_testnet": {
4092
+ "type": "boolean",
4093
+ "default": false
4094
+ },
4095
+ "is_enabled": {
4096
+ "type": "boolean",
4097
+ "default": true
4098
+ }
4099
+ }
4100
+ },
4101
+ "UpdateChainRequest": {
4102
+ "type": "object",
4103
+ "properties": {
4104
+ "display_name": {
4105
+ "type": "string"
4106
+ },
4107
+ "rpc_url": {
4108
+ "type": "string"
4109
+ },
4110
+ "ws_url": {
4111
+ "type": "string"
4112
+ },
4113
+ "explorer_url": {
4114
+ "type": "string"
4115
+ },
4116
+ "native_currency": {
4117
+ "type": "string"
4118
+ },
4119
+ "is_testnet": {
4120
+ "type": "boolean"
4121
+ },
4122
+ "is_enabled": {
4123
+ "type": "boolean"
4124
+ }
4125
+ }
4126
+ },
4127
+ "CreateShareRequest": {
4128
+ "type": "object",
4129
+ "required": [
4130
+ "recipient_type",
4131
+ "expires_at"
4132
+ ],
4133
+ "properties": {
4134
+ "recipient_type": {
4135
+ "type": "string",
4136
+ "enum": [
4137
+ "user",
4138
+ "agent",
4139
+ "external_email",
4140
+ "anyone_with_link",
4141
+ "creator"
4142
+ ]
4143
+ },
4144
+ "recipient_id": {
4145
+ "type": "string",
4146
+ "format": "uuid"
4147
+ },
4148
+ "email": {
4149
+ "type": "string",
4150
+ "format": "email"
4151
+ },
4152
+ "permissions": {
4153
+ "type": "array",
4154
+ "items": {
4155
+ "type": "string"
4156
+ }
4157
+ },
4158
+ "max_access_count": {
4159
+ "type": "integer"
4160
+ },
4161
+ "expires_at": {
4162
+ "type": "string",
4163
+ "format": "date-time"
4164
+ },
4165
+ "passphrase": {
4166
+ "type": "string"
4167
+ },
4168
+ "ip_allowlist": {
4169
+ "type": "array",
4170
+ "items": {
4171
+ "type": "string"
4172
+ }
4173
+ }
4174
+ }
4175
+ },
4176
+ "ShareResponse": {
4177
+ "type": "object",
4178
+ "properties": {
4179
+ "id": {
4180
+ "type": "string",
4181
+ "format": "uuid"
4182
+ },
4183
+ "share_url": {
4184
+ "type": "string",
4185
+ "format": "uri"
4186
+ },
4187
+ "recipient_type": {
4188
+ "type": "string"
4189
+ },
4190
+ "recipient_email": {
4191
+ "type": "string"
4192
+ },
4193
+ "expires_at": {
4194
+ "type": "string",
4195
+ "format": "date-time"
4196
+ },
4197
+ "max_access_count": {
4198
+ "type": "integer"
4199
+ }
4200
+ }
4201
+ },
4202
+ "SharedSecretResponse": {
4203
+ "type": "object",
4204
+ "properties": {
4205
+ "id": {
4206
+ "type": "string",
4207
+ "format": "uuid"
4208
+ },
4209
+ "path": {
4210
+ "type": "string"
4211
+ },
4212
+ "type": {
4213
+ "type": "string"
4214
+ },
4215
+ "value": {
4216
+ "type": "string"
4217
+ },
4218
+ "access_count": {
4219
+ "type": "integer"
4220
+ },
4221
+ "max_access_count": {
4222
+ "type": "integer"
4223
+ }
4224
+ }
4225
+ },
4226
+ "ShareListItem": {
4227
+ "type": "object",
4228
+ "properties": {
4229
+ "id": {
4230
+ "type": "string",
4231
+ "format": "uuid"
4232
+ },
4233
+ "secret_path": {
4234
+ "type": "string"
4235
+ },
4236
+ "recipient_type": {
4237
+ "type": "string"
4238
+ },
4239
+ "recipient_email": {
4240
+ "type": "string"
4241
+ },
4242
+ "access_count": {
4243
+ "type": "integer"
4244
+ },
4245
+ "max_access_count": {
4246
+ "type": "integer"
4247
+ },
4248
+ "expires_at": {
4249
+ "type": "string",
4250
+ "format": "date-time"
4251
+ },
4252
+ "created_at": {
4253
+ "type": "string",
4254
+ "format": "date-time"
4255
+ },
4256
+ "is_expired": {
4257
+ "type": "boolean"
4258
+ },
4259
+ "is_accepted": {
4260
+ "type": "boolean"
4261
+ }
4262
+ }
4263
+ },
4264
+ "ShareListResponse": {
4265
+ "type": "object",
4266
+ "properties": {
4267
+ "shares": {
4268
+ "type": "array",
4269
+ "items": {
4270
+ "$ref": "#/components/schemas/ShareListItem"
4271
+ }
4272
+ }
4273
+ }
4274
+ },
4275
+ "OrgMemberResponse": {
4276
+ "type": "object",
4277
+ "properties": {
4278
+ "id": {
4279
+ "type": "string",
4280
+ "format": "uuid"
4281
+ },
4282
+ "email": {
4283
+ "type": "string"
4284
+ },
4285
+ "display_name": {
4286
+ "type": "string"
4287
+ },
4288
+ "role": {
4289
+ "type": "string"
4290
+ },
4291
+ "auth_method": {
4292
+ "type": "string"
4293
+ },
4294
+ "created_at": {
4295
+ "type": "string",
4296
+ "format": "date-time"
4297
+ }
4298
+ }
4299
+ },
4300
+ "OrgMemberListResponse": {
4301
+ "type": "object",
4302
+ "properties": {
4303
+ "members": {
4304
+ "type": "array",
4305
+ "items": {
4306
+ "$ref": "#/components/schemas/OrgMemberResponse"
4307
+ }
4308
+ }
4309
+ }
4310
+ },
4311
+ "UpdateMemberRoleRequest": {
4312
+ "type": "object",
4313
+ "required": [
4314
+ "role"
4315
+ ],
4316
+ "properties": {
4317
+ "role": {
4318
+ "type": "string",
4319
+ "enum": [
4320
+ "owner",
4321
+ "admin",
4322
+ "member"
4323
+ ]
4324
+ }
4325
+ }
4326
+ },
4327
+ "InviteMemberRequest": {
4328
+ "type": "object",
4329
+ "required": [
4330
+ "email"
4331
+ ],
4332
+ "properties": {
4333
+ "email": {
4334
+ "type": "string",
4335
+ "format": "email"
4336
+ },
4337
+ "role": {
4338
+ "type": "string"
4339
+ }
4340
+ }
4341
+ },
4342
+ "InviteMemberResponse": {
4343
+ "type": "object",
4344
+ "properties": {
4345
+ "message": {
4346
+ "type": "string"
4347
+ },
4348
+ "email": {
4349
+ "type": "string"
4350
+ }
4351
+ }
4352
+ },
4353
+ "UsageSummaryResponse": {
4354
+ "type": "object",
4355
+ "properties": {
4356
+ "billing_tier": {
4357
+ "type": "string"
4358
+ },
4359
+ "free_tier_limit": {
4360
+ "type": "integer"
4361
+ },
4362
+ "current_month": {
4363
+ "type": "object",
4364
+ "properties": {
4365
+ "total_requests": {
4366
+ "type": "integer"
4367
+ },
4368
+ "paid_requests": {
4369
+ "type": "integer"
4370
+ },
4371
+ "free_requests": {
4372
+ "type": "integer"
4373
+ },
4374
+ "total_cost_usd": {
4375
+ "type": "string"
4376
+ }
4377
+ }
4378
+ }
4379
+ }
4380
+ },
4381
+ "UsageHistoryResponse": {
4382
+ "type": "object",
4383
+ "properties": {
4384
+ "events": {
4385
+ "type": "array",
4386
+ "items": {
4387
+ "type": "object",
4388
+ "properties": {
4389
+ "id": {
4390
+ "type": "string",
4391
+ "format": "uuid"
4392
+ },
4393
+ "principal_type": {
4394
+ "type": "string"
4395
+ },
4396
+ "principal_id": {
4397
+ "type": "string"
4398
+ },
4399
+ "method": {
4400
+ "type": "string"
4401
+ },
4402
+ "endpoint": {
4403
+ "type": "string"
4404
+ },
4405
+ "status_code": {
4406
+ "type": "integer"
4407
+ },
4408
+ "price_usd": {
4409
+ "type": "string"
4410
+ },
4411
+ "is_paid": {
4412
+ "type": "boolean"
4413
+ },
4414
+ "created_at": {
4415
+ "type": "string",
4416
+ "format": "date-time"
4417
+ }
4418
+ }
4419
+ }
4420
+ }
4421
+ }
4422
+ },
4423
+ "SubscribeRequest": {
4424
+ "type": "object",
4425
+ "required": [
4426
+ "tier",
4427
+ "interval"
4428
+ ],
4429
+ "properties": {
4430
+ "tier": {
4431
+ "type": "string",
4432
+ "enum": [
4433
+ "pro",
4434
+ "business"
4435
+ ]
4436
+ },
4437
+ "interval": {
4438
+ "type": "string",
4439
+ "enum": [
4440
+ "monthly",
4441
+ "yearly"
4442
+ ]
4443
+ },
4444
+ "trial": {
4445
+ "type": "boolean",
4446
+ "default": true
4447
+ }
4448
+ }
4449
+ },
4450
+ "TopupRequest": {
4451
+ "type": "object",
4452
+ "required": [
4453
+ "amount_usd"
4454
+ ],
4455
+ "properties": {
4456
+ "amount_usd": {
4457
+ "type": "integer",
4458
+ "minimum": 5,
4459
+ "maximum": 1000
4460
+ }
4461
+ }
4462
+ },
4463
+ "OverageMethodRequest": {
4464
+ "type": "object",
4465
+ "required": [
4466
+ "method"
4467
+ ],
4468
+ "properties": {
4469
+ "method": {
4470
+ "type": "string",
4471
+ "enum": [
4472
+ "credits",
4473
+ "x402"
4474
+ ]
4475
+ }
4476
+ }
4477
+ },
4478
+ "CheckoutUrlResponse": {
4479
+ "type": "object",
4480
+ "properties": {
4481
+ "checkout_url": {
4482
+ "type": "string",
4483
+ "format": "uri"
4484
+ }
4485
+ }
4486
+ },
4487
+ "PortalUrlResponse": {
4488
+ "type": "object",
4489
+ "properties": {
4490
+ "portal_url": {
4491
+ "type": "string",
4492
+ "format": "uri"
4493
+ }
4494
+ }
4495
+ },
4496
+ "SubscriptionResponse": {
4497
+ "type": "object",
4498
+ "properties": {
4499
+ "tier": {
4500
+ "type": "string"
4501
+ },
4502
+ "interval": {
4503
+ "type": "string"
4504
+ },
4505
+ "period_end": {
4506
+ "type": "string",
4507
+ "format": "date-time"
4508
+ },
4509
+ "status": {
4510
+ "type": "string"
4511
+ },
4512
+ "credit_balance_cents": {
4513
+ "type": "integer"
4514
+ },
4515
+ "credit_balance_usd": {
4516
+ "type": "string"
4517
+ },
4518
+ "overage_method": {
4519
+ "type": "string"
4520
+ },
4521
+ "usage": {
4522
+ "type": "object",
4523
+ "properties": {
4524
+ "requests": {
4525
+ "$ref": "#/components/schemas/UsageMeter"
4526
+ },
4527
+ "secrets": {
4528
+ "$ref": "#/components/schemas/UsageMeter"
4529
+ },
4530
+ "agents": {
4531
+ "$ref": "#/components/schemas/UsageMeter"
4532
+ },
4533
+ "vaults": {
4534
+ "$ref": "#/components/schemas/UsageMeter"
4535
+ },
4536
+ "team_members": {
4537
+ "$ref": "#/components/schemas/UsageMeter"
4538
+ },
4539
+ "proxy_transactions": {
4540
+ "$ref": "#/components/schemas/UsageMeter"
4541
+ },
4542
+ "shares": {
4543
+ "$ref": "#/components/schemas/UsageMeter"
4544
+ }
4545
+ }
4546
+ }
4547
+ }
4548
+ },
4549
+ "UsageMeter": {
4550
+ "type": "object",
4551
+ "properties": {
4552
+ "used": {
4553
+ "type": "integer"
4554
+ },
4555
+ "limit": {
4556
+ "type": "integer"
4557
+ }
4558
+ }
4559
+ },
4560
+ "CreditBalanceResponse": {
4561
+ "type": "object",
4562
+ "properties": {
4563
+ "balance_cents": {
4564
+ "type": "integer"
4565
+ },
4566
+ "balance_usd": {
4567
+ "type": "string"
4568
+ },
4569
+ "expiring_within_90_days": {
4570
+ "type": "object",
4571
+ "properties": {
4572
+ "amount_cents": {
4573
+ "type": "integer"
4574
+ },
4575
+ "earliest_expiry": {
4576
+ "type": "string",
4577
+ "format": "date-time"
4578
+ }
4579
+ }
4580
+ }
4581
+ }
4582
+ },
4583
+ "CreditTransactionsListResponse": {
4584
+ "type": "object",
4585
+ "properties": {
4586
+ "transactions": {
4587
+ "type": "array",
4588
+ "items": {
4589
+ "type": "object",
4590
+ "properties": {
4591
+ "id": {
4592
+ "type": "string",
4593
+ "format": "uuid"
4594
+ },
4595
+ "type": {
4596
+ "type": "string"
4597
+ },
4598
+ "amount_cents": {
4599
+ "type": "integer"
4600
+ },
4601
+ "balance_after_cents": {
4602
+ "type": "integer"
4603
+ },
4604
+ "description": {
4605
+ "type": "string"
4606
+ },
4607
+ "created_at": {
4608
+ "type": "string",
4609
+ "format": "date-time"
4610
+ }
4611
+ }
4612
+ }
4613
+ },
4614
+ "page": {
4615
+ "type": "integer"
4616
+ },
4617
+ "limit": {
4618
+ "type": "integer"
4619
+ }
4620
+ }
4621
+ },
4622
+ "OverageMethodResponse": {
4623
+ "type": "object",
4624
+ "properties": {
4625
+ "overage_method": {
4626
+ "type": "string"
4627
+ }
4628
+ }
4629
+ },
4630
+ "AuditEventsResponse": {
4631
+ "type": "object",
4632
+ "properties": {
4633
+ "events": {
4634
+ "type": "array",
4635
+ "items": {
4636
+ "$ref": "#/components/schemas/AuditEvent"
4637
+ }
4638
+ },
4639
+ "count": {
4640
+ "type": "integer"
4641
+ }
4642
+ }
4643
+ },
4644
+ "AuditEvent": {
4645
+ "type": "object",
4646
+ "properties": {
4647
+ "id": {
4648
+ "type": "string",
4649
+ "format": "uuid"
4650
+ },
4651
+ "action": {
4652
+ "type": "string"
4653
+ },
4654
+ "actor_id": {
4655
+ "type": "string"
4656
+ },
4657
+ "actor_type": {
4658
+ "type": "string"
4659
+ },
4660
+ "resource_type": {
4661
+ "type": "string"
4662
+ },
4663
+ "resource_id": {
4664
+ "type": "string"
4665
+ },
4666
+ "org_id": {
4667
+ "type": "string",
4668
+ "format": "uuid"
4669
+ },
4670
+ "details": {
4671
+ "type": "object",
4672
+ "additionalProperties": true
4673
+ },
4674
+ "ip_address": {
4675
+ "type": "string"
4676
+ },
4677
+ "created_at": {
4678
+ "type": "string",
4679
+ "format": "date-time"
4680
+ }
4681
+ }
4682
+ },
4683
+ "CreateIpRuleRequest": {
4684
+ "type": "object",
4685
+ "required": [
4686
+ "rule_type",
4687
+ "cidr"
4688
+ ],
4689
+ "properties": {
4690
+ "rule_type": {
4691
+ "type": "string",
4692
+ "enum": [
4693
+ "allow",
4694
+ "deny"
4695
+ ]
4696
+ },
4697
+ "cidr": {
4698
+ "type": "string"
4699
+ },
4700
+ "label": {
4701
+ "type": "string"
4702
+ },
4703
+ "applies_to": {
4704
+ "type": "string"
4705
+ }
4706
+ }
4707
+ },
4708
+ "IpRuleResponse": {
4709
+ "type": "object",
4710
+ "properties": {
4711
+ "id": {
4712
+ "type": "string",
4713
+ "format": "uuid"
4714
+ },
4715
+ "org_id": {
4716
+ "type": "string",
4717
+ "format": "uuid"
4718
+ },
4719
+ "rule_type": {
4720
+ "type": "string"
4721
+ },
4722
+ "cidr": {
4723
+ "type": "string"
4724
+ },
4725
+ "label": {
4726
+ "type": "string"
4727
+ },
4728
+ "applies_to": {
4729
+ "type": "string"
4730
+ },
4731
+ "created_by": {
4732
+ "type": "string"
4733
+ },
4734
+ "created_at": {
4735
+ "type": "string",
4736
+ "format": "date-time"
4737
+ }
4738
+ }
4739
+ },
4740
+ "IpRulesListResponse": {
4741
+ "type": "object",
4742
+ "properties": {
4743
+ "rules": {
4744
+ "type": "array",
4745
+ "items": {
4746
+ "$ref": "#/components/schemas/IpRuleResponse"
4747
+ }
4748
+ }
4749
+ }
4750
+ },
4751
+ "SettingResponse": {
4752
+ "type": "object",
4753
+ "properties": {
4754
+ "key": {
4755
+ "type": "string"
4756
+ },
4757
+ "value": {
4758
+ "type": "string"
4759
+ },
4760
+ "updated_by": {
4761
+ "type": "string"
4762
+ },
4763
+ "updated_at": {
4764
+ "type": "string",
4765
+ "format": "date-time"
4766
+ }
4767
+ }
4768
+ },
4769
+ "SettingsListResponse": {
4770
+ "type": "object",
4771
+ "properties": {
4772
+ "settings": {
4773
+ "type": "array",
4774
+ "items": {
4775
+ "$ref": "#/components/schemas/SettingResponse"
4776
+ }
4777
+ }
4778
+ }
4779
+ },
4780
+ "UpdateSettingRequest": {
4781
+ "type": "object",
4782
+ "required": [
4783
+ "value"
4784
+ ],
4785
+ "properties": {
4786
+ "value": {
4787
+ "type": "string"
4788
+ }
4789
+ }
4790
+ },
4791
+ "X402ConfigResponse": {
4792
+ "type": "object",
4793
+ "properties": {
4794
+ "pay_to": {
4795
+ "type": "string"
4796
+ },
4797
+ "network": {
4798
+ "type": "string"
4799
+ },
4800
+ "scheme": {
4801
+ "type": "string"
4802
+ },
4803
+ "free_tier_limit": {
4804
+ "type": "integer"
4805
+ },
4806
+ "facilitator_url": {
4807
+ "type": "string"
4808
+ }
4809
+ }
4810
+ },
4811
+ "AdminUsersListResponse": {
4812
+ "type": "object",
4813
+ "properties": {
4814
+ "users": {
4815
+ "type": "array",
4816
+ "items": {
4817
+ "type": "object",
4818
+ "properties": {
4819
+ "id": {
4820
+ "type": "string",
4821
+ "format": "uuid"
4822
+ },
4823
+ "email": {
4824
+ "type": "string"
4825
+ },
4826
+ "display_name": {
4827
+ "type": "string"
4828
+ },
4829
+ "role": {
4830
+ "type": "string"
4831
+ },
4832
+ "auth_method": {
4833
+ "type": "string"
4834
+ },
4835
+ "org_id": {
4836
+ "type": "string",
4837
+ "format": "uuid"
4838
+ },
4839
+ "org_name": {
4840
+ "type": "string"
4841
+ },
4842
+ "created_at": {
4843
+ "type": "string",
4844
+ "format": "date-time"
4845
+ },
4846
+ "free_tier_override": {
4847
+ "type": "integer"
4848
+ },
4849
+ "is_sponsored": {
4850
+ "type": "boolean"
4851
+ },
4852
+ "current_month_requests": {
4853
+ "type": "integer"
4854
+ }
4855
+ }
4856
+ }
4857
+ },
4858
+ "total": {
4859
+ "type": "integer"
4860
+ }
4861
+ }
4862
+ },
4863
+ "UpdateOrgLimitsRequest": {
4864
+ "type": "object",
4865
+ "properties": {
4866
+ "free_tier_override": {
4867
+ "type": "integer"
4868
+ },
4869
+ "is_sponsored": {
4870
+ "type": "boolean"
4871
+ }
4872
+ }
4873
+ },
4874
+ "OrgLimitsResponse": {
4875
+ "type": "object",
4876
+ "properties": {
4877
+ "org_id": {
4878
+ "type": "string",
4879
+ "format": "uuid"
4880
+ },
4881
+ "free_tier_override": {
4882
+ "type": "integer"
4883
+ },
4884
+ "is_sponsored": {
4885
+ "type": "boolean"
4886
+ }
4887
+ }
4888
+ },
4889
+ "PaymentRequirement": {
4890
+ "type": "object",
4891
+ "properties": {
4892
+ "x402Version": {
4893
+ "type": "integer"
4894
+ },
4895
+ "accepts": {
4896
+ "type": "array",
4897
+ "items": {
4898
+ "type": "object",
4899
+ "properties": {
4900
+ "scheme": {
4901
+ "type": "string"
4902
+ },
4903
+ "network": {
4904
+ "type": "string"
4905
+ },
4906
+ "payTo": {
4907
+ "type": "string"
4908
+ },
4909
+ "price": {
4910
+ "type": "string"
4911
+ },
4912
+ "requiredDeadlineSeconds": {
4913
+ "type": "integer"
4914
+ }
4915
+ }
4916
+ }
4917
+ },
4918
+ "description": {
4919
+ "type": "string"
4920
+ }
4921
+ }
4922
+ },
4923
+ "HealthResponse": {
4924
+ "type": "object",
4925
+ "properties": {
4926
+ "status": {
4927
+ "type": "string",
4928
+ "enum": [
4929
+ "healthy",
4930
+ "degraded"
4931
+ ]
4932
+ },
4933
+ "version": {
4934
+ "type": "string"
4935
+ }
4936
+ }
4937
+ }
4938
+ }
4939
+ }
4940
+ }