Repository navigation
Expand file tree
/
Copy pathopenapi.json
More file actions
10301 lines (10301 loc) · 325 KB
/
Copy pathopenapi.json
File metadata and controls
10301 lines (10301 loc) · 325 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Revdoku API",
"version": "2.0.0",
"description": "A bucket is the project of one docs site: its files, the published site, the site analytics, and the support email address with its tickets. Create buckets, publish sites, read and reply to support requests and store files. The dashboard calls a bucket a site. Guide: https://docs.revdoku.com/api/. Create an account at https://app.revdoku.com/users/sign_up."
},
"servers": [
{
"url": "https://api.revdoku.com",
"description": "Revdoku application API"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "Authentication",
"description": "Sign-in helpers for the CLI and AI agents. Backend applications use an API key from the dashboard."
},
{
"name": "Accounts",
"description": "Connection status, granted accounts and limits."
},
{
"name": "Buckets",
"description": "Create, read, archive and delete buckets. A bucket is the project of one docs site (the dashboard calls it a site)."
},
{
"name": "Files",
"description": "Upload, read, organize and restore files."
},
{
"name": "GitHub",
"description": "Connect a GitHub repository to a bucket: its files become a copy of one branch, and each push updates them."
},
{
"name": "Publications",
"description": "A bucket's site: publish its files, preview them for 24 hours, or take the site down."
},
{
"name": "Tickets",
"description": "Support tickets: each conversation that someone started with the bucket, by email or a message left on the docs site. Read them, reply to the requester, solve and label them. Page feedback comments show in the dashboard and are not tickets of this API; the channel feedback is for tickets from earlier page feedback emails."
},
{
"name": "Events",
"description": "Ticket events of every channel: one signed webhook per bucket and live WebSocket subscriptions."
}
],
"paths": {
"/v1/auth/sign_in_code": {
"post": {
"operationId": "requestSignInCode",
"tags": [
"Authentication"
],
"summary": "Email a sign-in code",
"description": "Sends a six-digit code to an existing account email. The response is the same for every address, so it never reveals whether an account exists. Create new accounts in the browser at https://app.revdoku.com/users/sign_up.",
"security": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
},
"account_id": {
"type": "string",
"description": "Select another granted account for this request."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
},
"required": [
"email"
]
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/CodeRequested"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/auth/sign_in_code/verify": {
"post": {
"operationId": "verifySignInCode",
"tags": [
"Authentication"
],
"summary": "Exchange a sign-in code for an API key",
"description": "Creates an AI agent connection for an account owner or administrator. Accounts with two-factor authentication must use browser sign-in.",
"security": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
},
"code": {
"type": "string",
"description": "Six digits; spaces are ignored."
},
"label": {
"type": "string",
"description": "Connection name shown in Account access."
},
"permission_scope": {
"type": "string",
"enum": [
"bucket_read",
"bucket_write",
"bucket_admin"
],
"default": "bucket_admin"
},
"bucket_access": {
"type": "string",
"enum": [
"all",
"selected"
],
"default": "all"
},
"bucket_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required when bucket_access is selected."
},
"bucket_permissions": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"read",
"write"
]
},
"description": "Optional access per selected bucket ID: read or write. Without an entry, a bucket gets write, or read when permission_scope is bucket_read."
},
"account_id": {
"type": "string",
"description": "Select another granted account for this request."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
},
"required": [
"email",
"code"
]
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/AgentConnection"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/auth/grant/exchange": {
"post": {
"operationId": "exchangeConnectionGrant",
"tags": [
"Authentication"
],
"summary": "Exchange a one-time dashboard connection code for an API key",
"description": "The dashboard creates the one-time code when a signed-in administrator copies a connection prompt.",
"security": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"grant_token": {
"type": "string"
},
"label": {
"type": "string"
},
"account_id": {
"type": "string",
"description": "Select another granted account for this request."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
},
"required": [
"grant_token"
]
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/AgentConnection"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/auth/dashboard_link": {
"post": {
"operationId": "createDashboardLink",
"tags": [
"Authentication"
],
"summary": "Create a dashboard link",
"description": "Returns a dashboard URL for a path such as /buckets. The user signs in normally; the link grants no access.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"redirect_path": {
"type": "string",
"default": "/buckets"
},
"account_id": {
"type": "string",
"description": "Select another granted account for this request."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/BrowserLink"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/status": {
"get": {
"operationId": "getStatus",
"tags": [
"Accounts"
],
"summary": "Read the connection and selected account",
"description": "Works with every API key, including bucket-scoped keys. Read quotas with GET /v1/account/limits.",
"parameters": [
{
"$ref": "#/components/parameters/AccountId"
},
{
"$ref": "#/components/parameters/Reason"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/Status"
}
}
},
"example": {
"success": true,
"data": {
"connected": true,
"default_account_id": "acct_example",
"accounts": [
{
"id": "acct_example",
"name": "Acme",
"account_kind": "standard",
"client_name": null,
"agency_account": null
}
],
"server_version": "1.0.575",
"client_version": "1.0.575",
"features": {
"email_domains": true
},
"account": {
"id": "acct_example",
"name": "Acme",
"status": "active",
"account_kind": "standard",
"client_name": null,
"agency_account": null,
"can_create_client_account": false,
"can_manage_billing": true,
"billing_message": null,
"previous_status": null,
"status_reason": null,
"status_updated_at": null
},
"user": {
"id": "user_example",
"email": "ada@example.com",
"name": "Ada Lovelace"
},
"dashboard_url": "https://app.revdoku.com/buckets?account_id=acct_example",
"connection": {
"api_key_id": "atok_example",
"label": "Orders backend",
"token_type": "api",
"scope": "bucket_admin",
"expires_at": "2027-10-11T12:00:00Z",
"last_used_at": "2026-10-11T12:20:00Z",
"bucket_access": "all",
"bucket_ids": [],
"denied_bucket_ids": [],
"bucket_permissions": {},
"permissions": {
"read": true,
"write": true,
"admin": true
},
"agent": null,
"transport": "api_key",
"renewal": {
"recommended": false
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/accounts": {
"get": {
"operationId": "listAccounts",
"tags": [
"Accounts"
],
"summary": "List accounts granted to this credential",
"description": "Works with every API key. Lists the account of this credential and the client accounts that an agency owner granted to it. Send an id from this list as account_id to act in that account.",
"parameters": [
{
"$ref": "#/components/parameters/Limit"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/AccountList"
}
}
},
"example": {
"success": true,
"data": {
"default_account_id": "acct_example",
"accounts": [
{
"id": "acct_example",
"name": "Acme",
"account_kind": "standard",
"client_name": null,
"agency_account": null,
"region": "eu",
"status": "active",
"permissions": {
"scope": "bucket_admin",
"bucket_access": "all",
"can_create_buckets": true
}
}
],
"pagination": {
"limit": 50,
"has_more": false,
"next_cursor": null
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
},
"post": {
"operationId": "createClientAccount",
"tags": [
"Accounts"
],
"summary": "Create a client account",
"description": "Requires an agency owner credential with client-account access. The credential default does not change; send the new account_id on later requests.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"client_name": {
"type": "string",
"maxLength": 100,
"description": "Optional client person or business name."
},
"account_id": {
"type": "string",
"description": "Granted agency account that owns the new client account."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"required": [
"account"
],
"properties": {
"account": {
"$ref": "#/components/schemas/AccountIdentity"
}
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/accounts/{account_id}": {
"get": {
"operationId": "getAccount",
"tags": [
"Accounts"
],
"summary": "Read one granted account",
"description": "Works with every API key. Returns the name, kind, region and status of one account that this credential can use, and the permissions of the credential in it. Other account IDs return 403.",
"parameters": [
{
"$ref": "#/components/parameters/AccountPathId"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"required": [
"account"
],
"properties": {
"account": {
"$ref": "#/components/schemas/AccountIdentity"
}
}
}
}
},
"example": {
"success": true,
"data": {
"account": {
"id": "acct_example",
"name": "Acme",
"account_kind": "standard",
"client_name": null,
"agency_account": null,
"region": "eu",
"status": "active",
"permissions": {
"scope": "bucket_admin",
"bucket_access": "all",
"can_create_buckets": true
}
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/account/limits": {
"get": {
"operationId": "getAccountLimits",
"tags": [
"Accounts"
],
"summary": "Read effective account limits",
"description": "Values come from the plan and account overrides. Zero means no allowance; null means no cap. Storage, bucket and email traffic allowances are shared within a billing group. credits is the balance now, with the plan's monthly pool and its next refill.",
"parameters": [
{
"$ref": "#/components/parameters/AccountId"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"required": [
"account_id",
"limits",
"credits"
],
"properties": {
"account_id": {
"type": "string"
},
"limits": {
"$ref": "#/components/schemas/AccountLimits"
},
"usage": {
"type": "object",
"properties": {
"bucket_creations": {
"type": "object",
"properties": {
"monthly_limit": {
"type": [
"integer",
"null"
]
},
"used": {
"type": "integer"
},
"remaining": {
"type": [
"integer",
"null"
]
},
"resets_at": {
"type": "string",
"format": "date-time"
}
}
}
}
},
"credits": {
"type": "object",
"description": "The credits of the account now: the balance, the monthly pool of the plan and when it refills.",
"required": [
"left",
"monthly"
],
"properties": {
"left": {
"type": "integer",
"description": "The balance now, over both pools."
},
"monthly": {
"type": "integer",
"description": "The credits that the plan gives each month."
},
"next_refill_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "When the monthly pool refills next. Null without a refill."
}
}
}
}
}
}
},
"example": {
"success": true,
"data": {
"account_id": "acct_example",
"limits": {
"max_buckets": 3,
"max_bucket_creations_per_month": 12,
"max_files_per_bucket": 25000,
"max_current_files": 40000,
"max_storage_bytes": 2147483648,
"max_file_size_bytes": 52428800,
"max_pdf_size_bytes": 52428800,
"max_file_versions_per_file": 15,
"max_email_aliases_per_bucket": 4,
"max_email_domains": 3,
"max_received_emails_per_month": 1500,
"max_received_email_bytes_per_month": 268435456,
"max_received_email_message_bytes": 20971520,
"max_sent_emails_per_month": 750,
"max_email_address_rotations_per_month": 6,
"max_account_members": 3,
"max_api_keys": 4,
"max_agent_connections": 7,
"api_rate_limit_requests_per_minute": 240,
"audit_retention_days": 45
},
"usage": {
"bucket_creations": {
"monthly_limit": 12,
"used": 2,
"remaining": 10,
"resets_at": "2026-11-01T00:00:00Z"
}
},
"credits": {
"left": 8840,
"monthly": 10000,
"next_refill_at": "2026-12-01T00:00:00Z"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v1/buckets": {
"get": {
"operationId": "listBuckets",
"tags": [
"Buckets"
],
"summary": "List buckets",
"description": "Lists active buckets by default, newest first. Counts and pages cover only buckets this credential can access. Reads no email content.",
"parameters": [
{
"$ref": "#/components/parameters/AccountId"
},
{
"$ref": "#/components/parameters/Reason"
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"active",
"archived",
"all"
],
"default": "active"
}
},
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"type": "string",
"maxLength": 500
},
"description": "Case-insensitive text in the bucket ID, or in the title or address when the key can see the address."
},
{
"$ref": "#/components/parameters/Limit"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"$ref": "#/components/schemas/BucketList"
}
}
},
"example": {
"success": true,
"data": {
"buckets": [
{
"id": "bkt_example",
"account_id": "acct_example",
"title": "acme-orders",
"description": null,
"metadata": {},
"metadata_version": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"email": {
"address": "acme-orders@revdokumail.com",
"message_count": 1,
"unread_count": 1,
"last_received_at": "2026-10-11T12:05:00.000000Z",
"receiving_enabled": true,
"sending_enabled": true
},
"archived": false,
"archived_at": null,
"lock": {
"locked": false
},
"storage_bytes": 51840,
"files_count": 3,
"version_id": "bktrv_example",
"version_number": 0,
"created_at": "2026-10-11T12:00:00.000000Z",
"updated_at": "2026-10-11T12:05:00.000000Z",
"dashboard_url": "https://app.revdoku.com/buckets/view?account_id=acct_example&id=bkt_example",
"archive": {
"allowed": true
},
"unarchive": {
"allowed": false,
"blocked_reason": "not_archived"
},
"delete": {
"allowed": false,
"blocked_reason": "not_archived",
"required_action": "archive_first",
"confirmation": "delete bkt_example"
}
}
],
"counts": {
"active": 1,
"archived": 0,
"total": 1
},
"pagination": {
"limit": 50,
"has_more": false,
"next_cursor": null
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/Error"
}
}
},
"post": {
"operationId": "createBucket",
"tags": [
"Buckets"
],
"summary": "Create a bucket",
"description": "Waits until the address can receive email. On revdokumail.com, email.username is the bucket's name, with no suffix: lowercase letters, digits and single hyphens, 3 to 63 characters, also the name of its site. A name that another bucket uses as an address or a site address, or that another account used, returns EMAIL_ALREADY_EXISTS; your account can use its own earlier names again. Without email.username the address takes the title's name when it is free, else two readable words. A custom domain takes the exact name. If confirmation does not finish, EMAIL_NOT_READY returns the created bucket_id in error.details: read that bucket instead of creating another. The title defaults to email.username; a title that another active bucket uses returns 409 BUCKET_TITLE_TAKEN. With bucket.template, the bucket starts with the files of that template; if they cannot be added, TEMPLATE_IMPORT_FAILED returns the created bucket_id in error.details: add the files to that bucket instead of creating another. Never retry a creation automatically.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"bucket": {
"$ref": "#/components/schemas/BucketCreate"
},
"account_id": {
"type": "string",
"description": "Select another granted account for this request."
},
"reason": {
"$ref": "#/components/schemas/ActionReason"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {