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

    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_idStringTopic ID for the topic created

    * - Mandatory Parameters

    Possible error cases

    Error code Description
    2501Listkey is empty or invalid.
    2004 Invalid contact email address. 
    2005Group email address added. 
    2001Please 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"
    }