Skip to content

Remove subscriber from a group

Removes one or more subscribers from a group.

HTTP method: DELETE

https://api.sender.net/v2/subscribers/groups/{groupId}


ParameterTypeDescription
groupIdstring requiredProvide the group id
subscribersarray requiredArray of email addresses that would be removed from this group.
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/groups/{groupId}");
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
{
"success": true,
"message": "Removed tag"
}