InTouch Hub · Blue Isle Software

Constant Contact

Create and send email campaigns and manage contact lists via the Constant Contact v3 API.

emailmarketingcontactscampaigns

Constant Contact

Create and send email campaigns and manage contacts and contact lists through the Constant Contact v3 API (https://api.cc.email/v3).

This is a self-contained InTouch tool (credentialBased: false) — pass a Constant Contact OAuth2 access token as the apiKey input. Authentication uses the standard Authorization: Bearer <token> header. Implemented with the Python standard library only (no third-party packages).

Important: The Constant Contact v3 API does not accept a bare API/client key on its own. Every call must carry an OAuth2 access token obtained through one of Constant Contact's OAuth2 flows (Authorization Code, PKCE, Device, or Implicit). Pass that access token as apiKey.

Operations

operation Constant Contact endpoint What it does
get-lists GET /v3/contact_lists List all contact lists (with counts).
get-contacts GET /v3/contacts List contacts; optionally filter by email.
create-contact POST /v3/contacts Create a single contact and add it to one or more lists.
get-campaigns GET /v3/emails List email campaigns.
create-campaign POST /v3/emails Create a custom-code (HTML) email campaign in DRAFT status.

Inputs

input Used by Description
apiKey (required) all Constant Contact OAuth2 access token.
operation (required) all One of the operations above.
limit get-lists / get-contacts / get-campaigns Optional max number of results.
email get-contacts / create-contact Filter by email (get) or the contact's email (create).
firstName create-contact Contact first name.
lastName create-contact Contact last name.
listIds create-contact Comma-separated contact list IDs to add the contact to.
name create-campaign Unique campaign name.
subject create-campaign Email subject line.
fromEmail create-campaign Confirmed sender "from" email address.
fromName create-campaign Sender display name.
replyTo create-campaign Reply-to address (defaults to fromEmail).
htmlBody create-campaign Full HTML email body (custom-code, format type 5).

Outputs

The tool never throws on a 4xx/5xx HTTP response — it returns the status and Constant Contact's error JSON in result so a job can branch on it. Only a transport-level failure (DNS/timeout/refused) fails the step.

Getting an access token (apiKey)

  1. Sign in to the Constant Contact Developer Portal and create an application to get a client ID and client secret.
  2. Run an OAuth2 flow (Authorization Code or PKCE recommended) to obtain an access token. See the authentication guide.
  3. Pass that access token as the apiKey input. Access tokens expire (typically after 24 hours) and must be refreshed with your refresh token.

You also need at least one confirmed sender email address in your account to use as fromEmail when creating a campaign.

Examples

List your contact lists

apiKey:    <oauth2-access-token>
operation: get-lists
limit:     50

status: 200, result: {"lists": [{"list_id": "...", "name": "Newsletter", ...}]}

Create a contact and add it to a list

apiKey:    <oauth2-access-token>
operation: create-contact
email:     [email protected]
firstName: Alex
lastName:  Bloggs
listIds:   8f9d2a1b-1111-2222-3333-444455556666

status: 201, result: {"contact_id": "...", "email_address": {...}, ...}

Create a draft email campaign

apiKey:    <oauth2-access-token>
operation: create-campaign
name:      June Newsletter
subject:   What's new this month
fromEmail: [email protected]
fromName:  Your Company
htmlBody:  <html><body><h1>Hello!</h1><p>Our June update...</p></body></html>

status: 201, result: {"campaign_id": "...", "current_status": "DRAFT", ...}