{"note":"OpenAPI conversion -- returning structured metadata","name":"formapi-io","description":"DocSpring API","version":"v1","base_url":"https://sync.api.docspring.com/api/v1","endpoints":40,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api DocSpring API\n@base https://sync.api.docspring.com/api/v1\n@version v1\n@auth basic\n@endpoints 40\n@hint download_for_search\n@toc authentication(1), combined_submissions(4), custom_files(1), uploads(1), folders(5), data_requests(4), submissions(6), templates(16), templates?endpoint_variant=create_html_template(1), templates?endpoint_variant=create_template_from_cached_upload(1)\n\n@group authentication\n@endpoint GET /authentication\n@desc Test authentication\n@returns(200) authentication succeeded\n@errors {401: authentication failed}\n\n@endgroup\n\n@group combined_submissions\n@endpoint GET /combined_submissions\n@desc Get a list of all combined submissions\n@optional {page: any # Default: 1, per_page: any # Default: 50}\n@returns(200) enumerate all combined submissions\n@errors {401: authentication failed}\n\n@endpoint POST /combined_submissions\n@desc Merge submission PDFs, template PDFs, or custom files\n@required {data: map}\n@returns(201) combined submission created\n@errors {400: invalid JSON, 401: authentication failed, 422: invalid request}\n\n@endpoint GET /combined_submissions/{combined_submission_id}\n@desc Check the status of a combined submission (merged PDFs)\n@required {combined_submission_id: any}\n@returns(200) processed combined submission found\n@errors {401: authentication failed, 404: combined submission not found}\n\n@endpoint DELETE /combined_submissions/{combined_submission_id}\n@desc Expire a combined submission\n@required {combined_submission_id: any}\n@returns(200) submission was expired\n@errors {401: authentication failed, 403: test API token used, 404: combined submission not found}\n\n@endgroup\n\n@group custom_files\n@endpoint POST /custom_files\n@desc Create a new custom file from a cached S3 upload\n@required {data: map}\n@returns(201) returns the custom file\n@errors {401: authentication failed}\n\n@endgroup\n\n@group uploads\n@endpoint GET /uploads/presign\n@desc Get a presigned S3 URL for direct file upload\n@returns(200) presign URL generated\n@errors {401: authentication failed}\n\n@endgroup\n\n@group folders\n@endpoint GET /folders/\n@desc Get a list of all folders\n@optional {parent_folder_id: any # Filter By Folder Id}\n@returns(200) enumerate all folders\n@errors {401: authentication failed}\n\n@endpoint POST /folders/\n@desc Create a folder\n@required {data: map}\n@returns(200) folder created inside another folder\n@errors {401: authentication failed, 404: parent folder doesn't exist, 422: name already exist}\n\n@endpoint POST /folders/{folder_id}/move\n@desc Move a folder\n@required {folder_id: any, data: map}\n@returns(200) move to root folder\n@errors {401: authentication failed, 404: parent folder doesn't exist}\n\n@endpoint POST /folders/{folder_id}/rename\n@desc Rename a folder\n@required {folder_id: any, data: map}\n@returns(200) successful rename\n@errors {401: authentication failed, 404: folder doesn't belong to me, 422: name already exist}\n\n@endpoint DELETE /folders/{folder_id}\n@desc Delete a folder\n@required {folder_id: any}\n@returns(200) folder is empty\n@errors {401: authentication failed, 404: folder doesn't exist, 422: folder has contents}\n\n@endgroup\n\n@group data_requests\n@endpoint POST /data_requests/{data_request_id}/events\n@desc Create a new event for emailing a signee a request for signature\n@required {data_request_id: any, event: map}\n@returns(201) event created\n@errors {401: authentication failed, 422: message recipient must not be blank}\n\n@endpoint POST /data_requests/{data_request_id}/tokens\n@desc Create a new data request token for form authentication\n@required {data_request_id: any}\n@optional {type: any}\n@returns(201) token created\n@errors {401: authentication failed, 422: invalid request}\n\n@endpoint GET /data_requests/{data_request_id}\n@desc Look up a submission data request\n@required {data_request_id: any}\n@returns(200) completed submission data request found\n@errors {401: authentication failed, 404: submission data request not found}\n\n@endpoint PUT /data_requests/{data_request_id}\n@desc Update a submission data request\n@required {data_request_id: any, data: map}\n@returns(200) submission data request updated\n@errors {401: authentication failed, 404: submission data request not found, 422: invalid request}\n\n@endgroup\n\n@group submissions\n@endpoint POST /submissions/batches\n@desc Generate multiple PDFs\n@required {data: map}\n@optional {wait: any # Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)}\n@returns(200) some PDFs with invalid data\n@returns(201) submissions created\n@errors {400: invalid JSON, 401: authentication failed, 422: array of arrays}\n\n@endpoint GET /submissions/batches/{submission_batch_id}\n@desc Check the status of a submission batch job\n@required {submission_batch_id: any}\n@optional {include_submissions: any}\n@returns(200) processed submission batch found\n@errors {401: authentication failed, 404: submission batch not found}\n\n@endgroup\n\n@group templates\n@endpoint POST /templates/{template_id}/submissions\n@desc Generate a PDF\n@required {template_id: any, submission: map}\n@optional {wait: any # Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)}\n@returns(201) submission created\n@errors {401: authentication failed, 422: invalid request}\n\n@endpoint GET /templates/{template_id}/submissions\n@desc List all submissions for a given template\n@required {template_id: any}\n@optional {cursor: any, limit: any, created_after: any, created_before: any, type: any, include_data: any}\n@returns(200) listing submissions\n@errors {404: invalid template id}\n\n@endgroup\n\n@group submissions\n@endpoint GET /submissions/{submission_id}\n@desc Check the status of a PDF\n@required {submission_id: any}\n@optional {include_data: any}\n@returns(200) processed submission found with data\n@errors {401: authentication failed, 404: submission not found}\n\n@endpoint DELETE /submissions/{submission_id}\n@desc Expire a PDF submission\n@required {submission_id: any}\n@returns(200) submission was expired\n@errors {401: authentication failed, 403: test API token used, 404: submission not found}\n\n@endpoint POST /submissions/{submission_id}/generate_preview\n@desc Generate a preview PDF for partially completed data requests\n@required {submission_id: any}\n@returns(200) preview was successfully requested\n@errors {404: submission not found, 422: error requesting preview}\n\n@endpoint GET /submissions\n@desc List all submissions\n@optional {cursor: any, limit: any, created_after: any, created_before: any, type: any, include_data: any}\n@returns(200) listing submissions\n@errors {401: authentication failed, 422: invalid type}\n\n@endgroup\n\n@group templates\n@endpoint GET /templates\n@desc Get a list of all templates\n@optional {query: any # Search By Name, parent_folder_id: any # Filter By Folder Id, page: any # Default: 1, per_page: any # Default: 50}\n@returns(200) enumerate all templates\n@errors {401: authentication failed, 404: filter templates by invalid folder id}\n\n@endpoint POST /templates\n@desc Create a new PDF template with a form POST file upload\n@required {template[document]: any, template[name]: any}\n@optional {wait: any # Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain), template[description]: any, template[parent_folder_id]: any}\n@returns(201) returns a pending template\n@errors {401: authentication failed}\n\n@endgroup\n\n@group templates?endpoint_variant=create_html_template\n@endpoint POST /templates?endpoint_variant=create_html_template\n@desc Create a new HTML template\n@required {data: map}\n@returns(201) returns a created template\n@errors {401: authentication failed}\n\n@endgroup\n\n@group templates?endpoint_variant=create_template_from_cached_upload\n@endpoint POST /templates?endpoint_variant=create_template_from_cached_upload\n@desc Create a new PDF template from a cached S3 file upload\n@required {data: map}\n@returns(201) returns a pending template\n@errors {401: authentication failed}\n\n@endgroup\n\n@group templates\n@endpoint GET /templates/{template_id}\n@desc Check the status of an uploaded template\n@required {template_id: any}\n@returns(200) template found\n@errors {401: authentication failed, 404: template not found}\n\n@endpoint PUT /templates/{template_id}\n@desc Update a Template\n@required {template_id: any, data: map}\n@returns(200) update template success\n\n@endpoint DELETE /templates/{template_id}\n@desc Delete a template\n@required {template_id: any}\n@optional {version: any}\n@returns(200) template version deleted successfully\n@errors {401: authentication failed, 404: template not found}\n\n@endpoint POST /templates/{template_id}/publish_version\n@desc Publish a template version\n@required {template_id: any, data: map}\n@returns(200) version published successfully\n@errors {401: authentication failed, 404: template not found, 422: invalid version type}\n\n@endpoint POST /templates/{template_id}/restore_version\n@desc Restore a template version\n@required {template_id: any, data: map}\n@returns(200) version restored successfully\n@errors {401: authentication failed, 404: template version not found, 422: draft version not allowed}\n\n@endpoint GET /templates/{template_id}?full=true\n@desc Fetch the full attributes for a PDF template\n@required {template_id: any}\n@returns(200) template found\n@errors {401: authentication failed, 404: template not found}\n\n@endpoint PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post\n@desc Update a template's document with a form POST file upload\n@required {template_id: any, template[document]: any}\n@optional {template[name]: any}\n@returns(200) returns a template with updated document\n@errors {401: authentication failed}\n\n@endpoint PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload\n@desc Update a template's document with a cached S3 file upload\n@required {template_id: any, data: map}\n@returns(200) returns a template with updated document\n@errors {401: authentication failed}\n\n@endpoint PUT /templates/{template_id}/add_fields\n@desc Add new fields to a Template\n@required {template_id: any, data: map}\n@returns(200) add fields success\n@errors {422: add fields error}\n\n@endpoint POST /templates/{template_id}/move\n@desc Move Template to folder\n@required {template_id: any, data: map}\n@returns(200) move template success\n@errors {404: folder not found}\n\n@endpoint POST /templates/{template_id}/copy\n@desc Copy a template\n@required {template_id: any}\n@optional {options: map}\n@returns(200) copy template success\n@errors {404: folder not found}\n\n@endpoint GET /templates/{template_id}/schema\n@desc Fetch the JSON schema for a template\n@required {template_id: any}\n@returns(200) template found\n@errors {401: authentication failed, 404: template not found}\n\n@endgroup\n\n@end\n"}