Skip to content

Create a group

Creates a new group.

HTTP method: POST

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


ParameterTypeDescription
titlestring requiredGive a name to your new group.

const url = new URL("https://api.sender.net/v2/groups");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let bodyContent = {
"title": "My Test Group"
};
fetch(url, {
method: "POST",
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": "Success",
"data": {
"id": "elxJK6",
"title": "My Test Group",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"phone_count": 0,
"active_phone_count": 0,
"account_id": "eEqqve",
"user_id": "egp79a",
"created": "2022-06-02 09:56:05",
"modified": null
}
}