Move to Do-Not-Mail
You can move the contact to do-not-mail registry if you do not want to send emails further to that user or if they unsubscribe from the organization. Using this API, you can move/add contacts into "Do-Not-Mail" registry.
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]/contactdonotmail
List of Parameters --Version 1.1
Parameter | Data Type | Description |
resfmt | String | XML (or) JSON |
contactinfo* | String | Provide email id to be moved to Do-Not-Mail registry. |
* - Mandatory Parameters
Possible error cases
Error code | Description |
0 | User already in Do-Not-Mail. |
2004 | Invalid email address pattern. |
2104 | Error in Do-not-mail. Please retry after sometime. |
If your error code is not listed above, click here.
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/xml/contactdonotmail?resfmt=XML&<xml><fl val="Contact Email">xxx@zoho.com</fl></xml>
Sample Response
Copied<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<response uri="/api/v1.1/xml/contactdonotmail" version="1.1">
<code>0</code>
<message>User successfully moved to Do-Not-Mail.</message>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/json/contactdonotmail?resfmt=JSON&contactinfo=%7BContact+Email%3Axxx%40zohocorp.com%7D
Sample Response
Copied{
"code": "0",
"message": "User successfully moved to Do-Not-Mail.",
"version": "1.1",
"uri": "/api/v1.1/json/contactdonotmail",
"status": "success"
}