Skip to documentation

API · Contacts

Delete Contact Segment

Remove a contact from a segment (requires full access). The response includes the contact ID and the segment ID as audienceId.

DELETE/contacts/{id}/segments/{segment}Full access

Request parameters

ParameterTypeDescription
id
path · required
stringContact id or URL-encoded email (case-insensitive).
segment
path · required
stringOpaque resource id.

Request example

Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.

bash
curl -X DELETE "$OPENSEND_BASE_URL/contacts/YOUR_id/segments/YOUR_segment" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"

Response

200 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "contact_segment",
  "id": "YOUR_ID",
  "audienceId": "example",
  "deleted": true
}

Behavior and errors

The response is { "object": "contact_segment", "id", "audienceId", "deleted": true }: id is the contact ID and audienceId (Resend’s legacy camelCase field) is the segment ID. Removing membership preserves the contact itself. The contact can be given as an ID or a URL-encoded email address.

Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.