Delete Segment
Delete a segment by ID. Contacts that belong to this segment will not be deleted.
DELETE
/segments/{segment_id}Requires a full_access API key.
Path Parameters
segment_idstringrequiredThe ID of the segment to delete.
Response Fields
objectstringAlways "segment".
idstringThe segment ID.
deletedbooleanAlways true.
curl -X DELETE 'https://api.postflare.app/segments/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
-H 'Authorization: Bearer re_xxxxxxxxx'const response = await fetch(
'https://api.postflare.app/segments/a1b2c3d4-e5f6-7890-abcd-ef1234567890',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer re_xxxxxxxxx',
},
}
);
const data = await response.json();Response
{
"object": "segment",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"deleted": true
}