{"openapi":"3.1.0","info":{"title":"SimplePDF API","description":"The SimplePDF API allows you to retrieve, manage and update uploaded documents and submissions. API access is included in the PRO plan and all higher tiers: https://simplepdf.com/pricing","version":"1.0.0"},"servers":[{"url":"https://your_company_identifier.simplepdf.com/api/v1"}],"externalDocs":{"url":"https://your_company_identifier.simplepdf.com/api/v1"},"paths":{"/documents":{"get":{"operationId":"listDocuments","description":"Retrieve the paginated list of documents.","tags":["Document"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":25,"type":"number","maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"next":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"name":{"type":"string","example":"Document.pdf"},"type":{"anyOf":[{"type":"string","const":"edit_and_submit"},{"type":"string","const":"submit"}],"example":"edit_and_submit","description":"edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited."},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57","description":"Public link a recipient opens to fill and submit the document in the SimplePDF editor, standalone or embedded in an iframe. No expiry; anyone with the link can use it. Append `?prefill=<prefill_id>` to apply a prefill."},"created_at":{"type":"string","example":"2025-03-09T21:35:10.599Z"},"updated_at":{"type":"string","example":"2025-04-20T13:40:46.594Z"}},"required":["id","name","type","embed_url","created_at","updated_at"],"additionalProperties":false}}},"required":["next","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}":{"get":{"operationId":"getDocument","description":"Retrieve a specific document. Returns a short-lived presigned `url` to download the original PDF, the public `embed_url` a recipient opens to fill and submit (standalone or embedded; append `?prefill=<id>` to apply a prefill), and a single-use, document-scoped `dashboard_url` granting an admin editor session.","tags":["Document"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"name":{"type":"string","example":"Document.pdf"},"type":{"anyOf":[{"type":"string","const":"edit_and_submit"},{"type":"string","const":"submit"}],"example":"edit_and_submit","description":"edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited."},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57","description":"Public link a recipient opens to fill and submit the document in the SimplePDF editor, standalone or embedded in an iframe. No expiry; anyone with the link can use it. Append `?prefill=<prefill_id>` to apply a prefill."},"created_at":{"type":"string","example":"2025-03-09T21:35:10.599Z"},"updated_at":{"type":"string","example":"2025-04-20T13:40:46.594Z"}},"required":["id","name","type","embed_url","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","example":"https://presigned-url-to-download-the-document","description":"Short-lived presigned URL to download the original document PDF (the uploaded file, not a submission). Expires shortly after issue; fetch a fresh one per use."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"dashboard_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57?access_token=<one_time_token>","description":"Single-use, document-scoped URL granting an embeddable admin editor session bound to this document. Mint a fresh URL for each load."}},"required":["dashboard_url"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"patch":{"operationId":"updateDocument","description":"Update the document","tags":["Document"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"example":"Updated Document.pdf","type":"string","maxLength":200},"type":{"anyOf":[{"type":"string","const":"edit_and_submit"},{"type":"string","const":"submit"}],"example":"edit_and_submit","description":"edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"name":{"type":"string","example":"Document.pdf"},"type":{"anyOf":[{"type":"string","const":"edit_and_submit"},{"type":"string","const":"submit"}],"example":"edit_and_submit","description":"edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited."},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57","description":"Public link a recipient opens to fill and submit the document in the SimplePDF editor, standalone or embedded in an iframe. No expiry; anyone with the link can use it. Append `?prefill=<prefill_id>` to apply a prefill."},"created_at":{"type":"string","example":"2025-03-09T21:35:10.599Z"},"updated_at":{"type":"string","example":"2025-04-20T13:40:46.594Z"}},"required":["id","name","type","embed_url","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","example":"https://presigned-url-to-download-the-document","description":"Short-lived presigned URL to download the original document PDF (the uploaded file, not a submission). Expires shortly after issue; fetch a fresh one per use."}},"required":["url"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"delete":{"operationId":"deleteDocument","description":"Delete the document. This action is irreversible. Deleting the document will also delete the stored file as well as all submissions.","tags":["Document"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}/fields":{"get":{"operationId":"listDocumentFields","description":"Retrieve the field schema of a document. Each field is what you specify in the prefill blob you upload to storage: a blob entry is `{ id, value }`, where `id` is this field's `id` and `value` is the value to prefill. When `options` is set, `value` must be one of them; otherwise `value` is a string (text or checkbox value) or a data URL (signature, picture). Returns 409 when the document has no configured fields. Configure fields via the dashboard first.","tags":["Prefill"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"f_abc","description":"Stable field identifier. Use as the `id` key in the prefill blob."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"example":"last_name","description":"Curated field name."},"type":{"type":"string","enum":["text","checkbox","signature","picture","dropdown","radio"],"example":"text","description":"`dropdown` and `radio` are acrofield-only."},"page":{"type":"number","example":1,"description":"1-indexed page number."},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"example":["checked","xchecked","unchecked"],"description":"Valid values for constrained fields (checkbox, dropdown, radio). `null` otherwise."},"default_value":{"type":"boolean","example":false,"description":"Whether a default value exists. The actual value is stored in storage and loaded client-side; it is never exposed via the API."},"required":{"type":"boolean","example":false,"description":"Whether the field must be filled before submitting."},"read_only":{"type":"boolean","example":false,"description":"Template-level lock. Always takes precedence."}},"required":["id","name","type","page","options","default_value","required","read_only"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false,"example":{"data":[{"id":"f_abc","name":"last_name","type":"text","page":1,"options":null,"default_value":false,"required":true,"read_only":false},{"id":"f_ghi","name":"newsletter_opt_in","type":"checkbox","page":2,"options":["checked","xchecked","unchecked"],"default_value":false,"required":false,"read_only":false},{"id":"f_jkl","name":"country","type":"dropdown","page":2,"options":["US","CA","GB"],"default_value":false,"required":true,"read_only":false},{"id":"f_mno","name":"plan","type":"radio","page":2,"options":["basic","pro","enterprise"],"default_value":false,"required":true,"read_only":false},{"id":"f_pqr","name":"profile_photo","type":"picture","page":3,"options":null,"default_value":false,"required":false,"read_only":false},{"id":"f_stu","name":"signature","type":"signature","page":5,"options":null,"default_value":false,"required":true,"read_only":false},{"id":"f_vwx","name":"form_number","type":"text","page":1,"options":null,"default_value":true,"required":false,"read_only":true}]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.CONFLICT"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}/prefills":{"post":{"operationId":"createPrefill","description":"Create a prefill, then send the prefill blob directly to your own storage by PUTting it to the `url` in the returned `upload` object with its `headers`. The blob is a JSON document of shape `{ \"fields\": [{ \"id\": \"<field id>\", \"value\": \"<value>\" }] }`. Each `id` is a field `id` from `GET /documents/{document_id}/fields`; each `value` is a string for text and checkbox fields, a base64 data URL (for example `data:image/png;base64,...`) for signature and picture fields, or one of the listed `options` when the field is constrained. Signatures look best as a transparent PNG at roughly a 3:1 aspect ratio (for example 1200x400). Unknown ids are ignored and read-only fields keep their existing value. Returns an `embed_url` a recipient opens to review and submit. Requires your own storage (S3, Azure Blob Storage, or SharePoint) that allows read access (write-only storage cannot serve the blob back to recipients) and a document with configured fields.","tags":["Prefill"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"example":{"agent":"intake-bot","user_id":"u_123","environment":"production"},"description":"Optional correlation metadata delivered inline to the submission webhook. Do NOT put sensitive information here. PII belongs in the prefill blob (customer storage).","anyOf":[{"type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{}},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"created_at":{"type":"string","example":"2026-03-21T10:00:00.000Z"},"upload":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"presigned_put"},"url":{"type":"string","example":"https://customeraccount.blob.core.windows.net/prefills/...?sv=...&sig=..."},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"example":{"Content-Type":"application/json","x-ms-blob-type":"BlockBlob"}}},"required":["type","url","method","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"graph_upload_session"},"url":{"type":"string","example":"https://tenant.sharepoint.com/_api/v2.0/drives/.../uploadSession/..."},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"example":{"Content-Type":"application/json"},"description":"Send these headers, and additionally compute and add `Content-Length: <blob byte length>` and `Content-Range: bytes 0-<blob byte length - 1>/<blob byte length>` for this upload type (the byte length is only known once you have the blob)."}},"required":["type","url","method","headers"],"additionalProperties":false}],"description":"Where and how to send the prefill blob: PUT a JSON body of shape `{ \"fields\": [{ \"id\": \"<field id>\", \"value\": \"<value>\" }] }` to this `url` with these `headers`.","example":{"type":"presigned_put","url":"https://customer-bucket.s3.amazonaws.com/prefills/05666d45-96d0-42ce-b24b-f1f1af228f57.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE%2F20260321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260321T100000Z&X-Amz-Expires=900&X-Amz-Signature=8a1b2c3d4e5f6071","method":"PUT","headers":{"Content-Type":"application/json"}},"type":"object"},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57?prefill=...","description":"Link a recipient opens to review and submit the prefilled document (standalone or embedded)."}},"required":["id","created_at","upload","embed_url"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.CONFLICT"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"get":{"operationId":"listPrefills","description":"Retrieve the paginated list of prefills for a given document.","tags":["Prefill"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":25,"type":"number","maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"next":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"created_at":{"type":"string","example":"2026-03-21T10:00:00.000Z"},"context":{"anyOf":[{},{"type":"null"}],"example":{"agent":"intake-bot","user_id":"u_123","environment":"production"}},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57?prefill=...","description":"Link a recipient opens to review and submit the prefilled document (standalone or embedded)."}},"required":["id","created_at","context","embed_url"],"additionalProperties":false}}},"required":["next","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}/prefills/{prefill_id}":{"get":{"operationId":"getPrefill","description":"Retrieve a specific prefill, including a short-lived presigned GET URL to its blob in your storage.","tags":["Prefill"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"prefill_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"created_at":{"type":"string","example":"2026-03-21T10:00:00.000Z"},"context":{"anyOf":[{},{"type":"null"}],"example":{"agent":"intake-bot","user_id":"u_123","environment":"production"}},"embed_url":{"type":"string","example":"https://your_company_identifier.simplepdf.com/documents/05666d45-96d0-42ce-b24b-f1f1af228f57?prefill=...","description":"Link a recipient opens to review and submit the prefilled document (standalone or embedded)."},"url":{"type":"string","example":"https://customer-bucket.s3.amazonaws.com/prefills/...?X-Amz-...","description":"Short-lived presigned GET URL to the prefill blob in customer storage."}},"required":["id","created_at","context","embed_url","url"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"delete":{"operationId":"deletePrefill","description":"Delete a prefill. This action is irreversible. The blob is removed from your storage and the embed_url stops resolving.","tags":["Prefill"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"prefill_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}/submissions":{"get":{"operationId":"listCompanyDocumentSubmissions","description":"Retrieve the paginated list of submissions for a given document.","tags":["Submission"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":25,"type":"number","maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"next":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"submitted_at":{"type":"string","example":"2025-03-09T21:35:10.599Z"},"context":{"anyOf":[{},{"type":"null"}],"example":{"agent":"intake-bot","user_id":"u_123","environment":"production"}}},"required":["id","submitted_at","context"],"additionalProperties":false}}},"required":["next","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/documents/{document_id}/submissions/{submission_id}":{"get":{"operationId":"getDocumentSubmission","description":"Retrieve a specific submission","tags":["Submission"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"submission_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"},"submitted_at":{"type":"string","example":"2025-03-09T21:35:10.599Z"},"context":{"anyOf":[{},{"type":"null"}],"example":{"agent":"intake-bot","user_id":"u_123","environment":"production"}}},"required":["id","submitted_at","context"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","example":"https://presigned-url-to-download-the-submission"}},"required":["url"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"delete":{"operationId":"deleteDocumentSubmission","description":"Delete the submission. This action is irreversible. Deleting the submission will also delete the stored file.","tags":["Submission"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","format":"uuid"},"required":true},{"in":"path","name":"submission_id","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"05666d45-96d0-42ce-b24b-f1f1af228f57"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"error":{"code":{"type":"string","description":"The error code","example":"bad_request"},"message":{"type":"string","description":"The error message","example":"Bad request"}}},"required":["message","code"],"additionalProperties":false,"title":"Bad request error (400)","description":"The error information","example":{"error":{"code":"bad_request","message":"Bad request"}}},"error.UNAUTHORIZED":{"type":"object","properties":{"error":{"code":{"type":"string","description":"The error code","example":"unauthorized"},"message":{"type":"string","description":"The error message","example":"Unauthorized"}}},"required":["message","code"],"additionalProperties":false,"title":"Unauthorized error (401)","description":"The error information","example":{"error":{"code":"unauthorized","message":"Unauthorized"}}},"error.TOO_MANY_REQUESTS":{"type":"object","properties":{"error":{"code":{"type":"string","description":"The error code","example":"too_many_requests"},"message":{"type":"string","description":"The error message","example":"Too many requests"}}},"required":["message","code"],"additionalProperties":false,"title":"Too many requests error (429)","description":"The error information","example":{"error":{"code":"too_many_requests","message":"Too many requests"}}},"error.NOT_FOUND":{"type":"object","properties":{"error":{"code":{"type":"string","description":"The error code","example":"not_found"},"message":{"type":"string","description":"The error message","example":"Not found"}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information","example":{"error":{"code":"not_found","message":"Not found"}}},"error.CONFLICT":{"type":"object","properties":{"error":{"code":{"type":"string","description":"The error code","example":"conflict"},"message":{"type":"string","description":"The error message","example":"Conflict"}}},"required":["message","code"],"additionalProperties":false,"title":"Conflict error (409)","description":"The error information","example":{"error":{"code":"conflict","message":"Conflict"}}}},"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}}}}