Create a Toolkit Account

Use this endpoint to create (POST) a Constant Contact Toolkit account. Newly created accounts are free trials which give the user up to 60 days to try Constant Contact before buying. Trial accounts have limits depending on the services that are included. See more on trial account limitations here.

Please note that this endpoint uses basic authentication, and requires the partners username and password be included in each call.

Important All test accounts used in validating your account creation integration must use "@nullmailer.com" as the domain.

NOTE: This endpoint is available only to approved Constant Contact Technology Platform partners selling Toolkit accounts. Learn more here. It also 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
  • If country is US or CA, 2 letter state or province code (not required for non-US/CA countries)
  • 2 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

Autogenerated 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 an 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 oauth2_token_provided=true to generate an OAuth 2.0 access token for the account during provisioning. The oauth2_token is return in the response.

POST: https://api.constantcontact.com/v2/partner/accounts

name

type

default

description

api_key

query

REQUIRED; The API key for the application; key must have Partner level API access

oauth2_token_provided

query

false

Boolean, An OAuth 2.0 access token is generated for the user account if set to true, and returned in the response

Example JSON Request BodyTOP

{
    "username": "account_username",
    "organization_name": "My organization",
    "first_name": "Robert",
    "last_name": "Jones",
    "email": "rjones@example.com",
    "phone": "555-555-5555",
    "state_code": "MA",
    "password": "password",
    "country_code": "US",
    "billing_locale":"en_US",
    "website": "http://your.company.website",
    "single_billing": true,
    "managed_site_owner": true,
    "partner_account_id":"partner1234"
 }

Response CodesTOP

code

description

201

Request was successful - the account was created

400

Bad Request: either JSON was malformed or there was a data validation error

401

Authentication failure

405

Unsupported method, only POST is supported

406

Unsupported accept header value, must be application/json

409

Username must be unique; username specified is already in use

415

Unsupported content-type in the header, use application/json

500

Internal server error occurred

StructureTOP

property

type(max length)

description

billing_locale

string

Specifies the currency in which the account is billed; valid values are:

  • en_US - US Dollars (default)
  • en_GB - British Pounds

country_code

string (2)

REQUIRED. Standard 2 letter ISO 3166-1 code of the country associated with the account

email

string (80)

REQUIRED. Email address associated with the account

first_name

string (80)

REQUIRED. First name of the account owner

id

string (80)

Unique ID for the owner of the Constant Contact account

idp_provider

string (20)

Unique identifier for the partner, use with Single Sign on implementation; REQUIRED when using Single Sign on authentication; do not use password with SSO.

idp_provider_id

string (255)

The unique identifier for the account owner; REQUIRED when using Single Sign on authentication.

last_name

string (80)

REQUIRED. Last name of the account owner

managed_site_owner

boolean

When managed=true, a partner can login to the user's account through the Partner Console. If single_billing=true, managed_site_owner is automatically set to true, even if it is set to false in the request payload. This is done to avoid getting an account into an unknown state.

oauth2_token

string

The OAuth 2.0 access token linked to the user account; is generated during account creation if oauth2_token_provided = true

organization_name

string (80)

REQUIRED. Name of the organization associated with the account

partner_account_id

string (80)

Partners can use this field to provide a unique identifier when provisioning an account for billing/reporting purposes.

password

string (80)

REQUIRED when not using Single Sign On. Password for the account being created; the password is not returned in response payload for security reasons; Do not use password if using SSO authentication, instead use idp_provider and idp_provider_id instead. Password limitations are:

  • minimum of 6 characters long
  • Can contain alphnumeric characters A-Z, a-z, 0-9
  • Can contain only the following special characters: @ . - _
  • It cannot contain: ` ! ~ # % ^ : ; | " / ? < >

phone

string (25)

REQUIRED. Phone number associated with the account, must have a minimum of 5 numbers, and a maximum of 25

single_billing

boolean

Set single_billing=true for the account to be billed using single_billing. Your partner account must be set up for single_billing in order to enable this feature. See your account manager for more information.

state_code

string (80)

REQUIRED if country_code is US or CA; must be a standard 2 letter (capitalized) code of the US state or Canadian province of the address. Leave blank for non-US/CA countries.

username

string (50)

REQUIRED. The username used to log in to the account being created; usernames must be unique, and must only contain the following characters a-z, 0-9, @, ., -, and _

website

string (255)

Takes a valid URL starting with http:// or https:// for your website, eliminating the need for your end users to provide this information.

Example ResponseTOP

{
   "id": "123562789", 
   "first_name":"Robert",
   "last_name":"Jones",
   "email_address":"rjones@example.com",
   "username":"account_username",
   "organization_name":"My organization",
   "phone_number":"555-555-5555",
   "state_code":"MA",
   "country_code":"US",
   "billing_locale":"en_US",
   "website":"http://your.company.website",
   "single_billing": true,
   "managed_site_owner": true,
   "partner_account_id":"partner1234"
}