-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
6908 lines (6900 loc) · 221 KB
/
openapi.yaml
File metadata and controls
6908 lines (6900 loc) · 221 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.0.1
info:
description: "Use DocSpring's API to programmatically fill out PDF forms, convert\
\ HTML to PDFs, merge PDFs, or request legally binding e-signatures."
title: DocSpring API
version: v1
servers:
- url: https://sync.api.docspring.com/api/v1
paths:
/authentication:
get:
description: |
Checks whether your API token is valid by making an authenticated request.
Returns a success response if authentication passes. This endpoint is useful for
verifying credentials during setup or troubleshooting issues.
externalDocs:
description: Learn how to authenticate with the DocSpring API
url: https://docspring.com/docs/api-guide/authentication/
operationId: testAuthentication
responses:
"200":
content:
application/json:
example:
status: success
schema:
$ref: "#/components/schemas/success_error_response"
description: authentication succeeded
"401":
content:
application/json:
example:
status: error
error: "Could not find API token with ID: missing_api_token"
schema:
$ref: "#/components/schemas/success_error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Test authentication
tags:
- Client
x-accepts:
- application/json
/combined_submissions:
get:
description: |
Returns a paginated list of combined submissions (merged PDFs) for your account.
Includes processing status, expiration details, and download URLs for processed PDFs.
externalDocs:
description: Complete guide to combining PDFs with DocSpring
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: listCombinedSubmissions
parameters:
- description: "Default: 1"
example: 3
in: query
name: page
schema:
minimum: 1
type: integer
- description: "Default: 50"
example: 1
in: query
name: per_page
schema:
maximum: 50
minimum: 1
type: integer
responses:
"200":
content:
application/json:
example:
- id: com_1234567890abcdef01
state: processed
expired: false
expires_in: 300
expires_at: 2018-10-20T13:05:00Z
processed_at: 2020-05-14T02:00:00Z
error_message: null
submission_ids:
- sub_1234567890abcdef01
- sub_1234567890abcdef02
source_pdfs: []
metadata:
qux: abc
user_id: 42
password: password123
pdf_hash: 12342342471442006963e3244a1b43610e066165c09770978221f91bd7ace8f5
download_url: https://docspring-s3-example.s3.amazonaws.com/store/submissions/sub_1234567890abcdef01/20171002192229.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=docspring-s3-example%2F20210101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210101T090000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=abcdef0123456789
actions:
- id: csa_1234567890abcdef01
integration_id: aci_1234567890abcdef01
state: processed
action_type: aws_s3_upload
action_category: file_upload
result_data:
s3_key: acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_url: https://docspring-s3-example.s3.amazonaws.com/acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_bucket: docspring-s3-example
s3_region: us-east-1
- id: com_1234567890abcdef02
state: pending
expired: false
expires_in: null
expires_at: null
processed_at: null
error_message: null
submission_ids: []
source_pdfs: []
metadata: {}
password: null
pdf_hash: null
download_url: null
actions: []
- id: com_1234567890abcdef03
state: processed
expired: false
expires_in: null
expires_at: null
processed_at: 2023-01-05T14:00:00Z
error_message: null
submission_ids: []
source_pdfs: []
metadata: {}
password: null
pdf_hash: 225fb2676adc8f382aba3916d7b7a2088cb7f75ab62ec5c7f4543c5abf8ce4da
download_url: https://docspring-s3-example.s3.amazonaws.com/store/acc_1234567890abcdef01/combined_submissions/com_1234567890abcdef03.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=docspring-s3-example%2F20210101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210101T090000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=abcdef0123456789
actions:
- id: csa_1234567890abcdef02
integration_id: aci_1234567890abcdef01
state: processed
action_type: aws_s3_upload
action_category: file_upload
result_data:
s3_key: acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_url: https://docspring-s3-example.s3.amazonaws.com/acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_bucket: docspring-s3-example
s3_region: us-east-1
- id: com_1234567890abcdef04
state: error
expired: false
expires_in: 123
expires_at: null
processed_at: null
error_message: Something went wrong
submission_ids: []
source_pdfs: []
metadata: {}
password: null
pdf_hash: null
download_url: null
actions: []
- id: com_1234567890abcdef05
state: processed
expired: true
expires_in: 345
expires_at: 2023-01-05T14:05:00Z
processed_at: 2023-01-05T14:00:00Z
error_message: null
submission_ids: []
source_pdfs: []
metadata: {}
password: null
pdf_hash: 0622971147486e1900037eff229d921d14f5b51aac7171729b2b66f81cdf6585
download_url: null
actions:
- id: csa_1234567890abcdef03
integration_id: aci_1234567890abcdef01
state: processed
action_type: aws_s3_upload
action_category: file_upload
result_data:
s3_key: acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_url: https://docspring-s3-example.s3.amazonaws.com/acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_bucket: docspring-s3-example
s3_region: us-east-1
schema:
items:
$ref: "#/components/schemas/combined_submission"
title: list_combined_submissions
type: array
description: enumerate all combined submissions
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Get a list of all combined submissions
tags:
- Client
x-accepts:
- application/json
post:
description: |
Combines multiple PDFs from various sources into a single PDF file. Supports merging
submission PDFs, template PDFs, custom files, other merged PDFs,
and PDFs from URLs. Merges the PDFs in the order provided.
externalDocs:
description: Complete guide to combining PDFs with DocSpring
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: combinePdfs
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/combine_pdfs_data"
required: true
responses:
"201":
content:
application/json:
example:
status: success
combined_submission:
id: com_1234567890abcdef02
state: pending
expired: false
expires_in: 300
expires_at: null
processed_at: null
error_message: null
submission_ids:
- sub_1234567890abcdef01
- sub_1234567890abcdef02
source_pdfs:
- type: submission
id: sub_1234567890abcdef01
- type: template
id: tpl_1234567890abcdef01
template_version: 1.0.0
- type: template
id: tpl_1234567890abcdef01
- type: submission
id: sub_1234567890abcdef02
- type: custom_file
id: cfi_1234567890abcdef01
- type: combined_submission
id: com_1234567890abcdef01
- type: url
url: http://example.com/test-pdf.pdf
metadata:
foo: 123
bar: baz
password: null
pdf_hash: null
download_url: null
actions: []
schema:
$ref: "#/components/schemas/create_combined_submission_response"
description: combined submission created
"422":
content:
application/json:
example:
status: error
errors:
- "source_pdfs: Could not find Submission with ID: MISSING_SUBMISSION_ID"
- "source_pdfs: Template document is not processed: tpl_1234567890abcdef01\
\ (state: pending)"
- "source_pdfs: Invalid template version: 'x.y.z' for template: tpl_1234567890abcdef01"
- "source_pdfs: Could not find Template with version 3.4.5: tpl_1234567890abcdef01"
- "source_pdfs: Could not find Template with ID: MISSING_TEMPLATE_ID"
- "source_pdfs: Could not find Custom File with ID: MISSING_CUSTOM_FILE_ID"
- "source_pdfs: Could not find Combined Submission with ID: MISSING_COMBINED_SUBMISSION_ID"
schema:
$ref: "#/components/schemas/multiple_errors_response"
description: invalid request
"400":
content:
application/json:
example:
status: error
error: "There was a problem with the JSON you submitted: unexpected\
\ character at line 1, column 34 in '{ \"source_pdfs\": [\"123\"\
, \"345\"], metadata: { \"user_id\": \"@#*&%)(@*#%&(@#!\" }}"
schema:
$ref: "#/components/schemas/error_response"
description: invalid JSON
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: "Merge submission PDFs, template PDFs, or custom files"
tags:
- Client
x-codegen-request-body-name: data
x-content-type: application/json
x-accepts:
- application/json
/combined_submissions/{combined_submission_id}:
delete:
description: |
Expiring a combined submission deletes the PDF from our system.
This is useful for invalidating sensitive documents.
externalDocs:
description: Complete guide to combining PDFs with DocSpring
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: expireCombinedSubmission
parameters:
- example: com_1234567890abcdef01
in: path
name: combined_submission_id
required: true
schema:
type: string
responses:
"200":
content:
application/json:
example:
id: com_1234567890abcdef01
state: processed
expired: true
expires_in: 300
expires_at: 2018-10-20T13:00:00Z
processed_at: 2020-05-14T02:00:00Z
error_message: null
submission_ids:
- sub_1234567890abcdef01
- sub_1234567890abcdef02
source_pdfs: []
metadata:
qux: abc
user_id: 42
password: password123
pdf_hash: 12342342471442006963e3244a1b43610e066165c09770978221f91bd7ace8f5
download_url: null
actions:
- id: csa_1234567890abcdef01
integration_id: aci_1234567890abcdef01
state: processed
action_type: aws_s3_upload
action_category: file_upload
result_data:
s3_key: acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_url: https://docspring-s3-example.s3.amazonaws.com/acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_bucket: docspring-s3-example
s3_region: us-east-1
schema:
$ref: "#/components/schemas/combined_submission"
description: submission was expired
"404":
content:
application/json:
example:
status: error
error: Combined submission not found.
schema:
$ref: "#/components/schemas/error_response"
description: combined submission not found
"403":
content:
application/json:
example:
status: error
error: You must use a live API token to expire a combined submission.
schema:
$ref: "#/components/schemas/error_response"
description: test API token used
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Expire a combined submission
tags:
- Client
x-accepts:
- application/json
get:
description: |
Retrieves the details and status of a combined submission. Returns processing state,
download URL (if processed), metadata, and information about any integrated actions
(e.g., S3 uploads).
externalDocs:
description: Complete guide to combining PDFs with DocSpring
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: getCombinedSubmission
parameters:
- example: com_1234567890abcdef01
in: path
name: combined_submission_id
required: true
schema:
type: string
responses:
"200":
content:
application/json:
example:
id: com_1234567890abcdef01
state: processed
expired: false
expires_in: 300
expires_at: 2018-10-20T13:05:00Z
processed_at: 2020-05-14T02:00:00Z
error_message: null
submission_ids:
- sub_1234567890abcdef01
- sub_1234567890abcdef02
source_pdfs: []
metadata:
qux: abc
user_id: 42
password: password123
pdf_hash: 12342342471442006963e3244a1b43610e066165c09770978221f91bd7ace8f5
download_url: https://docspring-s3-example.s3.amazonaws.com/store/submissions/sub_1234567890abcdef01/20171002192229.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=docspring-s3-example%2F20210101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210101T090000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=abcdef0123456789
actions:
- id: csa_1234567890abcdef01
integration_id: aci_1234567890abcdef01
state: processed
action_type: aws_s3_upload
action_category: file_upload
result_data:
s3_key: acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_url: https://docspring-s3-example.s3.amazonaws.com/acc_1234/2018/combined_submissions/20181005090010-com_1234.pdf
s3_bucket: docspring-s3-example
s3_region: us-east-1
schema:
$ref: "#/components/schemas/combined_submission"
description: processed combined submission found
"404":
content:
application/json:
example:
status: error
error: Combined submission not found.
schema:
$ref: "#/components/schemas/error_response"
description: combined submission not found
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Check the status of a combined submission (merged PDFs)
tags:
- Client
x-accepts:
- application/json
/custom_files:
post:
description: |
The Custom Files API endpoint allows you to upload PDFs to DocSpring and then
merge them with other PDFs. First upload your file using the presigned URL endpoint,
then use the returned cache_id to create the custom file.
externalDocs:
description: Learn how to merge custom files with other PDFs
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: createCustomFileFromUpload
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/create_custom_file_data"
required: true
responses:
"201":
content:
application/json:
example:
status: success
custom_file:
id: cfi_1234567890abcdef01
url: https://docspring-s3-example.s3.amazonaws.com/store/acc_1234567890abcdef01/custom_files/cfi_1234567890abcdef01.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=docspring-s3-example%2F20210101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210101T090000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=abcdef0123456789
schema:
$ref: "#/components/schemas/create_custom_file_response"
description: returns the custom file
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Create a new custom file from a cached S3 upload
tags:
- Client
x-uses-cached-s3-file-upload: true
x-codegen-request-body-name: data
x-content-type: application/json
x-accepts:
- application/json
/uploads/presign:
get:
description: |
Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this
endpoint to upload large files before creating templates or custom files. S3 will
respond with a JSON object that you can include in your DocSpring API request.
Uploaded files can be used to:
- [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload)
- [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload)
- [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)
externalDocs:
description: Learn about uploading custom files for PDF combining
url: https://docspring.com/docs/api-guide/combine-pdfs/
operationId: getPresignUrl
responses:
"200":
content:
application/json:
example:
fields:
key: ed9424dccf185f3835df4e9e1da0ca0b
policy: eyJleHBpcmF0aW9uIjoiMjAxOS0xMC0wNVQxNDowMDowMFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJ0ZXN0LWJ1Y2tldCJ9LHsia2V5IjoiZWQ5NDI0ZGNjZjE4NWYzODM1ZGY0ZTllMWRhMGNhMGIifSx7IngtYW16LWNyZWRlbnRpYWwiOiIxMjM0NTY3ODkvMjAxOTEwMDUvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotYWxnb3JpdGhtIjoiQVdTNC1ITUFDLVNIQTI1NiJ9LHsieC1hbXotZGF0ZSI6IjIwMTkxMDA1VDEzMDAwMFoifV19
x-amz-credential: 123456789/20191005/us-east-1/s3/aws4_request
x-amz-algorithm: AWS4-HMAC-SHA256
x-amz-date: 20191005T130000Z
x-amz-signature: 6b715e441bd7ea5beec87f8415230a600be6dfd76b8f89103137618dca959fac
headers: {}
method: post
url: https://test-bucket.s3.amazonaws.com
schema:
$ref: "#/components/schemas/upload_presign_response"
description: presign URL generated
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Get a presigned S3 URL for direct file upload
tags:
- Client
x-accepts:
- application/json
/folders/:
get:
description: |
Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve
subfolders. Folders help organize templates and maintain a hierarchical structure.
operationId: listFolders
parameters:
- description: Filter By Folder Id
example: fld_1234567890abcdef02
in: query
name: parent_folder_id
schema:
type: string
responses:
"200":
content:
application/json:
example:
- id: fld_1234567890abcdef03
name: nested folder 1
path: /Folder 2
parent_folder_id: fld_1234567890abcdef02
schema:
items:
$ref: "#/components/schemas/folder"
title: list_folders
type: array
description: enumerate all folders
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Get a list of all folders
tags:
- Client
x-accepts:
- application/json
post:
description: |
Creates a new folder for organizing templates. Folders can be nested within other folders
by providing a `parent_folder_id`. Folder names must be unique within the same parent.
operationId: createFolder
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/create_folder_data"
required: true
responses:
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/multiple_errors_response"
description: name already exist
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/error_response"
description: parent folder doesn't exist
"200":
content:
application/json:
example:
id: fld_1234567890abcdef05
name: Folder 3
path: /Folder 1
parent_folder_id: fld_1234567890abcdef01
schema:
$ref: "#/components/schemas/folder"
description: folder created inside another folder
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Create a folder
tags:
- Client
x-codegen-request-body-name: data
x-content-type: application/json
x-accepts:
- application/json
/folders/{folder_id}/move:
post:
description: |
Moves a folder to a new parent folder or to the root level. All templates and subfolders
within the folder are moved together. Cannot move a folder into one of its own subfolders.
operationId: moveFolderToFolder
parameters:
- example: fld_1234567890abcdef01
in: path
name: folder_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/move_folder_data"
required: true
responses:
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/error_response"
description: parent folder doesn't exist
"200":
content:
application/json:
example:
id: fld_1234567890abcdef01
name: Folder 1
path: /Folder 2
parent_folder_id: fld_1234567890abcdef02
schema:
$ref: "#/components/schemas/folder"
description: move to root folder
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Move a folder
tags:
- Client
x-codegen-request-body-name: data
x-content-type: application/json
x-accepts:
- application/json
/folders/{folder_id}/rename:
post:
description: |
Renames an existing folder. The new name must be unique within the same parent folder.
This operation only changes the folder name, not its location or contents.
operationId: renameFolder
parameters:
- example: fld_1234567890abcdef01
in: path
name: folder_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/rename_folder_data"
required: true
responses:
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/multiple_errors_response"
description: name already exist
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/error_response"
description: folder doesn't belong to me
"200":
content:
application/json:
example:
id: fld_1234567890abcdef01
name: Folder 3
path: /
parent_folder_id: null
schema:
$ref: "#/components/schemas/folder"
description: successful rename
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Rename a folder
tags:
- Client
x-codegen-request-body-name: data
x-content-type: application/json
x-accepts:
- application/json
/folders/{folder_id}:
delete:
description: |
Deletes an empty folder. The folder must not contain any templates or subfolders.
Move or delete all contents before attempting to delete the folder.
operationId: deleteFolder
parameters:
- example: fld_1234567890abcdef01
in: path
name: folder_id
required: true
schema:
type: string
responses:
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/error_response"
description: folder doesn't exist
"422":
content:
application/json:
schema:
$ref: "#/components/schemas/error_response"
description: folder has contents
"200":
content:
application/json:
example:
id: fld_1234567890abcdef01
name: Folder 1
path: /
parent_folder_id: null
schema:
$ref: "#/components/schemas/folder"
description: folder is empty
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
security:
- api_token_basic: []
summary: Delete a folder
tags:
- Client
x-accepts:
- application/json
/data_requests/{data_request_id}/events:
post:
description: |
Records user notification events for data requests. Use this to create an audit trail
showing when and how users were notified about data request forms. Supports email, SMS,
and other notification types. Records the notification time for compliance tracking.
See also:
- [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow
externalDocs:
description: Track user notification events for audit trail logging
url: https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/#2-notify-the-user
operationId: createDataRequestEvent
parameters:
- example: drq_1234567890abcdef01
in: path
name: data_request_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/create_submission_data_request_event_request"
required: true
responses:
"201":
content:
application/json:
example:
status: success
event:
id: dre_1234567890abcdef01
submission_id: sub_1234567890abcdef01
submission_data_request_id: drq_1234567890abcdef01
event_type: send_request
message_type: email
message_recipient: test@test.com
occurred_at: 2018-10-20T13:00:00Z
schema:
$ref: "#/components/schemas/create_submission_data_request_event_response"
description: event created
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
"422":
content:
application/json:
example:
status: error
errors:
- Message type can't be blank
- Message recipient can't be blank
schema:
$ref: "#/components/schemas/multiple_errors_response"
description: message recipient must not be blank
security:
- api_token_basic: []
summary: Create a new event for emailing a signee a request for signature
tags:
- Client
x-codegen-request-body-name: event
x-content-type: application/json
x-accepts:
- application/json
/data_requests/{data_request_id}/tokens:
post:
description: |
Creates an authentication token for accessing a data request form. Tokens can be created
for API access (1 hour expiration) or email links (30 day expiration). Returns a token
and a pre-authenticated URL for the data request form.
See also:
- [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)
externalDocs:
description: Generate authentication tokens for embedded data requests
url: https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/#3-request-an-authentication-token
operationId: createDataRequestToken
parameters:
- example: drq_1234567890abcdef01
in: path
name: data_request_id
required: true
schema:
type: string
- example: api
in: query
name: type
schema:
enum:
- api
- email
type: string
responses:
"201":
content:
application/json:
example:
status: success
token:
id: 1234567890abcdef01
secret: ABCDEF01234567890
expires_at: 2018-10-20T14:00:00Z
data_request_url: https://app.docspring.com/data_requests/drq_1234567890abcdef01?token_id=1234567890abcdef01&token_secret=ABCDEF01234567890
schema:
$ref: "#/components/schemas/create_submission_data_request_token_response"
description: token created
"401":
content:
application/json:
example:
status: error
error: "Missing Basic Auth: Please provide an API token via Basic\
\ Auth. See: https://docspring.com/docs/api-guide/authentication/"
schema:
$ref: "#/components/schemas/error_response"
description: authentication failed
"422":
content:
application/json:
example:
status: error
error: "Invalid token type: invalid. Must be one of: api (expiration:\
\ 1 hour), email (expiration: 30 days)"
schema:
$ref: "#/components/schemas/error_response"
description: invalid request
security:
- api_token_basic: []
summary: Create a new data request token for form authentication
tags:
- Client
x-accepts:
- application/json
/data_requests/{data_request_id}:
get:
description: |
Retrieves the details and status of a data request. Returns information about the request
state (pending, viewed, completed), authentication details, and metadata.
Includes audit information like IP address, browseruser agent, and timestamps.
See also:
- [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow
operationId: getDataRequest
parameters:
- example: drq_1234567890abcdef01
in: path
name: data_request_id
required: true
schema:
type: string
responses: