Get Campaign Recipients Data
Using this API, you can get the campaign recipients' data which includes sent time, sent date and lead id.
Request Type:
- POST
Scope required
- ZohoCampaigns.campaign.READ
Other alternative scope
- 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/getcampaignrecipientsdata
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 | [campaignkey] |
action* | String | [sentcontacts|openedcontacts|optoutcontacts|spamcontacts |unopenedcontacts|clickedcontacts|senthardbounce| sentsoftbounce|unsentcontacts] |
* - Mandatory Parameters
Possible error cases
Error code | Description |
6601 | AB campaign cannot be sent to less than 4 recipients. |
6607 | Insufficient privileges to perform this action. Please contact the org admin. |
6303 | There are no contacts in the selected mailing list. |
6002 | Invalid campaign key (or) campaign is not yet sent. |
If your error code is not listed above, click here.
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/getcampaignrecipientsdata?resfmt=XML&campaignkey=[campaignkey]&action=[sentcontacts|openedcontacts|optoutcontacts|spamcontacts|unopenedcontacts|clickedcontacts|senthardbounce| sentsoftbounce|unsentcontacts]
Sample Response
Copied<response uri="/api/v1.1/getcampaignrecipientsdata" version="1.1">
<status>success</status>
<code>0</code>
<range>20</range>
<action>sentcontacts</action>
<fromindex>1</fromindex>
<campaign_details>
<fl val="email_status">Sent</fl>
<fl val="zuid">4179027</fl>
<fl val="campaign_name">Zoho Survey 7</fl>
<fl val="email_subject">Zoho Survey 7</fl>
</campaign_details>
<contacts>
<contact>
<fl val="added_time">02 Aug 2013, 12:39 PM</fl>
<fl val="first_name">meganath.v</fl>
<fl val="last_name"/>
<fl val="company_name"/>
<fl val="phone"/>
<fl val="contact_email">john.doe@xyz.com</fl>
</contact>
</contacts>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/getcampaignrecipientsdata?resfmt=[JSON]&campaignkey=[campaignkey]&action=[sentcontacts|openedcontacts|optoutcontacts|spamcontacts|unopenedcontacts|clickedcontacts|senthardbounce| sentsoftbounce|unsentcontacts]
Sample Response
Copied{
"requestdetails": {
"range": 20,
"action": "sentcontacts",
"fromindex": 1
},
"status": "success",
"list_of_details": [
{
"phone": "null",
"timezone": "null",
"contactstatus": "active",
"contactemailaddress": "john.doe@xyz.com",
"sent_time": "1375456161000",
"lastname": "",
"sentdate": "02 Aug 2013, 12:39 PM",
"firstname": "meganath.v",
"contactid": "303000014269257",
"companyname": "null"
}
],
"code": "0",
"uri": "/api/v1.1/getcampaignrecipientsdata",
"version": "1.1"
}