Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

API Question

SOLVED
Go to solution
scotty.peterson
Rookie
0 Votes
Hello,

I have a question about the "POST Test Send an Email Campaign Activity", and the "GET Details About a Single Email Campaign" functions. 
 
My Goal:
 
I am working on a popup on our site. This popup takes an email submission from the user. I'd like to use the Constant Contact API to send the user a specific email I've created from Constant Contact to their own email that they submitted in the popup.
 
 
What I know/What I have tried:
  • I see that I need the campaign_activity_id for the  "POST Test Send an Email Campaign Activity"
  • I see that I can GET that id with the "GET Details About a Single Email Campaign"
  • I need the campaign_id for this function
  • As far as I've been made aware, this can be found in the URL at the end of the https://app.constantcontact.com/pages/campaigns/email-details/details/activity/{mycampaignIDhere}
  • When entering the ID in the API reference page, I get this error:
 scottypeterson_1-1724705161148.png

 

Questions:
  1. What can I do to get the campaign_id, so I can use the "GET Details About a Single Email Campaign" function to get the campaign_activity_ID, so I can use that to "POST Test Send an Email Campaign Activity"?
  2. Am I going about my goal correctly? I don't see another way to send out an email to a specific email address using the API other than using this test function.
1 ACCEPTED SOLUTION
Courtney_E
Moderator
0 Votes

Hello scotty.peterson,

 

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.

 

I wouldn't recommend sending a test email to new sign-ups, as it will show up in the inbox with a red footer area stating that it is a test email, the same way that sending a test email to yourself from an email campaign would:

 

Footer text:

"THIS IS A TEST EMAIL ONLY.

This email was sent by the author for the sole purpose of testing a draft message. If you believe you have received the message in error, please contact the author by replying to this message. Constant Contact takes reports of abuse very seriously. If you wish to report abuse, please forward this message to abuse@constantcontact.com."

 

Instead, I'd recommend setting up a list join automation with a dedicated list within the website UI. This way, you can use the API to add the contact to a certain list, and then the automation will deploy the email to them. There aren't any Automation endpoints within the API, so you'd need to set up the email automation from within the website UI.  If you need help setting up the automation, you should be able to call into Constant Contact's Support Team at 866-289-2101.

 

Tutorial: Create an automation path

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/32014-Tutorial-Create-an-Automated-...

 

Getting started with the Automation Path Builder

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/43904-Set-up-an-automated-marketing...

 

Regarding your questions about the campaign_id and campaign_activity_id:

 

To get the Campaign IDs, you'll first want to GET a Collection of Email Campaigns, for which the Campaign ID will be listed for each:

 

GET a Collection of Email Campaigns

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

Next, using the Campaign ID, you'll call GET Details About a Single Email Campaign to get the Campaign Activity ID(s). 

 

GET Details About a Single Email Campaign

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

If you want to test using POST Test Send an Email Campaign Activity, you will need to use the campaign_activity_id listed above "role": "primary_email" from the previous response.

POST Test Send an Email Campaign Activity
https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Scheduling/testSendCampaig...

 

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


Regards,

Courtney E.
Tier II API Support Engineer

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.

View solution in original post

1 REPLY 1
Courtney_E
Moderator
0 Votes

Hello scotty.peterson,

 

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.

 

I wouldn't recommend sending a test email to new sign-ups, as it will show up in the inbox with a red footer area stating that it is a test email, the same way that sending a test email to yourself from an email campaign would:

 

Footer text:

"THIS IS A TEST EMAIL ONLY.

This email was sent by the author for the sole purpose of testing a draft message. If you believe you have received the message in error, please contact the author by replying to this message. Constant Contact takes reports of abuse very seriously. If you wish to report abuse, please forward this message to abuse@constantcontact.com."

 

Instead, I'd recommend setting up a list join automation with a dedicated list within the website UI. This way, you can use the API to add the contact to a certain list, and then the automation will deploy the email to them. There aren't any Automation endpoints within the API, so you'd need to set up the email automation from within the website UI.  If you need help setting up the automation, you should be able to call into Constant Contact's Support Team at 866-289-2101.

 

Tutorial: Create an automation path

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/32014-Tutorial-Create-an-Automated-...

 

Getting started with the Automation Path Builder

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/43904-Set-up-an-automated-marketing...

 

Regarding your questions about the campaign_id and campaign_activity_id:

 

To get the Campaign IDs, you'll first want to GET a Collection of Email Campaigns, for which the Campaign ID will be listed for each:

 

GET a Collection of Email Campaigns

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

Next, using the Campaign ID, you'll call GET Details About a Single Email Campaign to get the Campaign Activity ID(s). 

 

GET Details About a Single Email Campaign

https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/retrieveEmailCam...

 

If you want to test using POST Test Send an Email Campaign Activity, you will need to use the campaign_activity_id listed above "role": "primary_email" from the previous response.

POST Test Send an Email Campaign Activity
https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Scheduling/testSendCampaig...

 

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


Regards,

Courtney E.
Tier II API Support Engineer

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.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

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

Sign Up