Delete a segment
DELETE/v1/segments/{id}
Refused while a scheduled, sending or paused broadcast uses it. Finished broadcasts keep their history without the segment.
Required scope: contacts:manage
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | The segment id. |
Example
curl -X DELETE 'https://api.sendsend.email/v1/segments/ID' \
-H "Authorization: Bearer $SENDSEND_API_KEY"Response 200
{
"object": "segment",
"id": "xxx_…",
"deleted": true
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such resource in this project. |
| 409 | validation_error | A broadcast is still using it. |
| 401 | unauthorized | The API key is missing, invalid or revoked. |
| 403 | forbidden | The key does not have the scope this endpoint needs. |
Every error has the same shape. See Errors.