Signatures

Envelope Cancel

Markdown for LLMs
POST
/signatures/envelope/{envelopeId}/cancel

Cancels an envelope, ending its signing process for good. Send the envelope's id as envelopeId, as returned by signatures-envelope-create in result.data.envelope.id. The request body is optional and carries only externalContext, which is echoed back in the response.

A canceled envelope has status Canceled. Its recipients can still read its status with signatures-envelope-check, but signatures-envelope-open answers them with 400 ENVELOPE_CANCELED, so nothing more can be signed. Cancel cannot be undone: a canceled envelope can no longer be sent, deleted or restored.

Only an envelope that is still being signed — status In Progress — can be canceled. Any other is rejected with 400 ENVELOPE_CANCEL_NOT_ALLOWED and left unchanged: a Draft, and an envelope that is already Completed, Declined, Expired, Failed or Canceled.

To discard a draft that was never sent, use signatures-envelope-delete, which signatures-envelope-restore can undo.

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 to cancel, as returned by signatures-envelope-create in result.data.envelope.id. Must be a GUID: a value that is not one matches no route and returns a bodiless 404. A well-formed id that matches no envelope returns 400 ENVELOPE_ID_INVALID.

Formatuuid

Request Body

application/json

Optional. The only property read is externalContext, which is echoed back unchanged in the response; send no body, or {}, when there is no context to pass.

TypeScript Definitions

Use the request body type in TypeScript.

Optional request body for an operation that takes no input of its own beyond its path and query parameters. The only property read is externalContext, which is echoed back in the response. Send {}, or no body at all, when there is no context to pass.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/signatures/envelope/839b6734-e80c-42b7-8cf4-821940af3fe8/cancel" \  -H "Content-Type: application/json" \  -d '{    "externalContext": {      "id": "12345"    }  }'
{  "result": {    "statusCode": 200,    "message": "OK",    "data": {      "envelope": {        "id": "839b6734-e80c-42b7-8cf4-821940af3fe8",        "status": "Canceled"      }    }  },  "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/cancel",  "dateTime": "2026-10-06T09:41:06.000Z",  "externalContext": {    "id": "12345"  },  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "0b23f8392981d6a5f0eee293ebe01ad4"}
{  "error": {    "statusCode": 400,    "message": "Bad Request",    "innerErrors": [      {        "code": "ENVELOPE_ID_INVALID",        "message": "Envelope with ID 839b6734-e80c-42b7-8cf4-821940af3fe8 does not exist",        "userMessage": "Envelope with ID 839b6734-e80c-42b7-8cf4-821940af3fe8 does not exist"      }    ],    "externalErrors": []  },  "externalContext": {    "id": "12345"  },  "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/cancel",  "dateTime": "2026-10-16T07:12:58.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "6b1f0e94c2a74d3e8f5a09b7c3d2e146"}
{  "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": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/cancel",  "dateTime": "2026-10-01T09:41:06.000Z",  "userId": "f95b5e7b-e0bb-4567-a979-8f35e58bed06",  "operationId": "c4e81a0f6b2d49e7a35f90d1b8e62c47"}
Empty
{  "error": {    "statusCode": 500,    "message": "Internal Server Error",    "innerErrors": [      {        "code": "FUNCTION_EXECUTION_ERROR",        "message": "An error ocurred during function execution",        "userMessage": "An error ocurred during function execution",        "eventId": "5a8e2c71-3f04-4b9d-a6e1-7d0c9b2f4e58"      }    ],    "externalErrors": []  },  "origin": "POST https://api.doctavian.com/v1/signatures/envelope/{envelopeId}/cancel",  "dateTime": "2026-10-16T07:12:47.000Z",  "userId": "1fa93f1d-07e8-4e08-84e6-c0098f3b6ed5",  "operationId": "c97a2e0b5d184f6a93e1b8d40f7c25a3",  "externalContext": {    "id": "12345"  }}