NOTE: The signup form described here was deprecated in 2017. Existing forms will still work, but users are no longer able to view the CA ID in the product UI.
We’ve gotten feedback that users want a simple way to add contacts into their Constant Contact account without having to redirect the contact to our website to finish the process. This method keeps the contact on your page and doesn’t require advanced programming knowledge.
You can now add contacts directly into your account from your webpage or application using this simple post URL. You can also use the embed code as it is, and paste it into your website. That’s found by logging in and going to Contacts>>Sign-up Tools>>Embed Code.
This article focuses on constructing the raw request, and is for our very technical users with HTML and CSS coding experience. In order to use the POST URL, your web page or application must be able to make a HTTPS call to the following URL:
Our signup URL doesn’t require the use of an API Key or access token, and doesn’t use the OAuth 2 flow used by our API endpoints.
The “ca” value identifies the account to which to add the new contact. This property is unique for each Constant Contact account. As such, this is not a suitable solution for multi-user applications.
You can find the “ca” value for an account by logging in and going to Contacts>>Sign-up Tools>>Embed Code. Copy the embed code, and find the “ca=” parameter. Paste the value that follows into your sign-up form URL. If you have multiple embedded sign-up forms in one account, any of the “ca” values will work.
The ca id is shown in the embed code like this. It is the hashed string after “value.”
<!-- The following code <span class="hiddenGrammarError" pre="code " data-mce-bogus="1">must be</span> included to ensure your sign-up form works properly. --> <input data-id="ca:input" type="hidden" name="ca" value="12345-678-910">
The new POST URL supports a number of fields that users can choose to fill in when subscribing. A visitor is only required to fill in the email field. The following table lists the fields supported by the POST URL.
|address_city||City the contact lives in.|
|address_country||The contact's country; Standard ISO 3166-1 2-letter country code|
|address_postal_code||The contact's Postal ZIP code.|
|address_state||State that the contact lives in.|
|address_street||The contact's street address|
|anniversary_day||Must include anniversary_year and anniversary_month when using anniversary_day. The day of the contact's anniversary, accepts numbers 1 - 31.|
|anniversary_month||Must include anniversary_year and anniversary_day when using anniversary_month.The month of the contact's anniversary, accepts numbers 1 - 12.|
|anniversary_year||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||Must include birthday_month when using birthday_day. The day of the contact's birthday, accepts numbers 1 - 31.|
|birthday_month||The month of the contact's birthday, accepts numbers 1 - 12.|
|ca||Yes||Campaign Activity ID that identifies and authenticates the Constant Contact account owner. Retrieve this value by logging in your Constant Contact account and going to Contacts>>Sign-up Tools>>Embed Code, and look for ca ID.|
|company||The contact's company|
|Yes||The contact's email address, must comply with RFC 5322.|
|first_name||The contact's first name|
|job_title||The contact's job title|
|last_name||The contact's last name|
|list||Array of list_ids that the contact will be subscribed to. If blank, service uses the lists configured with the signup form in the product UI.|
|phone||The contact's home phone number|
|url||URL to redirect the subscriber to after submitting subscription. If blank, endpoint returns a 200 Success response.|
For example, your sign-up form can make a POST request to the URI below to specify the email address being added, their first name, and the lists you want them added to.
https://visitor2.constantcontact.com/api/signup?ca=xxxxx &firstname.lastname@example.org&first_name=Joe &list=xxxx&list=xxxxx
The lists parameter specifies the list(s) to which to add the new contact. Specify multiple lists by including the list parameter multiple times. If no lists are specified in the URL, the contact is added to the lists that you specified when you set up the sign-up form in the product UI.
If a contact that is submitted using the POST URL already exists in your account, the POST updates their record with the information included using this method. They will not be removed from any lists that they are already subscribed to; the effect of this will be additive. Similarly, any fields not sent into us in the request will remain in the contact record.
Possible responses from our service
|Contact created/updated successfully||200||Welcome page (customizable)|
|Missing parameter||400||Error page: "Missing required field: ..."|
|Invalid e-mail address||400||Error page: "Invalid e-mail address..."|
|Rate limit exceeded||429||Error page: "Sorry, our signup volume is too high. Please try again later."*|
* Note that this is for security. Each account is limited to 100 submissions per 24-hour period, on a revolving timer.
The character limits on contact fields are defined here, in addition to being in the embed code.
For support, take a look at all the ways you can get in touch with us. Please note that we can only ensure that you are forming the POST request properly and that the submitted data is in the correct format.
I'm trying to follow the instructions in this article, but it appears that something has changed and it's no longer possible to follow it.
When viewing the "Contacts" page in my account, there is no "Sign-up Tools" section. I can no longer find the embed code needed to find the "ca" value for my request. Where can I access this information now?
The CA value was a component of our older embedded signup forms. When our Contacts team updated to our new inline signup forms in 2017, this previous method was discontinued. Previously generated forms do still function but there is no longer a way to generate a new CA value.
If you have any questions about our signup forms, please feel free to reach out to our main support team at 866-289-2101.
I will be marking the parent posting here as obsolete.