Get an error when add campaign by api


Get an error when add campaign by api



I want to create a new campaign by API and API return an error.Please solve issue.


My json for Create campaigns is :


{"reply_to_email":"","from_name":"test","name":"new test","subject":"Test with newsletter","email_content":"This is my HTML content","text_content":"hello text"}

The error message show after run API and the error is below :


    [0] => stdClass Object
            [error_key] => http.status.bad_request
            [error_message] => Please enter a valid email address.


 Please suggest what can i do for this issue.



Is that the actual data you are trying to use?

If so, it appears that you are missing some fields and are not formatting your email content correctly so you are likely to see further errors after resolving this one. Please see our documentation for creating an email campaign for a complete list of fields and the format for each:

For this issue specifically, you need to ensure that the from and reply to email addresses are set to be a verified email address associated with the account. If you don't have verified on the Constant Contact account, you will see this error if you try to set this as the from or reply to address for an email campaign.

Please let me know if you have any other questions!

David B.
API Support Specialist

Developer Portal

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

Visit Page