Our v3 API is now available! Learn more by visiting the v3 developer portal. Creating new v2 API keys is no longer supported.

Testing Your Webhook Subscription

Use this endpoint to test and validate your subscription to a partner webhook topic.

NOTE: This partner-only endpoint uses basic authentication as documented on this page.

Methods:

Click a method to view its documentation

POST

DescriptionTOP

Create a Constant Contact Toolkit account using this endpoint. You must provide the following information when creating an account:

  • username
  • password (except if using Single Sign On)
  • organization name
  • first and last name of the account owner
  • email address
  • phone number for the account owner (displays in the CTCT Console under your account settings as personal information)
  • If country is US or CA, 2 letter state or province code (not required for non-US/CA countries)
  • two letter country code

NOTE: You must be set up for either single- or partner-billing in order to create Toolkit accounts.

Using single-billing?

In order to set up a new account for single-billing, you must set both managed_site_owner and single_billing to true in the request payload.

Using single sign on?

If you are using Single Sign On (SSO), do not provide a password when creating user accounts. Instead, supply the following parameter-value pairs in the POST request payload:

  • idp_provider - unique identified for the partner, provided by Constant Contact when approved for SSO
  • idp_provider_id - The unique identifier for the Toolkit account owner

Autogenerate OAuth 2.0 access token

You have the option of generating an OAuth 2.0 access token for each account during the account creation process. Generating an access token when you create each account eliminates the need for new users to go through the OAuth grant access flow when they first login to your Constant Contact integration.

Set the oauth2_token_provided query parameter to true to generate an OAuth 2.0 access token for the account during provisioning. The oauth2_token is returned in the response.

GDPR Settings

When creating accounts for users who have opted-out of any marketing communications, you can pass along that preference to us so that Constant Contact will not send any marketing communications to this account. Use the gdpr_opt_out property, set to true in the request payload.

DescriptionTOP

Make a POST API call to this endpoint to trigger a webhook to be sent to your previously configured callback URL.  Note that unlike many other POST calls, there is no payload required for this call.

Example data will be sent to your callback URL if it has been set up. The response for this test call will echo that from your callback URL. If a subscription hasn't been set up, you'll receive an error when calling this endpoint.

DescriptionTOP

Use this endpoint to subscribe to an Automated Notification Service topic. 

POST: https://api.constantcontact.com/v2/webhooks/partner/topics/{topicId}/test

Response CodesTOP

code

description

200

Request was successful

400

Not subscribed to topic or topicId doesn't exist

401

Authentication failure

404

The specified topicId doesn't exist or the request URI is wrong

500

Internal server error occurred

Response StructureTOP

property

type(max length)

description

Example ResponseTOP

{ 
  "callbackUrl": "https://my.host.com/webhooks", 
  "callbackResponseCode": 200, 
  "callbackResponseBody": "The message body your server replied with" 
}