Got a 'How do I' question? Join our live 'Ask a Trainer' session happening now for instant help and pro tips!

Send dynamic content in email campaign through API

0 Votes

Greetings, I'm looking for a solution where I can send emails through campaign but every individual email has different values (dynamic content). Is there any API's I can work up for this solution.



0 Votes

Hello HalS502,


Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.


Our system isn’t really configured to send individual emails like that, as Constant Contact is built primarily for sending bulk emails to lists of contacts, and sending a large amount of emails to lists that only contain one contact could potentially make viewing campaign reporting and statistics cumbersome.


However, there are certain ways that you could work around this by using the V3 API in combination with an HTML Custom Code email template sent to a specific list on a schedule using custom contact fields. I’ll list some steps below showing how you might configure something like that using an e-commerce abandoned cart flow as an example:


Before developing your own application for integration with Constant Contact’s API, you’ll need to verify that you are able to set up your application to pull contact and cart data via your e-commerce platform’s API documentation. Once you have that configured, you can begin programming your application to sort out which variables you need and parse them into the correct format for Constant Contact’s API.

Constant Contact provides developers with free access to our V3 API endpoints for developers building their own application for integration. You can get started using our API by visiting our documentation here:


In the following example, you’d take that contact/cart data and use the API to add those contacts to a designated list. (If your platform provides additional data such as contact name or cart items, you could include these as custom contact fields which could in turn be used to personalize the email) Then, on a schedule (I recommend once a week), you’d have the pre-built abandoned cart email deploy to that list of contacts. After the email is sent, you’d clear the list and create a new copy of the email for the next week.


Step 1: You’ll want to start by going through the V3 API OAuth2 Authorization Code Flow. (Please note, after step 1, you should set up step 4 before proceeding, because the authorization code from steps 2 and 3 only has a lifespan of 5 minutes.)

[V3 API OAuth2 Authorization Code Flow]


Step 2: (Optional) Create Custom Field(s) for Cart Items

[Create and Update Custom Fields]


Step 3: Create the HTML code for your Custom Code email template.

[Designing HTML for Custom Code Emails]


Step 4: Use your template code to create an email draft.

[Create an Email Campaign]


Step 5: Create a list for use with your integration.

[Create a List]


Step 6: Import your abandoned cart contacts to the list that you created. This can be done daily, or just prior to your weekly send.

[Bulk Activities - Import Contacts]


Step 7: Send your weekly abandoned cart email to the list we created.

[Schedule an Email Campaign]


Step 8: After the email has sent, clear the list so it can be used again next week.

[Remove Contacts from Lists Bulk Activity]


Step 9: Repeat steps 4-9 to send out your abandoned cart email each week.

Additionally, you can utilize our API Reference Page to find body schemas & values, as well as test the functionality of our available endpoints to see how they will work once programmed within your application:


Additionally, you could also utilize dynamic links and greeting tags. I’m including documentation for both of these features below:


Insert Dynamic Links in an Email:


Add Dynamic Links to a custom code email:


Add or Edit a Personalized Greeting in your Email:

Please have a look and let us know if you have any other questions!



John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Developer Portal

View API documentation, code samples, get your API key.

Visit Page


API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (70%)