# 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](https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-libraries/revoke-privacy-grants), 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](https://docs.quadrata.com/integration/how-to-integrate/request-privacy-data/api-requests/how-to-sign-api) 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***](https://docs.quadrata.com/integration/how-to-integrate/request-privacy-data/api-requests/how-to-sign-api) for message signing examples with more coverage and explanations.
{% endhint %}
