Cancel document

This endpoint allows you to cancel/reject an in-progress document to interrupt the signing process.

Notes

  • Permissions: Can be used by administrators, owners, or groups with access.

  • Final status: The document is set to "rejected" and can no longer be signed.

  • Watermark: Adds the watermark "Rejected document" to the final PDF indicating the cancellation.

  • Webhook: May trigger the "doc_signed" webhook after the cancellation (updated PDF).

  • Document status: Must be "in progress" to be canceled.

  • User-Agent: Mandatory header to prevent spam.

Endpoint

POSThttps://api.zapsign.com.br/api/v1/refuse/

Headers:

Name
Type
Description

Authorization*

string

API token prefixed by the text "Bearer". Example: Bearer c7f35c84-7893-4087-b4fb-d1f06c23.

Request Body

Name
Type
Description

doc_token*

string

Document token

rejected_reason*

string

Reason for canceling the document. This information will be available on the web platform in the document details.

Example request:

{
  "doc_token": "bfe4e2c7-33be-4a70-8669-a0491f92e795",
  "rejected_reason": "Document canceled by the company"
}

Response

{
    "message": "Document successfully refused. Please note: this endpoint is asynchronous, so wait for the final PDFs to be ready via webhooks or check them in a few minutes."
}

Error codes

  • 400 missing_doc_token: You must send the doc_token (string)

  • 400 missing_rejected_reason: You must send the rejected_reason (string)

  • 400 invalid_json: The JSON sent is invalid

  • 403 document_already_signed: A signed document cannot be canceled

  • 403 document_already_refused: A document that has already been canceled/rejected cannot be canceled again

  • 403 refuse_not_allowed: Rejection of this document is not allowed

  • 404 document_not_found: Document not found

  • 500 internal_error: Internal error while processing the reques

Last updated

Was this helpful?