Introduction
This API will add a customer to the “stop list” and prevent subsequent emailing to that address.
Good to know
API response format:
Our APIs return data in either JSON or XML format (depending on request by .json or .xml).
About this API
Resource Information
Response formats | JSON (default), XML |
HTTP Method | POST |
Response family | Lists |
Header | Authorization: Bearer XXXXX |
Resource URL
Europe Production Server: https://api.eu.customergauge.com/v4.1/lists/unsubscribe.json
US Production Server: https://api.us.customergauge.com/v4.1/lists/unsubscribe.json
Australia Production Server: https://api.au.customergauge.com/v4.1/lists/unsubscribe.json
Authentication
OAuth2 Authentication is used to connect to this API. In order to create the Connected App, which is needed to generate the Access Token, Administrator access to CustomerGauge is needed. Once you've created your Connected App, you can acquire a Bearer Access Token by calling our OAuth2/Token API:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id={{ Client ID }}&client_secret={{ Client Secret }}"
https://auth.{{ apiRegion }}.customergauge.com/oauth2/token
The acquired Bearer Access Token is used in the Authorization header in your API request.
How to call
POST Data
Post data as key value based on upload mapping.
Parameters
Key | Data |
email (required) | lee_klameth@directness.net |
Example Request
curl -H "Authorization: Bearer XXXXX" -X POST https://api.eu.customergauge.com/v4.1/lists/unsubscribe.json -d email=lee_klameth@directness.net
Example Result
Message reported on successful operation:
{ "Data": { "Message": "Record added" } }
Message reported on failed operation:
{ "Error": { "Message": "Email address is required", "Code": 400402 } }
Not the API you're looking for?
Related APIs:
Or view: