Get performance by group of a campaign
Returns opens and clicks percentage of each group used for the campaign.
Endpoint
Section titled “Endpoint”HTTP method: GET
https://api.sender.net/v2/campaigns/{id}/groups
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id | string required | Campaign ID |
Request Examples
Section titled “Request Examples”const url = new URL("https://api.sender.net/v2/campaigns/{id}/groups");
let headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "GET", headers,}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));$client = new \GuzzleHttp\Client();$response = $client->get( 'https://api.sender.net/v2/campaigns/{id}/groups', [ '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/campaigns/{id}/groups"
headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",}
response = requests.request('GET', url, headers=headers)
print(response.json())curl -X GET \-G "https://api.sender.net/v2/campaigns/{id}/groups" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json"Response
Section titled “Response”[ { "tag_id": "b2vAR1", "opens": 5, "link_opens": 3, "tag_title": "My Renamed Group", "recipient_count": 6, "percentage": { "opens": 83.33, "link_opens": 50 } }, { "tag_id": "elxJK6", "opens": 5, "link_opens": 3, "tag_title": "My Test Group", "recipient_count": 8, "percentage": { "opens": 62.5, "link_opens": 37.5 } }]