curl --request GET \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"stats": {
"totalSent": 412,
"totalOpened": 198,
"totalClicked": 37,
"totalReplied": 22,
"sentDeltaOverLastMonth": 12.5,
"openedDeltaOverLastMonth": 8.1,
"clickedDeltaOverLastMonth": -3.4,
"repliedDeltaOverLastMonth": 4.2
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}A campaign's headline metrics (with deltas vs `since`)
Returns the campaign’s headline email metrics. The total* counters accumulate from since (default: 12 months ago). The *DeltaOverLastMonth values are percentage changes that ignore since and always compare the current UTC calendar month with the previous one, so they read 0 on a campaign younger than a month. Only the token owner’s own campaigns resolve: a campaign delegated to you, one shared by your team’s visibility settings, and a deleted one all answer 404. Rate limit: 30 requests/minute and 1,000/day per token owner, shared by every campaign, scheduled-send, campaign-template and knowledge-hub endpoint.
Errors:
404CAMPAIGN_NOT_FOUND— No campaign with this id exists, it belongs to another account (including a campaign delegated to you or shared by your team’s visibility settings), or it has been deleted.422VALIDATION_FAILED—sinceis not an ISO 8601 date-time, or campaignId is not a 24-character hex id.429RATE_LIMITED— More than 30 campaign requests in a minute, or 1,000 in a day, for this token owner (the bucket is shared by every /business/campaigns, /business/scheduled-sends, /business/campaign-templates and /business/knowledge-hubs call).500UNEXPECTED_ERROR— An unhandled failure; the detail stays in our logs and is never returned.
Requires one of the following token scopes: campaigns.
curl --request GET \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"stats": {
"totalSent": 412,
"totalOpened": 198,
"totalClicked": 37,
"totalReplied": 22,
"sentDeltaOverLastMonth": 12.5,
"openedDeltaOverLastMonth": 8.1,
"clickedDeltaOverLastMonth": -3.4,
"repliedDeltaOverLastMonth": 4.2
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Authorizations
Your API token (af_…) as the Basic-auth username, with an empty password.
Path Parameters
The campaign's id (24-character hex ObjectId), as returned by POST /business/campaigns or as the campaignId of a GET /business/campaigns row.
Query Parameters
ISO 8601 date-time from which the total* counters are accumulated (default: 12 months ago). The *DeltaOverLastMonth percentages ignore it and always compare the current UTC calendar month with the previous one.
Response
Success
Show child attributes
Show child attributes