Update Opt-Out List

PUT https://restapi.actonsoftware.com/api/1/list/optout

This endpoint allows you to add records to the opt-out list.

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
Authorization: Header False Required String Insert your generated access token.
(Bearer {access token})
file Body False Required File A CSV format file to upload with one column containing emails only. 

Response

{
  "status": "success",
  "message": "1 invalid or empty records rejected. 2 valid records processed.",
  "emptyRecords": 0,
  "rejectedRecords": 1,
  "rejectedRecordsUrl": "bad_optout_records_42152_362447_10.11.8.30_2853174657257890118.dat_bad.csv"
}

Code Examples

cURLPython

curl -X PUT https://restapi.actonsoftware.com/api/1/list/optout -H 'authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs' -F file=@/Users/john.doe/Documents/exampleList.csv

import requests

url = "https://restapi.actonsoftware.com/api/1/list/optout"

headers = {
  'authorization': 'Bearer 12345678-9abc-defg-hijk-lmnopqrs',
}

data = {
}

files = {'file':('Book1.csv', open('Book1.csv', 'rb'))}

response = requests.request("PUT", url, headers=headers, data = data, files = files)

print(response.text.encode('utf8'))