Skip to content

Delete subscriber

Deletes one or more subscribers.

HTTP method: DELETE

https://api.sender.net/v2/subscribers


ParameterTypeDescription
subscribersarray requiredArray of subscriber emails to be deleted.
conditionsstringWill be selecting all the subscribers at once. Won’t work when sending together [subscribers] parameter.

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

Example Response
{
"message": "Selected subscribers will be deleted shortly",
"delete_instance": "instance_reference_id"
}