{"files":{"SKILL.md":"---\nname: docspring-api\ndescription: \"DocSpring API skill. Use when working with DocSpring for authentication, combined_submissions, custom_files. Covers 40 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# DocSpring API\nAPI version: v1\n\n## Auth\nbasic\n\n## Base URL\nhttps://sync.api.docspring.com/api/v1\n\n## Setup\n1. Configure auth: basic\n2. GET /authentication -- verify access\n3. POST /combined_submissions -- create first combined_submissions\n\n## Endpoints\n\n40 endpoints across 10 groups. See references/api-spec.lap for full details.\n\n### authentication\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /authentication | Test authentication |\n\n### combined_submissions\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /combined_submissions | Get a list of all combined submissions |\n| POST | /combined_submissions | Merge submission PDFs, template PDFs, or custom files |\n| GET | /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs) |\n| DELETE | /combined_submissions/{combined_submission_id} | Expire a combined submission |\n\n### custom_files\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /custom_files | Create a new custom file from a cached S3 upload |\n\n### uploads\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /uploads/presign | Get a presigned S3 URL for direct file upload |\n\n### folders\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /folders/ | Get a list of all folders |\n| POST | /folders/ | Create a folder |\n| POST | /folders/{folder_id}/move | Move a folder |\n| POST | /folders/{folder_id}/rename | Rename a folder |\n| DELETE | /folders/{folder_id} | Delete a folder |\n\n### data_requests\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /data_requests/{data_request_id}/events | Create a new event for emailing a signee a request for signature |\n| POST | /data_requests/{data_request_id}/tokens | Create a new data request token for form authentication |\n| GET | /data_requests/{data_request_id} | Look up a submission data request |\n| PUT | /data_requests/{data_request_id} | Update a submission data request |\n\n### submissions\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /submissions/batches | Generate multiple PDFs |\n| GET | /submissions/batches/{submission_batch_id} | Check the status of a submission batch job |\n| GET | /submissions/{submission_id} | Check the status of a PDF |\n| DELETE | /submissions/{submission_id} | Expire a PDF submission |\n| POST | /submissions/{submission_id}/generate_preview | Generate a preview PDF for partially completed data requests |\n| GET | /submissions | List all submissions |\n\n### templates\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /templates/{template_id}/submissions | Generate a PDF |\n| GET | /templates/{template_id}/submissions | List all submissions for a given template |\n| GET | /templates | Get a list of all templates |\n| POST | /templates | Create a new PDF template with a form POST file upload |\n| GET | /templates/{template_id} | Check the status of an uploaded template |\n| PUT | /templates/{template_id} | Update a Template |\n| DELETE | /templates/{template_id} | Delete a template |\n| POST | /templates/{template_id}/publish_version | Publish a template version |\n| POST | /templates/{template_id}/restore_version | Restore a template version |\n| GET | /templates/{template_id}?full=true | Fetch the full attributes for a PDF template |\n| PUT | /templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post | Update a template's document with a form POST file upload |\n| PUT | /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload | Update a template's document with a cached S3 file upload |\n| PUT | /templates/{template_id}/add_fields | Add new fields to a Template |\n| POST | /templates/{template_id}/move | Move Template to folder |\n| POST | /templates/{template_id}/copy | Copy a template |\n| GET | /templates/{template_id}/schema | Fetch the JSON schema for a template |\n\n### templates?endpoint_variant=create_html_template\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /templates?endpoint_variant=create_html_template | Create a new HTML template |\n\n### templates?endpoint_variant=create_template_from_cached_upload\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /templates?endpoint_variant=create_template_from_cached_upload | Create a new PDF template from a cached S3 file upload |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all authentication?\" -> GET /authentication\n- \"List all combined_submissions?\" -> GET /combined_submissions\n- \"Create a combined_submission?\" -> POST /combined_submissions\n- \"Get combined_submission details?\" -> GET /combined_submissions/{combined_submission_id}\n- \"Delete a combined_submission?\" -> DELETE /combined_submissions/{combined_submission_id}\n- \"Create a custom_file?\" -> POST /custom_files\n- \"List all presign?\" -> GET /uploads/presign\n- \"List all folders?\" -> GET /folders/\n- \"Create a folder?\" -> POST /folders/\n- \"Create a move?\" -> POST /folders/{folder_id}/move\n- \"Create a rename?\" -> POST /folders/{folder_id}/rename\n- \"Delete a folder?\" -> DELETE /folders/{folder_id}\n- \"Create a event?\" -> POST /data_requests/{data_request_id}/events\n- \"Create a token?\" -> POST /data_requests/{data_request_id}/tokens\n- \"Get data_request details?\" -> GET /data_requests/{data_request_id}\n- \"Update a data_request?\" -> PUT /data_requests/{data_request_id}\n- \"Create a batche?\" -> POST /submissions/batches\n- \"Get batche details?\" -> GET /submissions/batches/{submission_batch_id}\n- \"Create a submission?\" -> POST /templates/{template_id}/submissions\n- \"List all submissions?\" -> GET /templates/{template_id}/submissions\n- \"Get submission details?\" -> GET /submissions/{submission_id}\n- \"Delete a submission?\" -> DELETE /submissions/{submission_id}\n- \"Create a generate_preview?\" -> POST /submissions/{submission_id}/generate_preview\n- \"List all submissions?\" -> GET /submissions\n- \"Search templates?\" -> GET /templates\n- \"Create a template?\" -> POST /templates\n- \"Create a templates?endpoint_variant=create_html_template?\" -> POST /templates?endpoint_variant=create_html_template\n- \"Create a templates?endpoint_variant=create_template_from_cached_upload?\" -> POST /templates?endpoint_variant=create_template_from_cached_upload\n- \"Get template details?\" -> GET /templates/{template_id}\n- \"Update a template?\" -> PUT /templates/{template_id}\n- \"Delete a template?\" -> DELETE /templates/{template_id}\n- \"Create a publish_version?\" -> POST /templates/{template_id}/publish_version\n- \"Create a restore_version?\" -> POST /templates/{template_id}/restore_version\n- \"Get template details?\" -> GET /templates/{template_id}?full=true\n- \"Update a template?\" -> PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post\n- \"Update a template?\" -> PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload\n- \"Create a move?\" -> POST /templates/{template_id}/move\n- \"Create a copy?\" -> POST /templates/{template_id}/copy\n- \"List all schema?\" -> GET /templates/{template_id}/schema\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- List endpoints may support pagination; check for limit, offset, or cursor params\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get docspring-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search docspring-api\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@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: 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: 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"}}