Skip to main content

Overview

The Campaign Stats webhook returns detailed delivery and engagement metrics for a given campaign, broken out by channel (email and SMS).

Endpoint

POST https://partner.api.v3.pitchcrm.com/v3/partner/webhook/campaign/stats

Request Body

{
  "campaignId": 12345
}

Field Reference

FieldTypeRequiredDescription
campaignIdIntegerYesThe ID of the campaign to retrieve stats for

Success Response

Status: 200 OK
{
  "emailStat": {
    "Sent": 14658,
    "Opened": 2268,
    "Delivered": 14537,
    "Clicked": 53,
    "Hardbounce": 3,
    "Softbounce": 116,
    "Unsubscribe": 6,
    "Complained": 1,
    "Failed": 1
  },
  "smsStat": {
    "Sent": 123,
    "Delivered": 122,
    "Failed": 0
  }
}

Email Stat Fields

FieldDescription
SentTotal emails sent
DeliveredEmails successfully delivered
OpenedEmails opened by recipients
ClickedEmails where a link was clicked
HardbounceEmails that hard bounced (permanent delivery failure)
SoftbounceEmails that soft bounced (temporary delivery failure)
UnsubscribeRecipients who unsubscribed
ComplainedRecipients who marked the email as spam
FailedEmails that failed to send

SMS Stat Fields

FieldDescription
SentTotal SMS messages sent
DeliveredSMS messages successfully delivered
FailedSMS messages that failed to deliver

Error Responses

HTTP CodeError MessageDescription
400CampaignId is requiredcampaignId is missing from the request body
401Invalid API credentialsx-api-key or x-api-secret is incorrect
403Unauthorized account accessx-account-id mismatch
429Rate limit exceeded. Try again later.More than 100 requests per minute
500Internal server errorUnexpected server-side issue