curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/delete-audience \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"campaign_id": 123,
"audience": [
123
],
"delete_all": true
}
'{
"message": "<string>"
}Permanently delete audience records from a campaign. This action is irreversible.
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/delete-audience \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"campaign_id": 123,
"audience": [
123
],
"delete_all": true
}
'{
"message": "<string>"
}/delete-audience
Content-Type: application/json
Authentication: Required (workspace auth)
{
"campaign_id": 42,
"audience": [101, 102, 103]
}
{
"campaign_id": 42,
"delete_all": true
}
| Field | Type | Required | Description |
|---|---|---|---|
campaign_id | number | Yes | Campaign identifier |
audience | array | No | Array of audience record IDs to delete. Required when delete_all is not true. |
delete_all | boolean | No | Set to true to delete all audience for this campaign. Only allowed when campaign is in draft status. |
{
"message": "Audience deleted successfully"
}
delete_all:
{
"message": "All audience deleted successfully"
}
delete_all is true, all audience for the campaign are deleted. This is only allowed when the campaign is in draft status.delete_all is not set, audience array is required.| Error | Cause |
|---|---|
Campaign not exist | Invalid campaign_id |
Audience array is required | audience is empty or not provided (when delete_all is not set) |
All audience can only be deleted when the campaign is in draft status | delete_all is true but campaign is not in draft status |
curl -X POST https://www.tryunleashx.com/api/v1/global/delete-audience \
-H "Content-Type: application/json" \
-H "token: <api_key>" \
-d '{
"campaign_id": 42,
"delete_all": true
}'
API token for authentication
Audience deleted successfully
Was this page helpful?