Delete an audience segment
DELETE /audiences/{audienceUuid}/list_segments/{uuid}
Deprecated
/audiences/{audienceUuid}/list_segments/{uuid}Deprecated: old segment that lives inside one audience; Customer App does not show it and no new work should use it. Permanently deletes the segment definition. The members it selected are not affected. Campaigns that were aimed at it lose their segment.
When to use: Only when the user explicitly wants the saved filter to disappear.
When not to use: To delete a contact segment, use delete_contact_segment. To delete the people it selects, use async_task_segment_delete_contacts. To unsubscribe them, use async_task_segment_unsubscribe.
Side effects: Email and SMS campaigns that targeted this segment keep their "send to a segment" setting but lose the segment (it is set to empty). Nothing stops the deletion if a campaign is scheduled: when it is sent, it fails with Campaign can not be sent: No active suscribers found and the campaign goes to error status, until you choose another segment or group. No webhook fires.
Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the audience the segment belongs to. Get it from list_audiences.
UUID of the segment. Get it from list_audience_segments.
Response Body
application/problem+json
application/problem+json
application/problem+json
curl -X DELETE "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/list_segments/b2d1c9a4-6e7f-4a35-8d10-5c9e3f7a1b62" \ -H "X-Auth-Token: YOUR_API_KEY"