Skip to content

Opt Out

This function opts a consumer out of email communications

Path

https://api.b-fonline.com/api/opt_out

Method

POST

Required Parameters

  • email
  • brand_id

Responses

  • 200 OK
    • true (opt out success)
  • 422 (Unprocessable Entity)
    • Error message in JSON response

Code Examples

1
2
3
4
5
6
7
8
curl -X POST \
  https://api.b-fonline.com/api/opt_out \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
    "email": "[email protected]",
    "brand_id": "36"
  }'
var data = {
  email: '[email protected]',
  brand_id : '36'
};

var settings = {
  url: 'https://api.b-fonline.com/api/opt_out',
  method: 'POST',
  data: JSON.stringify(data),
  contentType: 'application/json',
  dataType: 'json'
};

$.ajax(settings).done(function(response){
  console.log(response);
});