# Consents

## Withdraw email marketing consent

<mark style="color:green;">`POST`</mark> `https://app.openli.com/api/v1/consents/withdraw_all_email_marketing_consent`

Whenever a user unsubscribes from a newsletter you must use this endpoint to ensure that your audit trail is up-to-date and that the user's email marketing consent is withdrawn

#### Query Parameters

| Name  | Type   | Description           |
| ----- | ------ | --------------------- |
| email | string | The email of the user |

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| x-api-key | string | Your API key |

{% tabs %}
{% tab title="200 The request was successful, but no user found with the requested e-mail" %}

```
{ "message": "No e-mail marketing consent for specified user" }
```

{% endtab %}

{% tab title="204 The request was successful and the consent is withdrawn" %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openli.com/docs/documentation/legal-monster-api/consents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
