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.
Endpoint
Section titled “Endpoint”HTTP method: DELETE
https://api.sender.net/v2/transactional?ids=[id1, id2]
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ids | array required | An array of encoded campaign IDs. Use “ids”=all to delete all. |
all | boolean | Set to true if you want to delete all campaigns. When true, the ‘ids’ param is not required. |
Request Examples
Section titled “Request Examples”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));$client = new \GuzzleHttp\Client();$response = $client->delete( 'https://api.sender.net/v2/transactional?ids=[id1, id2]', [ 'headers' => [ 'Authorization' => 'Bearer [your-token]', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]);
$body = $response->getBody()->getContents();$data = json_decode($body, true);print_r($data);import requestsimport json
url = "https://api.sender.net/v2/transactional?ids=[id1, id2]"
headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",}
response = requests.request('DELETE', url, headers=headers)
print(response.json())curl -X DELETE \"https://api.sender.net/v2/transactional?ids=[id1, id2]" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json"Response
Section titled “Response”{ "success": true, "message": "Deleted"}