Clear the audience
SDK platic.campaigns.audience.clear()
Clear the campaign audience by removing its internal tag from all associated contacts. The contacts remain in the workspace.
Example
curl -X DELETE https://api.platic.ai/v1/campaigns/$CAMPAIGN_ID/audience \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.campaigns.audience.clear("campaign_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
campaignId | string | Unique identifier of the campaign | required |
Response 200 OK
{
"status": "success",
"message": "All clients removed from campaign successfully",
"data": {
"success": true,
"message": "All clients removed from campaign audience successfully",
"removedCount": 245
}
} Notes
- If the audience is already empty, the operation answers
200withremovedCount: 0.