Delete users
Use this endpoint to delete any user profile by specifying a known user identifier.
Up to 50 external_ids
, user_aliases
, or braze_ids
can be included in a single request. Only one of external_ids
, user_aliases
, or braze_ids
can be included in a single request.
Deleting user profiles cannot be undone. It will permanently remove users which may cause discrepancies in your data. Learn more about what happens when you delete a user profile via API in our Help documentation.
To use this endpoint, you’ll need to generate an API key with the users.delete
permission.
Rate limit
For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the /users/alias/new
, /users/identify
, and /users/merge
endpoints, as documented in API rate limits.
Request body
1
2
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
1
2
3
4
5
{
"external_ids" : (optional, array of string) External ids for the users to delete,
"user_aliases" : (optional, array of user alias objects) User aliases for the users to delete,
"braze_ids" : (optional, array of string) Braze user identifiers for the users to delete
}
Request parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
external_ids |
Optional | Array of strings | External identifiers for the users to delete. |
user_aliases |
Optional | Array of user alias object | User aliases for the users to delete. |
braze_ids |
Optional | Array of strings | Braze user identifiers for the users to delete. |
Example request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl --location --request POST 'https://rest.iad-01.braze.com/users/delete' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-REST-API-KEY' \
--data-raw '{
"external_ids": ["external_identifier1", "external_identifier2"],
"braze_ids": ["braze_identifier1", "braze_identifier2"],
"user_aliases": [
{
"alias_name": "user_alias1", "alias_label": "alias_label1"
},
{
"alias_name": "user_alias2", "alias_label": "alias_label2"
}
]
}'
Response
1
2
3
4
5
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"deleted" : (required, integer) number of user ids queued for deletion
}