The email scheduler used to schedule emails using the “create_campaign” endpoint where options such as from_email, from_name, subject are set. But it seems that in v2023-02-22, the API has moved these options to the “Update Campaign Message” endpoint. However, during my testing, I am getting errors telling me to that the template cannot be changed directly, and asks me to use the assign campaign message template instead.
I am able to create a campaign and assign a template ID to it. But I am not able to change the fields such as “from_email”, from_name”, “subject_name”. Appreciate if someone can let me know what I am missing.
Best answer by Brian Turcotte
Hi @douglaslo!
I reproduced this with some internal engineers, and we found this method to accomplish your use case:
Would you be willing to post the exact error/screenshot (with all sensitive information redacted)?
This will help myself and other Community members understand the issue more clearly.
Thanks,
Brian
Hello @Brian Turcotte,
Thank you very much for writing back. With the Python SDK, I am using the Campaigns.create_campaign() call to create a new campaign. This call is fine as I can see in the dashboard that I have successfully created a campaign.
But after creating the campaign and getting the message I am getting a Bad Request Error.
I am rather confused about the first parameter requesting for “message_id”, and the “message_id” within the “data” object. Not sure if they should be the same ID or not.
If you get another error related to the template_name, you can just remove that attribute from the third API call
I hope this helps!
Best,
Brian
Search saves time. Contributing compounds value.
The ROI of your reply? One helpful answer can support dozens of teams, build your credibility, sharpen your own expertise over time, foster connectivity, and create good karma – because what goes around comes around. The community is what YOU make it.