Signatures

Envelope Document Download

Markdown for LLMs
GET
/signatures/envelope/{envelopeId}/document/{documentId}/download

Downloads one document of an envelope as raw bytes. documentId is the envelope document's id, as signatures-envelope-open and signatures-envelope-get return it in documents; the storage id of the uploaded file does not work here and is rejected with 400 DOCUMENT_ID_INVALID.

A recipient downloads with the tid from their link and no bearer token; a signed-in user with access to the envelope, such as its creator, can send a bearer token instead. While the envelope's documents are being processed after the last signature, the call returns 409 ENVELOPE_DOCUMENTS_PROCESSING; retry once processing has finished.

The response carries no Content-Disposition header, so name the file yourself — the document's name from open or get.

No bearer token is required. This operation is open to guest callers — a recipient with no Doctavian account, acting from the link in their email — who are identified by the tid from that link 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 caller is anonymous and the response carries no userId.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Path Parameters

envelopeId*string

Id of the envelope the document belongs to. A value that is not a GUID matches no operation and returns a bodiless 404; a GUID that matches no envelope is rejected with 400 ENVELOPE_ID_INVALID.

Formatuuid
documentId*string

Id of the document on the envelope, as signatures-envelope-open and signatures-envelope-get return it in documents[].id. It is not the storage id of the uploaded file. A value that is not a GUID matches no operation and returns a bodiless 404; a GUID that matches no document on the envelope, or one the caller cannot see, is rejected with 400 DOCUMENT_ID_INVALID.

Formatuuid

Query Parameters

tid?string

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.

Mandatory unless the call carries a bearer token for a user with access to the envelope. A call with neither a tid nor a bearer token is rejected with 401 MISSING_TRANSACTION_TOKEN. A value that is not a GUID, or a GUID that matches no token, is rejected with 401 INVALID_TRANSACTION_TOKEN — even when the call also carries a bearer token.

Formatuuid

Response Body

application/octet-stream

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/signatures/envelope/407a5449-8e45-48c5-bfee-9642c17a0d3d/document/f5d32692-685d-4190-9b6f-0ec1c40d2030/download?tid=6c82c35c-ded7-4b49-83a1-e5fed49a0e69"
Empty
{  "error": {    "statusCode": 400,    "message": "Bad Request",    "innerErrors": [      {        "code": "DOCUMENT_ID_INVALID",        "message": "Document with ID 0c643822-a053-4065-8c65-edfb41198748 does not exist",        "userMessage": "Document with ID 0c643822-a053-4065-8c65-edfb41198748 does not exist"      }    ],    "externalErrors": []  },  "origin": "GET https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/document/{documentId}/download",  "dateTime": "2026-10-20T10:41:27.000Z",  "operationId": "c41f0a8e2b7d4e5f9a6b3c2d1e0f9a8b"}
{  "error": {    "statusCode": 401,    "message": "Unauthorized",    "innerErrors": [      {        "code": "INVALID_TRANSACTION_TOKEN",        "message": "Transaction token identifier is invalid or does not exist in the database.",        "userMessage": "Transaction token identifier is invalid. Please make sure that you are accessing this page via the link from your email."      }    ],    "externalErrors": []  },  "origin": "GET https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/document/{documentId}/download",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "5d0c1e7a9b3f4a62b8e1c7d2f0a9b6e3"}
{  "error": {    "statusCode": 403,    "message": "Forbidden",    "innerErrors": [      {        "code": "ENVELOPE_ACCESS_DENIED",        "message": "Envelope access denied for envelope id 3f2b8c1e-7a4d-4e9b-9c21-5d6f0a8b1e47",        "userMessage": "You do not have permission to access envelope with id 3f2b8c1e-7a4d-4e9b-9c21-5d6f0a8b1e47"      }    ]  },  "origin": "GET https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/document/{documentId}/download",  "dateTime": "2026-10-01T09:41:06.000Z",  "userId": "a7507d18-7c4b-4552-8cb5-00d56d63802e",  "operationId": "c4e81a0f6b2d49e7a35f90d1b8e62c47"}
Empty
{  "error": {    "statusCode": 409,    "message": "Conflict",    "innerErrors": [      {        "code": "ENVELOPE_DOCUMENTS_PROCESSING",        "message": "Documents are being processed by a background process.",        "userMessage": "Envelope documents are being processed. Please try again."      }    ],    "externalErrors": []  },  "origin": "GET https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/document/{documentId}/download",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "59da46784a8da8a9d2d5a2bdf43421b5"}
{  "error": {    "statusCode": 500,    "message": "Internal Server Error",    "innerErrors": [      {        "code": "FUNCTION_EXECUTION_ERROR",        "message": "An error occurred during function execution.",        "userMessage": "An error occurred during function execution.",        "eventId": "3914bcfd-fb75-47fe-a94d-40bf22bf02d3"      }    ],    "externalErrors": []  },  "origin": "GET https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/document/{documentId}/download",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "955a0775325b2608213375556a5ad55e"}