We have added a Swagger UI here to try out our API on your account.
Here are the important end-points
Get Session Token
Check List
Check List and Send Confirmation Email
End Point: https://simpleoptoutcompliance.com/api/v1/token/
Purpose: enable users to create authenticated session using their console log in credentials.
curl -X 'POST' \
'https://www.simpleoptoutcompliance.com/api/v1/token/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "username",
"password": "password"
}'
{
"message": "no wrapper",
"data": {
"refresh": "refresh_token",
"access": "access_token"
},
"success": true
}
End point: .../api/v1/check/list/clean
Pass a JSON object of emails to this end-point to check if they are part of the opted out list.
curl -X 'POST' \
'https://www.simpleoptoutcompliance.com/api/v1/check/list/clean' \
-H 'accept: application/json' \
-H 'X-Api-Key: API KEY' \
-H 'Authorization: Bearer Authorization Token'\
-H 'Content-Type: application/json' \
-d '{
"emails": [
"user@example.com"
]
}'
{
"message": "", "data":
[{
"email": "example_1@gmail.com", "found": true
}, {
"email": "example_2@gmail.com", "found": true
}, {
"email": "example_3@yahoo.com", "found": false
} ],
"success": true
}
End Point: .../api/v1/check/list/clean/confirm
Pass a JSON object of emails to this end point and the application will check if each email is in opt-out table. If it is , it will send a user-customizable confirmation email to that person. The api will then return a JSON object confirm presence in the opt-out table.
curl -X 'POST' \
'https://dev.simpleoptoutcompliance.com/api/v1/check/list/clean/confirm' \
-H 'accept: application/json' \
-H 'X-Api-Key: API KEY' \
-H 'Authorization: Bearer Authorization Token'\
-H 'Content-Type: application/json' \
-d '{
"emails": [
"name.lastname@gmail.com
]
}'
{
"message": "success",
"data": [
{
"email": "name.lastname@gmail.com",
"found": true
}
],
"success": true
}