> For the complete documentation index, see [llms.txt](https://docs.zapsign.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapsign.com.br/zapsign-api/english/signatarios/reject-documents-by-user.md).

# Reject documents by User

This endpoint allows rejecting an individual document or an envelope (a batch of documents) by sending the required information in the request body.

<mark style="color:green;">`POST`</mark>`https://api.zapsign.com.br/api/v1/refuse/by-user/`

**How to Use:**

Send a payload in JSON format with the following fields:

* **doc\_token:** (string) Token of the document to be rejected.
* **user\_token:** (string) Token of the user rejecting the document.
* **signer\_token:** (string) Token of the signer related to the document.
* **rejected\_reason:** (string, optional) Reason for rejecting the document.

Learn more about the[ types of tokens here](/zapsign-api/english/types-of-tokens.md)

**Conditions:**

* The document must have the status “In progress.”
* When creating the document, the parameter `allow_refuse_signature` must be set to true.

**Notes:**

* When a document is refused, it receives the watermark "Document refused" and cannot be signed in the future.
* The endpoint response will also be returned in JSON format.
* This endpoint is asynchronous and may take a few seconds to update the document's final status.

**Headers:**

<table><thead><tr><th width="165">Name</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>API token prefixed by the text "Bearer". Example: <code>Bearer c7f35c84-7893-4087-b4fb-d1f06c23</code>.</td></tr></tbody></table>

#### Request Body

| Name                                            | Type   | Description          |
| ----------------------------------------------- | ------ | -------------------- |
| doc\_token<mark style="color:red;">\*</mark>    | string | Document token       |
| user\_token<mark style="color:red;">\*</mark>   | string | User token           |
| signer\_token<mark style="color:red;">\*</mark> | string | Signer token         |
| rejected\_reason                                | string | Reason for rejection |

Request example

```json
{
    "doc_token":"e082d806-6b31-4e27-ae9a-e16b603a70b3",
    "user_token":"97ab0000-36d4-xxxx-9ded-00005d690xxxx",
    "signer_token": "8be272d8-20a9-xx-899c-db4edbb846cd",
    "rejected_reason": ""
}
```

Response

{% tabs %}
{% tab title="200 - " %}

```json
{
    "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."
}
```

{% endtab %}

{% tab title="403" %}

```json
{
    "error": "Refusing this document is not allowed."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "error": "The signer's email and the user's email are different."
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zapsign.com.br/zapsign-api/english/signatarios/reject-documents-by-user.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
