Skip to content

Delete a segment

Deletes a segment with the specified ID

HTTP method: DELETE

https://api.sender.net/v2/segments/{id}


ParameterTypeDescription
idstring requiredSegment ID

const url = new URL("https://api.sender.net/v2/segments/{id}");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Example Response
{
"success": true,
"message": "Filter deleted"
}