# API Revoke Permissions

{% hint style="info" %}
This endpoint will revoke Privacy Permissions that an account has granted to your dApp.
{% endhint %}

{% hint style="danger" %}
You should use this API endpoint whenever your dApp no longer needs access to Privacy Data.
{% endhint %}

{% hint style="info" %}
NOTE: There is a service library available to you in the [Quadrata SDK](/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-libraries/revoke-privacy-grants.md), for this endpoint.
{% endhint %}

## API endpoint to revoke access to an account's Privacy Data

<mark style="color:red;">`DELETE`</mark> `https://int.quadrata.com/api/v1/privacy/grants/${account}`

#### Path Parameters

| Name                                      | Type   | Description           |
| ----------------------------------------- | ------ | --------------------- |
| account<mark style="color:red;">\*</mark> | String | User's wallet address |

#### Headers

| Name                                            | Type   | Description                                                                                                        |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | `Bearer ${accessToken}`                                                                                            |
| Date<mark style="color:red;">\*</mark>          | String | <p>Date and time of current request</p><p><em>Wed, 04 Oct 2023 02:39:37 GMT</em></p>                               |
| Signature<mark style="color:red;">\*</mark>     | String | [API Signed Request](/integration/how-to-integrate/request-privacy-data/api-requests/how-to-sign-api.md) Signature |

{% tabs %}
{% tab title="200: OK Revoke Granted Consent" %}

```json
{}
```

{% endtab %}

{% tab title="400: Bad Request Invalid Request Payload" %}

{% endtab %}

{% tab title="401: Unauthorized Invalid Signature or API\_KEY" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="NodeJS" %}

```javascript
const privateKeyDer = '...';
// You can find `getPrivateKeyFromDer` in "How to sign API"."Full Example" page
const privateKey = await getPrivateKeyFromDer(privateKeyDer);

const walletAddress = '...';

// You can find `makeRequest` in "How to sign API"."Full Example" page
await makeRequest({
    method: 'delete',
    privateKey: getPrivateKeyFromDer(privateKeyDer),
    path: `/api/v1/privacy/grants/${walletAddress}`
});
```

{% endtab %}

{% tab title="Python" %}

```python
"""
NOTE: you can find make_request in the full example located in the 
      API Signed Requests documentation page
"""

wallet_address = '...'

# You can find `make_request` in "How to sign API"."Full Example" page
make_request(
    method='delete',
    path=f'/api/v1/privacy/grants/{wallet_address}'
)
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
See [***How to sign API***](/integration/how-to-integrate/request-privacy-data/api-requests/how-to-sign-api.md) for message signing examples with more coverage and explanations.
{% endhint %}


---

# 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.quadrata.com/integration/how-to-integrate/request-privacy-data/api-requests/api-revoke-permissions.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.
