Skip to content

Delete transactional campaigns

Delete one or more transactional campaigns. Provide an array of IDs like ?ids=[id1,id2] or use ?ids=all to delete all campaigns.

HTTP method: DELETE

https://api.sender.net/v2/transactional?ids=[id1, id2]


ParameterTypeDescription
idsarray requiredAn array of encoded campaign IDs. Use “ids”=all to delete all.
allbooleanSet to true if you want to delete all campaigns. When true, the ‘ids’ param is not required.

const url = new URL("https://api.sender.net/v2/transactional?ids=[id1, id2]");
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": "Deleted"
}