# Delete a group
# HTTP method: DELETE
https://api.sender.net/v2/groups/{id}
Deletes the specified group.
id string
required
Group ID
delete_subscribers boolean
Subscribers soft delete with group. By default, it is false
Code snippets
const url = new URL(
"https://api.sender.net/v2/groups/{id}"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/groups/{id}',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody()->getContents();
$data = json_decode($body, true);
import requests
import json
url = "https://api.sender.net/v2/groups/{id}"
headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
}
response = requests.request('DELETE', url, headers=headers)
response.json()
curl -X DELETE \
"https://api.sender.net/v2/groups/{id}" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Response example
{
"success": true,
"message": "Group deleted"
}