Partner Webhooks

Webhooks allow partners to receive push notifications from Constant Contact when certain events occur. This eliminates the need for partner integrations to poll API endpoints for changes. We continue to add webhook topics.

A webhook is an HTTP POST callback request sent to a URL of your choice when an event occurs.  When we have a notification to send, we do a simple POST to the URL you provided. The POST payload provides the URL from which the details of the event can be retrieved.

Available Webhook Topics

Below are the currently available topics and example webhook response bodies that are sent to the URL you specify in your webhook subscription.

ID   Name Description Event Type Retry Priority
1 Billing Tier Upgrade Executes when an account's billing tier is increased tier.increase Critical
 {
   "url":"https://api.constantcontact.com/v2/partner/accounts/{account_id}/plan",
   "event_type":"tier.increase"
 }
2 Billing Tier Downgrade Executes when an account's billing tier is downgraded tier.decrease Critical
 {
   "url":"https://api.constantcontact.com/v2/partner/accounts/{account_id}/plan",
   "event_type":"tier.decrease"
 }
3 Account Cancelled Executes when an account is cancelled account.cancel Critical
 {
   "url":"https://api.constantcontact.com/v2/partner/accounts/{account_id}/plan",
   "event_type":"account.cancel"
 }
4 Account Disabled Executes when an account is disabled (usually due to a request for temporary suspension, compliance or payment issues) account.disable Critical
 {
   "url":"https://api.constantcontact.com/v2/partner/accounts/{account_id}/plan",
   "event_type":"account.disable"
 }

Configuring your network

Typical integrations with the Constant Contact APIs involve bidirectional HTTP communication via REST, where a network makes an outbound request and then receives a response from us. Network configuration usually isn't needed in that case. However, the Webhooks feature sends unsolicited inbound HTTP notifications to urls of your choosing. Therefore, network configuration changes may be needed (e.g. firewall rule changes) to receive these unsolicited inbound requests.

To configure webhooks, you will need:

  1. An SSL certificate (self-signed is acceptable but not preferred) so we can POST to your server over SSL
  2. A callback URL of your choice configured to handle the POST method

Authentication and security

All partner webhook endpoints use basic authentication protocol which requires the partner username and password in the Authorization header of the request, as opposed to OAuth2.0 used by individual v2 API endpoints.

Each webhook includes a special HTTP header named x-ctct-hmac-sha256 which is generated using the secret associated with the API key used by your application, along with the data sent in the request. Learn more here.

How to subscribe to topics

Make a GET request to the webhooks collection to determine the topics to which you want to subscribe for notifications. Then, issue a PUT request for each individual topic you want to subscribe to.