Skip to content

Adding to the denylist

INFO

If you do not have a denylist enabled for your app, this request will fail. Please reach out if you'd like to configure a denylist.

Privy allows you to easily add an individual email address or an email domain to your denylist.

Adding an email address

To add an individual email address to the denylist, make a POST request to:

sh
https://auth.privy.io/api/v1/apps/<your-privy-app-id>/denylist

In the body of the request, include the following fields:

FieldTypeDescription
type'email'Specifies that the request adds an email address to the denylist.
valuestringThe email address to add to the denylist.

Below is a sample cURL command for adding an email to the denylist:

bash
curl --request POST 'https://auth.privy.io/api/v1/apps/<your-privy-app-id>/denylist' \
-u "<your-privy-app-id>:<your-privy-app-secret>" \
-H "privy-app-id: <your-privy-app-id>" \
-H "Content-Type: application/json" \
--data-raw '{
    "type": "email",
    "value": "[email protected]"
}'

A successful response will include the new denylist entry, like below

json
{
    "id": "denylist-entry-ID",
    "rule_type": "email",
    "value": "[email protected]",
},

Adding an email address

To add an email domain to your denylist, make a POST request to:

https://auth.privy.io/api/v1/apps/<your-privy-app-id>/denylist

In the body of the request, include the following fields

FieldTypeDescription
type'emailDomain'Specifies that the request adds an email domain to the denylist.
valuestringThe email domain to add to the denylist. Do not include the '@' symbol.

Below is a sample cURL command for adding an email domain to the denylist:

bash
curl --request POST 'https://auth.privy.io/api/v1/apps/<your-privy-app-id>/denylist' \
-u "<your-privy-app-id>:<your-privy-app-secret>" \
-H "privy-app-id: <your-privy-app-id>" \
-H "Content-Type: application/json" \
--data-raw '{
    "type": "emailDomain",
    "value": "email.com"
}'

A successful response will include the new denylist entry, like below

json
{
    "id": "denylist-entry-ID",
    "rule_type": "emailDomain",
    "value": "email.com",
},