Subscribe
You can use this API to add contacts to your mailing lists. For signup form enabled mailing lists, the contacts will receive a confirmation email. Upon confirming, the contact will be added to your list. For signup form disabled lists, contacts will be added without any confirmations. You can use this API to update field information for existing contacts.
Request Type:
- POST
Scope required
- ZohoCampaigns.contact.UPDATE
Other alternative scopes
- ZohoCampaigns.contact.CREATE-UPDATE (CREATE + UPDATE)
- ZohoCampaigns.contact.WRITE (CREATE + UPDATE + DELETE)
- ZohoCampaigns.contact.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/[xml/json]/listsubscribe
API Limit
- Duration: 1 Day
- Number of Calls: 75,000
- Duration: 1 Hour
- Number of Calls: 12,500
- Duration: 1 Minute
- Number of Calls: 500
- Lock Period: 30 mins
You can send 500 API calls per minute, 12,500 calls per hour, or 75,000 calls per day. 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 |
listkey* | String | List Key to send a subscription mail to contacts of the list. |
resfmt | String | XML (or) JSON |
contactinfo* | XML (or) JSON | Contact email with other fields. The format of this value depends on the request URL. |
source | String | Contact source can be added. |
topic_id | String | Topic ID for the topic created |
* - Mandatory Parameters
Possible error cases
Error code | Description |
2501 | Listkey is empty or invalid. |
2004 | Invalid contact email address. |
2005 | Group email address added. |
2001 | Please enter correct XML(or)JSON format. |
If your error code is not listed above, click here.
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/xml/listsubscribe?resfmt=XML&listkey=[listkey]&contactinfo=<xml><fl val="First Name">mac</fl><fl val="Contact Email">jai@zoho.com</fl></xml>&source=[sourceName]
Sample Response
Copied<response uri="/api/v1.1/xml/listsubscribe" version="1.1">
<code>0</code>
<status>success</status>
<message>A confirmation email is sent to the user. User needs to confirm to successfully subscribe.</message>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/json/listsubscribe?resfmt=JSON&listkey=[listkey]&contactinfo=%7BFirst+Name%3Amac%2CLast+Name%3ALast+Name%2CContact+Email%3Ajai%40zoho.com%7D&source=[sourceName]
Sample Response
Copied{
"message": "A confirmation email is sent to the user. User needs to confirm to successfully subscribe.",
"status": "success",
"code": "0",
"uri": "/api/v1.1/json/listsubscribe",
"version": "1.1"
}