Signatures

Envelope Decline

Markdown for LLMs
POST
/signatures/envelope/decline

Declines an envelope on behalf of the recipient a tid identifies. The recipient's status, and their sign group's, becomes Declined. The recipient does not need to accept the legal terms first.

When the recipient is mandatory, the envelope is declined with them: its status becomes Declined, the other recipients are canceled, the declined notifications are emailed, and the envelope can no longer be opened (ENVELOPE_DECLINED). When the recipient is not mandatory, the envelope carries on and can still complete, because completion ignores non-mandatory recipients. With sign order on, the next signers are emailed, and the sender gets the same notification as when a recipient finishes, if notifyWhenSigned is on. The response's envelope.status is the envelope's status after the call, so it shows which of the two happened.

envelope.declineReason explains why. It is optional unless the envelope's DECLINE_REASON_REQUIRED setting, returned by signatures-envelope-check, is "true"; then a missing or empty reason — the whole envelope object left out included — is rejected with ENVELOPE_DECLINE_REASON_REQUIRED.

A recipient who has already declined is rejected with SIGNER_OR_GROUP_ALREADY_DECLINED, and one who has already signed with SIGNER_OR_GROUP_ALREADY_COMPLETED.

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

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, and checked even when the call also carries a bearer token. A value that is not a GUID, or a GUID that matches no token, is rejected with 401 INVALID_TRANSACTION_TOKEN, and an empty value (?tid=) with 401 MISSING_TRANSACTION_TOKEN. Leaving the parameter out matches no operation and is answered with 404 NOT_FOUND from the gateway.

Formatuuid

Request Body

application/json

Optional while the envelope does not require a decline reason: send no body, or {}, to decline without one. When the envelope's DECLINE_REASON_REQUIRED setting is "true", envelope.declineReason is mandatory, and a request without it — no body included — is rejected with 400 ENVELOPE_DECLINE_REASON_REQUIRED.

TypeScript Definitions

Use the request body type in TypeScript.

Request body for declining an envelope.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/signatures/envelope/decline?tid=6c82c35c-ded7-4b49-83a1-e5fed49a0e69" \  -H "Content-Type: application/json" \  -d '{    "envelope": {      "declineReason": "The payment terms in section 4 are not what we agreed."    },    "externalContext": {      "id": "12345"    }  }'
{  "result": {    "statusCode": 200,    "message": "OK",    "data": {      "envelope": {        "id": "407a5449-8e45-48c5-bfee-9642c17a0d3d",        "status": "Declined"      },      "recipient": {        "id": "2bdacd57-662d-49da-be4b-e876b8b12ea1",        "status": "Declined"      }    }  },  "externalContext": {    "id": "12345"  },  "origin": "POST https://api.doctavian.com/v1/signatures/envelope/decline",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "8540f86be1974241a91ff5ce59765851"}
{  "error": {    "statusCode": 400,    "message": "Bad Request",    "innerErrors": [      {        "code": "SIGNER_OR_GROUP_ALREADY_DECLINED",        "message": "Signer with ID 2bdacd57-662d-49da-be4b-e876b8b12ea1 or his group has already declined this envelope.",        "userMessage": "Signer with ID 2bdacd57-662d-49da-be4b-e876b8b12ea1 or his group has already declined this envelope. No more actions can be taken."      }    ],    "externalErrors": []  },  "origin": "POST https://api.doctavian.com/v1/signatures/envelope/decline",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "e4b16cf078460de4d9d88ed11bd3d541"}
{  "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": "POST https://api.doctavian.com/v1/signatures/envelope/decline",  "dateTime": "2026-10-15T09:51:05.000Z",  "operationId": "7b8cc5068c39be4eb6809380c8434003"}
{  "error": {    "statusCode": 404,    "message": "Not Found",    "innerErrors": [      {        "code": "NOT_FOUND",        "message": "OperationNotFound",        "userMessage": "Unable to match incoming request to an operation."      }    ]  },  "origin": "",  "dateTime": "2026-10-16T07:34:38.000Z"}
{  "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": "POST https://api.doctavian.com/v1/signatures/envelope/decline",  "dateTime": "2026-10-20T10:41:27.000Z",  "operationId": "7b3d0a2d409fb31652fb3917cab4b83d"}