Building a Custom Signup Form

The signup form creation endpoint generates a unique ca ID and returns the URL to use when subscribing new contacts. This page describes the fields that can be provided when adding new contacts using that URL.

NOTE: The POST URL described here does not use the Constant Contact v2 API. It doesn't use any of the authentication and authorization protocols employed by our API.

Methods:

Click a method to view its documentation

POST

DescriptionTOP

This POST URL can be used to build from-scratch signup forms to be placed on websites to collect email addresses and put them into accounts. The POST URL endpoint includes a campaign activity id (ca) parameter which is unique to each signup form within a user's account. The 'ca' value authenticates the request and links it to a specific Constant Contact account. 

This method of adding contacts can also update existing contacts. If a contact already exists in the account with the email address provided, it will be updated with any new lists and information. This process is non-destructive. If a value exists for the contact but isn't provided in the payload, we will keep the old value.

The accepted fields and values that you can use are listed below. You may send a JSON payload with the key-value pairs, or append the URL with the key-value pairs. See this article for details about sending all of the data in the URL by appending it with query parameters.

Best practices

In order to ensure the best experience for folks subscribing, please consider the following suggestions.

  • Error messages - Record any error message body received back from us, and provide the appropriate feedback to the user trying to subscribe to your account. For example, if we give you a 400 error, that error code is accompanied by a reason, like that the email address was invalid. Display that message to help you and your contacts figure out what went wrong.
  • Success page - Create a page that tells the user they've successfully subscribed. Enter the URL for this page in the url field so they see your customized 'Thank you for signing up' message.
  • Keep the signup form current - Be aware that the lists specified need to remain in the account. If a list is deleted, the signup form should be updated.

POST: https://visitor2.constantcontact.com/api/signup

name

type

default

description

address_city

path

City the contact lives in.

address_country

path

Standard ISO 3166-1 2-letter country code for the contact

address_postal_code

path

The contact's Postal ZIP code.
NOTE: For postal codes that contain white space between characters, the characters after the first white space are broken out into the sub_postal_code field.

address_state

path

State that the contact lives in.

address_street

path

The contact's street address

anniversary_day

path

Must include anniversary_year and anniversary_month when using anniversary_day. The day of the contact's anniversary, accepts numbers 1 - 31.

anniversary_month

path

Must include anniversary_year and anniversary_day when using anniversary_month.The month of the contact's anniversary, accepts numbers 1 - 12.

anniversary_year

path

Must include anniversary_day and anniversary_month when using anniversary_year.The year of the contact's anniversary, accepts numbers 1900 and higher, up to 10 years in the future.

birthday_day

path

Must include birthday_month when using birthday_day. The day of the contact's birthday, accepts numbers 1 - 31.

birthday_month

path

The month of the contact's birthday, accepts numbers 1 - 12.

ca

path

REQUIRED Campaign Activity ID that identifies and authenticates the Constant Contact account owner

company

path

The contact's company

email

path

REQUIRED The contact's email address, must comply with RFC 5322.

first_name

path

The contact's first name

job_title

path

The contact's job title

last_name

path

The contact's last name

list, lists, list_n

path

Specifies the list_id that the contact will be subscribed to. If your form will have multiple lists, you can differentiate each list using list_1, list_2 ... If blank, the contact is added to the list(s) configured with the signup form in the product UI.

phone

query

The contact's home phone number

url

path

URL to redirect the subscriber to after submitting subscription. This feature will only work if the javascript and 'success' span section are removed from the Embed Code.