Envelope Attachment Upload
Markdown for LLMsUploads one or more files onto an envelope as attachments. Attachments are normally added by a recipient during their signing session — supporting evidence, a counter-signed copy, identification, whatever the agreement calls for. Depending on the envelope's configuration they are either embedded into the completed PDF or delivered alongside it as email attachments, and either way the upload is recorded in the audit trail.
A recipient uploads with the tid from their link and no bearer token. A signed-in user can send a bearer token instead, and must then be the envelope's creator or a signer on it. When both are sent, the bearer token is used. A call with neither is rejected with 401 AUTHORIZATION_ERROR before the body is read.
The request must be multipart/form-data; there is no raw-body or JSON alternative. Any file type is accepted — there is no extension or content-type check. The maximum file size is 20 MB in Production and 10 MB in Staging. A file over that limit is rejected by the web server before the operation runs, so it surfaces as a 500 rather than a validation error.
Each stored file gets an id, returned in form-data order, which signatures-envelope-attachment-download takes to fetch it back.
No bearer token is required when tid is sent. A recipient acting from the link in their email is identified by that tid instead of a token. The API key is still required, as on every operation: send it in the X-Api-Key header or the x-api-key query parameter. When the call carries no bearer token, the response carries no userId.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Path Parameters
Id of the envelope to attach the files to. A value that is not a GUID matches no operation and returns a bodiless 404.
uuidQuery Parameters
Transaction token identifying one recipient position on one envelope. It reaches the recipient in the link of their notification email — or, for an inpersonsigner, reaches the host named in hostEmail — and signatures-envelope-list returns it as transactionTokenId on entries for positions the caller holds.
Send it to upload without a bearer token. When a bearer token is also sent, the bearer token is used and the call is authenticated as that user. A GUID that matches no token is rejected with 404 ENVELOPE_NOT_FOUND_TID.
uuidRequest Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/signatures/envelope/407a5449-8e45-48c5-bfee-9642c17a0d3d/attachment/upload?tid=6c82c35c-ded7-4b49-83a1-e5fed49a0e69" \ -F file="[]"{ "result": { "statusCode": 201, "message": "Created", "data": { "files": [ { "id": "9a9543dc-62fb-488a-a5e5-f759e0697220", "fileName": "proof-of-address.pdf" } ] } }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z", "operationId": "cb490b9c96127e106b34bf5828a28eb6"}{ "error": { "statusCode": 400, "message": "Bad Request", "innerErrors": [ { "code": "FORM_DATA_EXPECTED", "message": "Request must be multipart/form-data.", "userMessage": "Request must be multipart/form-data." } ], "externalErrors": [] }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z", "operationId": "f5c2618fc457128cfe907110f97684b5"}{ "error": { "statusCode": 401, "message": "Unauthorized", "innerErrors": [ { "code": "AUTHORIZATION_ERROR", "message": "Authorization header is missing.", "userMessage": "Authorization header is missing." } ] }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z"}{ "error": { "statusCode": 403, "message": "Forbidden", "innerErrors": [ { "code": "ENVELOPE_OWNER_INVALID_SUBSCRIPTION", "message": "The envelope owner's subscription is not active.", "userMessage": "This envelope can't accept uploads right now." } ], "externalErrors": [] }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z", "operationId": "bd8829cc0484a86b10efd4475e77f16e"}{ "error": { "statusCode": 404, "message": "Not Found", "innerErrors": [ { "code": "ENVELOPE_NOT_FOUND_TID", "message": "Envelope not found for specified transaction token: 2fd07e82-b390-4240-ab24-f965fe842309.", "userMessage": "Envelope not found for specified transaction token: 2fd07e82-b390-4240-ab24-f965fe842309." } ], "externalErrors": [] }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z", "operationId": "8610fd5a1c8e41b21a2f9d97ba0d241e"}{ "error": { "statusCode": 500, "message": "Internal Server Error", "innerErrors": [ { "code": "FILE_UPLOAD_FAILED", "message": "Failed to persist the uploaded file to storage.", "userMessage": "Something went wrong while uploading. Please try again or contact support." } ], "externalErrors": [] }, "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/attachment/upload", "dateTime": "2026-10-15T09:51:05.000Z", "operationId": "28b635f5cb8bc72cad8a2b23f317936c"}