API Reference – Marketing API – Unsubscribe

Marketing API Method Documentation

©2009-2014 SocketLabs, Inc., Version 0.1, Last Edit: March 25, 2014

POST /contacts/unsubscribe/{contactId}

Synopsis:

Unsubscribes a contact from your entire server.

Recommended Usage:

This method will set the status of the contact to “Unsubscribed” for your entire server and no future messages will be sent to it (applies across all lists, newsletters, autoresponders, and SMTP or HTTP-injected sending.

Either the contact integer ID or the email address can be used with this method.

If the contact is not found, a 404 Not Found response will be issued.

Request Information

HTTP Method:

POST

URL:

https://api.socketlabs.com/marketing/v1/contacts/unsubscribe/{contactId}

Response Format Types:

JSON or XML

Request Parameters:

For the first form of the method call, the contact ID value should be specified in the URL.

For the second form, the email address should be specified in a JSON object in the message body.

Example Request:

By integer ID:

POST /marketing/beta/contacts/unsubscribe/456 HTTP/1.1
Host: api.socketlabs.com
Authorization: Basic XXXXXXXXXXXXXXXXXXXx==
Cache-Control: no-cache

By email address in message body as JSON:

POST /marketing/beta/contacts/unsubscribe HTTP/1.1
Host: api.socketlabs.com
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXX==
Content-Type: application/json
Cache-Control: no-cache

{emailAddress: "[email protected]" }

Response Parameters

None.

Customers Who Trust in SocketLabs

You’re in good company when working with SocketLabs. Here are some companies who have also trusted SocketLabs.

Why SocketLabs?

What Our Customers Are Saying!