Get campaign analytics
curl --request GET \ --url https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/analytics \ --header 'x-api-key: <x-api-key>'import requests
url = "https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/analytics"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/analytics';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'GET', url: 'https://api.sipstack.com/api/v2/flare/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/analytics', headers: {'x-api-key': '<x-api-key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Returns a real-time delivery rollup for the campaign (counts, rates, opt-outs, and a link-click rollup when link tracking is on). Requires sms:read.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”The analytics rollup.
object
Real-time delivery rollup for a campaign. Rate fields are percentage strings with two decimals.
object
Alias of sent — sent but awaiting delivery confirmation.
Alias of undelivered.
Delivered ÷ attempted (#6435): attempted = delivered + failed + undelivered + sent/sending; queued and cancelled excluded.
(failed + undelivered) ÷ attempted.
Delivered + failed + undelivered + sent/sending — the rate denominator.
Sent within the last 72 hours, no delivery receipt yet.
Sent more than 72 hours ago; the carrier never confirmed delivery. Still counted as attempted.
True while awaiting is above 0 — the rate can still change.
Click rollup — a zero-valued shape when link tracking is off.
object
object
Example
{ "data": { "deliveryRate": "98.20", "failureRate": "1.80", "responseRate": "4.10", "optOutRate": "0.30", "progress": "100.00" }}Missing or invalid API key.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}Campaign not found in your organization.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}