Remove Contact from Segment

Remove a contact from a segment.

DELETE/contacts/{contact_id_or_email}/segments/{segment_id}

Requires a full_access API key.

Path Parameters

contact_id_or_emailstringrequired

The contact ID (UUID) or email address.

segment_idstringrequired

The segment ID (UUID).

Response Fields

objectstring

Always "contact_segment".

contact_idstring

The resolved contact ID.

segment_idstring

The segment ID.

deletedboolean

Always true.

curl -X DELETE 'https://api.postflare.app/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/segments/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
const response = await fetch(
  'https://api.postflare.app/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/segments/a1b2c3d4-e5f6-7890-abcd-ef1234567890',
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
    },
  }
);

const data = await response.json();

Response

Response
{
  "object": "contact_segment",
  "contact_id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
  "segment_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "deleted": true
}