Get subscriber's events
Returns a list of actions that this subscriber has performed.
Endpoint
Section titled “Endpoint”HTTP method: GET
https://api.sender.net/v2/subscribers/{email}or{phone}or{ID}/events?actions=["got"]
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
Email, phone number, or ID | string required | Subscriber’s email address, phone number, or ID |
actions | array required | The value must be one of opened, bounced, clicked, unsubscribed or got. |
Request Examples
Section titled “Request Examples”const url = new URL("https://api.sender.net/v2/subscribers/{email}or{phone}or{ID}/events?actions=["got"]");
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/subscribers/{email}or{phone}or{ID}/events?actions=["got"]', [ '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/subscribers/{email}or{phone}or{ID}/events?actions=["got"]"
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/subscribers/{email}or{phone}or{ID}/events?actions=["got"]" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json"Response
Section titled “Response”{ "email": { "got": [ { "campaign_id": "bojJ7k", "subscriber_id": "o2lk68Y", "title": "Example email subject", "created_at": "2021-05-12 05:09:29" }, { "campaign_id": "bkrXzE", "subscriber_id": "o2lk68Y", "title": "Follow up campaign example subject", "created_at": "2021-05-11 10:46:15" }, { "campaign_id": "aKL9PM", "subscriber_id": "o2lk68Y", "title": "Example campaign subject", "created_at": "2021-05-11 09:02:38" }, { "campaign_id": "dwKrKJ", "subscriber_id": "o2lk68Y", "title": "test-campaign", "created_at": "2021-04-20 04:41:51" } ] }, "sms": [], "temail": { "sent": [] }, "sms_campaign": { "sent_count": 0, "clicked_count": 0, "delivered_count": 0, "failed_count": 0, "unsubscribed_at": null, "unsubscribed": 0 }, "email_campaign": { "sent_count": 4, "opened_count": 0, "clicked_count": 0, "unsubscribed": 0, "bounced": 0, "spam_reported": 0 }}