{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/:site_id/subscribers/:uid/unsubscribe","auth":"required","method":"post","examples":{"codes":[{"language":"json","code":"{\n  \"message_uid\": \"1234567891234abcdef123456\"\n}"}]},"results":{"codes":[{"code":"{\n    \"error\": \"message uid does not exist\"\n}","language":"json","status":404},{"code":"{\n    \"error\": \"incorrect user id\"\n}","language":"json","status":404},{"status":400,"language":"json","code":"{\n    \"error\": \"message uid is required\"\n}"}]},"settings":"56ea050204dc470e002870f1","params":[{"name":"message_uid","type":"string","default":"","desc":"Unique identifier of the specific message that the user received, and the one that this unsubscription should be attributed to. This can be accessed by using {{message_uid}} merge field in the campaign (typically as a query parameter to the unsubscribe/preferences link).","required":false,"in":"body","ref":"","_id":"5bacb1adc3f4c6000384505c"},{"name":"uid","type":"string","default":"","desc":"Unique identifier of the user who received the message.","required":false,"in":"query","ref":"","_id":"5bacb1adc3f4c6000384505b"},{"name":"site_id","type":"string","default":"","desc":"ZMP Site ID","required":false,"in":"path","ref":"","_id":"6059f0fd6f8dd700424c3884"}]},"next":{"description":"","pages":[]},"title":"Unsubscribe a User's Contact","type":"endpoint","slug":"unsubscribe-a-user-contact","excerpt":"Unsubscribe a user's contact attributed to a specific message","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Required Headers\",\n    \"h-1\": \"Value\",\n    \"0-0\": \"Content-Type\",\n    \"0-1\": \"application/json\",\n    \"1-0\": \"Accept\",\n    \"1-1\": \"application/json\",\n    \"2-0\": \"Authorization\",\n    \"2-1\": \"Basic <Auth Key>\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Use Case\"\n}\n[/block]\nAlthough ZetaHub supports an inbuilt subscription mechanism, there is often a need to manage subscription preferences outside of ZetaHub and within customer's own and centralised preference centers. In such cases, the end user receiving a campaign message, may need to leave ZetaHub domain in order to manage their subscription preferences. \nThis api can help customers attribute any unsubscriptions resulting from this, and connect it back to ZetaHub to ensure the integrity of their campaign metric.\n\nAll messages resulting from a campaign and received by an end user has a unique message identifier. This identifier can be embedded in campaign's content using a {{message_uid}} merge field (typically as a query parameter to the customer's preference center link within the campaign). At the receiving end (customer's preference center) the message_uid can be extracted and used with this api to connect any unsubscriptions back to ZetaHub.\n\nIn cases where a user has multiple contacts and connected with the customer across multiple channels( email, sms, mobile push...), this will ensure that only the contact which corresponds to the specific message_uid is unsubscribed, leaving rest of the user's contacts across different channels unaffected.","updates":[],"order":4,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5bacb1adc3f4c6000384505a","project":"56aff08c3a5b810d00745d99","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["56aff08d3a5b810d00745d9d","56aff24f3a5b810d00745da0","56aff25dbc304a0d00ace207","56aff287e0b1e40d00c53798","56aff2b260a37a0d00ed8883","56aff2b8e0b1e40d00c53799","56aff2bd5b1f01170014dc7b","56aff2c9d21e9c0d00b62993","56aff493aef9a21700da0e67","56aff4ce1486990d009c0f64","56aff4da5b1f01170014dc7d","56aff4dfe0b1e40d00c537a2","56aff4e59d32e30d0006d3e9","56aff4e91486990d009c0f65","56aff4f93a5b810d00745da2","56aff4fe9d32e30d0006d3ea","56b91c7ab1e03e0d001057c5","56c4f51aba4a540d0091b9a2","56cd09488c4a331d002c1e44","56d4ec4773dcd20b00fb8769","56e79bc515f96b2200878e54","56ec25c538ff1d2200d56cc2","56ec3a6f36bc8e0e00f190c8","56ec3e308ea7ce0e00a3d8b0","5724d8fe4255580e005938b2","5724dc842ad0bc1700122803","5776ef2a04f7500e0095dc37","57ab9f70b5e8742000e17eb9","57d7117646dcc30e007dd21f","58e6abd5b1eece19008b7d31","59288c65e2653627003e1221","5a8f4797a44f8600128e75ee","5bbf8833eb416300039a2c14","5ea811617bf4b5007328a0af"],"_id":"56aff08c3a5b810d00745d9c","project":"56aff08c3a5b810d00745d99","releaseDate":"2016-02-01T23:55:56.544Z","__v":34,"createdAt":"2016-02-01T23:55:56.544Z"},"category":{"sync":{"isSync":false,"url":""},"pages":["56ec26de1b16a3290030cf58"],"title":"Zeta REST API","slug":"bme-rest-api","order":2,"from_sync":false,"reference":true,"_id":"56ec25c538ff1d2200d56cc2","version":"56aff08c3a5b810d00745d9c","__v":1,"createdAt":"2016-03-18T15:59:01.460Z","project":"56aff08c3a5b810d00745d99"},"user":"5baa64ec1828a9000363fada","createdAt":"2018-09-27T10:32:13.546Z","__v":19,"parentDoc":null}

postUnsubscribe a User's Contact

Unsubscribe a user's contact attributed to a specific message

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

site_id:
string
ZMP Site ID

Query Params

uid:
string
Unique identifier of the user who received the message.

Body Params

message_uid:
string
Unique identifier of the specific message that the user received, and the one that this unsubscription should be attributed to. This can be accessed by using {{message_uid}} merge field in the campaign (typically as a query parameter to the unsubscribe/preferences link).

Examples


Result Format


Documentation

[block:parameters] { "data": { "h-0": "Required Headers", "h-1": "Value", "0-0": "Content-Type", "0-1": "application/json", "1-0": "Accept", "1-1": "application/json", "2-0": "Authorization", "2-1": "Basic <Auth Key>" }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "title": "Use Case" } [/block] Although ZetaHub supports an inbuilt subscription mechanism, there is often a need to manage subscription preferences outside of ZetaHub and within customer's own and centralised preference centers. In such cases, the end user receiving a campaign message, may need to leave ZetaHub domain in order to manage their subscription preferences. This api can help customers attribute any unsubscriptions resulting from this, and connect it back to ZetaHub to ensure the integrity of their campaign metric. All messages resulting from a campaign and received by an end user has a unique message identifier. This identifier can be embedded in campaign's content using a {{message_uid}} merge field (typically as a query parameter to the customer's preference center link within the campaign). At the receiving end (customer's preference center) the message_uid can be extracted and used with this api to connect any unsubscriptions back to ZetaHub. In cases where a user has multiple contacts and connected with the customer across multiple channels( email, sms, mobile push...), this will ensure that only the contact which corresponds to the specific message_uid is unsubscribed, leaving rest of the user's contacts across different channels unaffected.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}