> 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/espanol/firmantes/rechazar-documentos-por-el-firmante.md).

# Rechazar documentos por el firmante

Este endpoint permite rechazar un documento individual o un sobre (conjunto de documentos en lote) por el firmante.

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

\
**Cómo Usar:**\
Envíe un payload en formato JSON con los siguientes campos:

* **doc\_token:** (string) Token del documento a ser rechazado.
* **user\_token:** (string) Token del usuario que está rechazando el documento.
* **signer\_token:** (string) Token del firmante relacionado con el documento.
* **rejected\_reason:** (string, opcional) Motivo del rechazo del documento.

Conoce más sobre los [tipos de tokens aqui](/zapsign-api/espanol/tipos-de-tokens.md)

**Condiciones**

* El documento debe tener el estado “En curso”.
* Al crear el documento, el parametro `allow_refuse_signature` debe estar como true.
* El correo del firmante y el usuario debe ser el mismo.&#x20;

**Observaciones:**

* El sistema aplicará automáticamente la marca de agua predeterminada: **"Documento rechazado"**.
* La respuesta del endpoint también será devuelta en formato JSON.

**Headers**

<table><thead><tr><th width="161">Nombre</th><th width="117">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>Token de API precedido del texto "Bearer".<br>Ejemplo: <code>Bearer c7f35c84-7893-4087-b4fb-d1f06c23</code>.</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="160">Nombre</th><th width="111">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td>doc_token<mark style="color:red;">*</mark></td><td>string</td><td>Token del documento</td></tr><tr><td>user_token<mark style="color:red;">*</mark></td><td>string</td><td>Token del usuario</td></tr><tr><td>signer_token<mark style="color:red;">*</mark></td><td>string</td><td>Token del firmante</td></tr><tr><td>rejected_reason</td><td>string</td><td>Motivo del rechazo</td></tr></tbody></table>

**Ejemplo request**

```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 - exitoso" %}

```json
{
    "message": "Documento rechazado con éxito. Recuerde: este endpoint es asíncrono, por lo tanto, espere a que los PDF finales estén listos a través de webhooks o verifíquelos en unos minutos."
}
```

{% endtab %}

{% tab title="403" %}

```json
{
    "error": "El rechazo de éste documento no esta permitido."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "error": "El correo del firmante y el usuario son diferentes"
}
```

{% 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/espanol/firmantes/rechazar-documentos-por-el-firmante.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.
