title string
required
Give a name to your new group.
Code snippets
const url = new URL(
"https://api.sender.net/v2/groups"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let data = {
"title": "My Test Group"
};
fetch(url, {
method: "POST",
headers,body: JSON.stringify(data)
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$json = [
"title" => "My Test Group"
];
$response = $client->post(
'https://api.sender.net/v2/groups',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => $json
]
);
$body = $response->getBody()->getContents();
$data = json_decode($body, true);
import requests
import json
url = "https://api.sender.net/v2/groups"
headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
}
payload = {
"title": "My Test Group"
}
response = requests.request('POST', url, headers=headers,json=payload)
response.json()
curl -X POST \
"https://api.sender.net/v2/groups" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"My Test Group"}'
Response example
{
"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
}
}