Delete Segment
Delete a segment by its ID. This asynchronously removes all segment member records.
Endpoint
DELETE https://api.campaignlark.com/v1/segments/:id
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | The segment ID. |
Sample Request
DELETE https://api.campaignlark.com/v1/segments/1
Response
Success — 200 OK
{
"data": "The segment has been deleted successfully."
}
Errors
| Status | Message | Cause |
|---|---|---|
400 | Please provide a valid segment ID. | id path parameter is missing or invalid. |
400 | We could not find the segment you are trying to delete. | Segment does not exist in this workspace. |
400 | Cannot delete segment while it is being calculated. Please try again later. | Segment is currently being recalculated. |