Schedule Campaign
You might want to send your emails at the most opportune time of day and week. Using this API, you can schedule sending time for campaigns.
Request Type:
- POST
Scope required
- ZohoCampaigns.contact.UPDATE
Other alternative scopes
- ZohoCampaigns.campaign.CREATE-UPDATE (CREATE + UPDATE)
- ZohoCampaigns.campaign.WRITE (CREATE + UPDATE + DELETE)
- ZohoCampaigns.campaign.ALL (CREATE + UPDATE + DELETE + READ)
Header:
Authorization: Zoho-oauthtoken <access_token>
Content-Type: application/x-www-form-urlencoded
Request URL
https://campaigns.zoho.com/api/v1.1/sendcampaign?isschedule=true
API Limit
- Duration: 5 mins
- Number of Calls: 500
- Lock Period: 30 mins
You can send 500 API calls per 5 minutes. If you hit this limit, you can't use this API for the next 30 minutes due to security reasons, but you can still use other APIs if their lock period hasn’t been reached.
List of Parameters: -- Version 1.1
Parameter | Data Type | Description |
resfmt | String | xml (or) json |
campaignkey | String | Get it from the recent campaign response |
scheduledate* | mm/dd/yyyy | Provide a date to schedule campaign |
schedulehour* | [1-12] | Give a preferred time |
scheduleminute* | [00-55] | Give a preferred time |
am_pm* | String | Set am or pm |
istimewarp | Boolean | Set to sender's time zone |
sendingTZ | String | Set to recipient's time zone |
* - Mandatory Parameters
Possible error cases
Error code | Description |
3023 | AB campaign cannot be sent to less than 4 recipients. |
6607 | No Content for this campaign. |
6606 | No lists selected for this campaign. |
6605 | Campaign status is changed. |
6609 | Content changed after review. |
6608 | Recipient changed after review. |
6611 | Content is not reviewed. |
6604 | Error in campaign sending. Shopify setup error |
6603 | Error in Campaign Sending. Coupon setup error. |
903 | Mandatory fields are missing. |
6600 | Campaign is sent. |
6503 | Campaign has been deleted. |
6302 | There are no details in this campaign. |
6601 | Insufficient privileges to perform this action. Please contact the org admin. |
6301 | Invalid campaign key. |
1004 | Invalid URL for content import. |
If your error code is not listed above, click here.
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/sendcampaign?isschedule=true&resfmt=XML&campaignkey=[campaignkey]&scheduleDate=01/19/2017&scheduleHour=12&scheduleMinute=15&am_pm=PM&sendingTZ=Asia/Kolkata
Sample Response
Copied<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<response>
<message>Success</message>
<campaign_status>ScheduledAfterReviewed</campaign_status>
<code>200</code>
<uri>/api/v1.1/sendcampaign</uri>
<version>1.1</version>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/sendcampaign?isschedule=true&resfmt=JSON&campaignkey=[campaignkey]&scheduleDate=01/19/2017&scheduleHour=12&scheduleMinute=15&am_pm=PM&sendingTZ=Asia/Kolkata
Sample Response
Copied{ "message": "Success", "campaign_status": "ScheduledAfterReviewed", "code": "200", "uri": "/api/v1.1/sendcampaign", "version": "1.1" }