Subscribe

Subscribe

Users can subscribe to a list without using the signup form or by getting added by another user. They can subscribe using our API Authentication Token and the user added will be notified.

For public list, you cannot update an already existing subscriber using API.
However, you can use this API to update your subscriber details for the existing subscribers in the private list.

Request URL

You've an option of using either the XML (or) JSON format at the time of request.

XML: https://campaigns.zoho.com/api/xml/listsubscribe

JSON: https://campaigns.zoho.com/api/json/listsubscribe

Request Type: Post

List of Parameters

Parameter

Data Type

Description

authtoken*
scope*

String
String

API Authentication Token
CampaignsAPI

listkey*

String

List Key to send a subscription mail to subscribers of the list.

version

String

This will fetch responses based on the current API version

resfmt

String

XML (or) JSON

contactinfo*

XML (or) JSON

Subscriber email with other fields. Format of this value depends on the request URL.

sources

String

Subscriber source can be added.

* - Mandatory Parameters

Sample Request:

XML:

https://campaigns.zoho.com/api/xml/listsubscribe?authtoken=[API Authentication Token]&scope=CampaignsAPI&version=1&resfmt=[XML]&listkey=[listkey  ]&contactinfo=<xml><fl val="First Name">mac</fl><fl val="Contact Email">jai@zoho.com</fl></xml>&sources=[sourceName]

JSON:

https://campaigns.zoho.com/api/json/listsubscribe?authtoken=[API Authentication Token]&scope=CampaignsAPI&version=1&resfmt=[JSON]&listkey=[listkey  ]&contactinfo={First Name:mac,Last Name:Last Name,Contact Email:jai@zoho.com}&sources=[sourceName]

Sample Response:

Our API response will let you know of the following be it in the XML or JSON format.

XML Format:

<response uri="/api/xml/listsubscribe" version="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>

JSON format:

{"message":"A confirmation email is sent to the user. User needs to confirm to successfully subscribe.","status":"success","code":"0","uri":"/api/json/listsubscribe","version":"1"}

Possible error cases

Error code Description
2501Listkey is empty or invalid..
2004 Invalid subscriber email address. 
2005Group email address added. 
2001Please enter correct XML(or)JSON format. 

If your error code is not listed above, click here.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocampaigns.com