Back

Constant Contact API Essential Guide

Aug 11, 20246 minute read

What type of API does Constant Contact provide?

Constant Contact has a RESTful API. Key characteristics of the API:

  • Uses a REST-based resource structure
  • Supports JSON for all payloads
  • Only accepts JSON-formatted request payloads
  • All API responses are in JSON format
  • Requires SSL with TLS v1.2 or better for all API calls

The API is referred to as the "Constant Contact V3 API" and is designed for developers and engineers comfortable with RESTful APIs. The API has a 99.9% uptime guarantee.

Does the Constant Contact API have webhooks?

Yes, the official Constant Contact API does have webhooks. The key points about Constant Contact's webhook functionality are:

  1. Webhooks are available for partners to receive push notifications from Constant Contact when certain events occur.

  2. The types of events you can subscribe to include:

    • Billing Tier Upgrade (event_type: tier.increase)
    • Billing Tier Downgrade (event_type: tier.decrease)
    • Account Cancelled (event_type: account.cancel)
    • Account Disabled (event_type: account.disable)
  3. These webhooks are specifically for partner integrations and focus on billing and account status changes.

  4. To use webhooks, you need to have an SSL certificate (self-signed is acceptable but not preferred) and provide a callback URL configured to handle POST requests over HTTPS.

  5. When an event occurs, Constant Contact sends an HTTP POST request to your specified URL with a payload containing the URL from which you can retrieve event details, the API key, and the event type.

  6. Constant Contact uses a retry policy for failed webhook notifications, attempting to resend every minute for up to an hour.

  7. The webhooks are part of the v3 API and require the use of SSL with TLS v1.2 and AES encryption or better for all API calls.

It's important to note that these webhooks are primarily focused on partner-related events such as billing changes and account status updates. They don't appear to cover more granular events like individual email campaign activities or contact list changes.

Rate Limits and other limitations

Here are the key points about the API Rate Limits for the Constant Contact API:

  1. Daily limit:

    • Standard API key access has a limit of 10,000 calls per day [1][3]
    • Technology Partners get an increased limit of 250,000 calls per day [3]
  2. Per-second limit:

    • Standard API key access has a limit of 4 calls per second [1][3]
    • Technology Partners get an increased limit of 10 calls per second [3]
  3. Error responses:

    • Exceeding the daily quota returns a 429 error with "error_key": "quota_exceeded" [1]
    • Exceeding the per-second rate returns a 429 error with "error_key": "throttled" [1]
  4. Additional details:

    • The daily limit resets each day at UTC 00:00:00 [1]
    • There are also rate limits on specific endpoints to prevent abuse [1]
    • All active account types, including trial accounts, have free access to the API [3]
  5. Increasing limits:

    • To get higher limits, you can apply to become a Technology Partner, which is free but requires approval [3]
  6. Best practices:

    • Monitor your API usage to stay within limits
    • Implement proper error handling for 429 responses
    • Consider becoming a Technology Partner if you need higher limits

In summary, Constant Contact provides reasonable rate limits for standard API users, with options to increase those limits for approved partners. It's important to design your integration to work within these limits and handle rate limit errors gracefully.

Latest API Version

The most recent version of the Constant Contact API is V3 (Version 3). Here are the key points about the Constant Contact V3 API:

Key Points

  • It is a RESTful API that uses JSON for all payloads [4].
  • It requires SSL with TLS v1.2 or better for all API calls [4].
  • It has a 99.9% uptime guarantee [4].
  • It supports JSON schema validation and enhanced error messages in JSON format [4].
  • The API documentation and reference are available on the Constant Contact Developer Portal [1][2].

Features and Updates

  • The V3 API includes endpoints for managing contacts, email campaigns, segments, tags, and more [2].
  • Recent updates have added support for:
    • Email campaign scheduling
    • Importing custom field data
    • Creating and managing segments based on contact details and list memberships
    • Adding notes to contacts
    • New custom code email types [2]
  • Technology partner features have been added, allowing partners to create and manage client accounts [2].
  • User privileges are now required for accessing certain endpoints [2].

Best Practices

  • Use the latest V3 endpoints and features as they become available.
  • Refer to the release notes for the most up-to-date information on new features and changes [2][5].
  • Ensure your integration uses SSL with TLS v1.2 or better [4].
  • Format all requests and expect all responses in JSON [4].

The Constant Contact V3 API is actively maintained and regularly updated with new features and improvements. Developers should check the official documentation and release notes for the most current information on available endpoints and functionality.

How to get a Constant Contact developer account and API Keys?

To get a developer account for Constant Contact and create an API integration, follow these steps:

1. Sign up for a developer account

  1. Go to the Constant Contact V3 API Developer Portal.
  2. Click on "Sign Up" to create a new developer account.
  3. Provide the required information:
    • Email
    • Password
    • First Name
    • Last Name
    • Organization Name
    • Phone Number

2. Register your application

  1. Log in to the V3 Developer Portal using your new developer account.
  2. Click on the "My Applications" tab, then click "New Application".
  3. In the "New Application" dialog box:
    • Enter a name for your application (this will be displayed to users when they are prompted to grant access).
    • Choose the OAuth2 setting your application will use to authenticate.
    • Select the refresh token method (Rotating Refresh tokens are recommended for most applications).

3. Configure your application

  1. After creating your application, you'll be taken to the application details page.
  2. Note down the API Key (client_id) displayed on this page.
  3. If required, click "Generate Client Secret" to get a client secret. Make sure to copy and store it securely, as it will only be displayed once.

4. Set up OAuth2 flow

  1. Modify your application's code to implement the OAuth2 flow you specified during registration.
  2. Implement the necessary steps for user authorization and token management based on the chosen OAuth2 flow.

5. Make your first API call

  1. Use the API Reference in the developer portal to explore available endpoints and make test calls.
  2. Authenticate your application using the API Key and client secret (if applicable).
  3. Start making API calls to interact with Constant Contact data.

What can you do with the Constant Contact API?

Based on the search results, here are the key data models you can interact with using the Constant Contact API, along with what is possible for each:

Contacts

  • Retrieve contact information
  • Create new contacts
  • Update existing contacts
  • Delete contacts
  • Manage custom fields for contacts
  • Manage list memberships for contacts

Contact Lists

  • Retrieve contact lists
  • Create new contact lists
  • Update existing contact lists
  • Delete contact lists
  • Manage contacts within lists

Custom Fields

  • Retrieve custom field definitions
  • Create new custom fields
  • Update existing custom fields
  • Delete custom fields

Campaigns/Emails

  • Retrieve campaign/email information
  • Create new campaigns/emails
  • Update existing campaigns/emails
  • Delete campaigns/emails
  • Schedule campaigns for sending

Activities

  • Retrieve activity data (e.g. email opens, clicks)
  • Create new activity records

Accounts

  • Retrieve account information
  • Create new accounts (for partners)
  • Update account details
  • Cancel accounts

User Privileges

  • Retrieve user privilege information

Events (Limited)

  • Retrieve event information
  • Create/update events (limited functionality)

Key points:

  • The API uses a RESTful structure with JSON payloads
  • Supports standard HTTP methods like GET, POST, PUT, DELETE
  • Requires OAuth 2.0 authentication
  • Allows partial responses for contacts to limit data transfer
  • Provides relationship information between different data models

The API allows for comprehensive management of core Constant Contact data like contacts, lists, campaigns, and account information. However, some functionality may be limited compared to the web interface.