Welcome to Encatch Docs
Admin API ReferenceSegments

Delete Segment

Queue deletion of a manual segment with DELETE /v2/admin/segments/{segmentId}.

Deletes a manual segment asynchronously. Memberships are removed later by the batch job.

Deletion is refused while an active form or another segment still references the segment (same guard as the admin panel). Authenticate with an admin API key. Admin API rate limits apply separately from SDK limits.

DELETEhttps://api.encatch.com/engage-product/encatch/api/v2/admin/segments/%7BsegmentId%7D

Authentication

X-Api-KeystringRequired

Admin (secret) API key

Publishable SDK keys receive 403 (publishable API keys cannot call /v2/admin routes).

Server-side only

Keep admin API keys on your server. Never ship them in client code.

Path parameters

segmentIdstringRequired

Segment UUID to delete.

No request body.

Examples

cURL
curl -X DELETE 'https://api.encatch.com/engage-product/encatch/api/v2/admin/segments/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_ADMIN_API_KEY'

Success response

202JSONResponse
{ "requestId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8" }
requestIdstringRequired

Correlation id for the delete operation.

Errors

These are specific to Delete Segment. Shared errors include invalid or missing API key (401), publishable key on admin routes (403), rate limits (429), and sanitized 500 responses.

409Error
{
  "status": 409,
  "error": "Conflict",
  "message": "Cannot delete segment: it is currently being used by 2 active consumer(s). Remove the segment from those places first."
}
StatusWhen
404Segment not found or deleted (Segment not found)
409Not a manual segment, or segment in use by active form(s) or segment(s)

Was this page helpful?