Exclusion Management
An exclusion is an (optionally time limited) request to cease all marketing communication to a player. In response to an exclusion request, Teak will purge all methods Teak has of reaching a player, including push tokens, email address, and advertising identifiers. Until the exclusion is deleted or expires, Teak will not record any methods of reaching a player. Once an exclusion is deleted or expires, Teak will record methods of reaching a player, however previously known player contact methods will not be restored.
Other player opt out preferences are not impacted by an exclusion.
Listing
Endpoint |
|
Request Type |
GET |
Rate Limiting |
60 requests per second |
Description: The GET v2/exclusions
endpoint retrieves current exclusions for the game. Exclusions that have expired may or may not be included in the returned list.
Optional Parameters
limit |
The number of exclusion records to return. Will be clamped to [1, 10000]. Defaults to 1,000 |
after |
A pagination token from a previous call to v2/exclusions |
Success Response
Status Code |
200 |
||||||
Response Body |
JSON dictionary with 'status' and 'exclusions' keys. If pagination is possible, the dictionary will include a 'paging' key,
|
||||||
Example |
|
Error Responses
Not Found
Status Code |
404 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which resources were not found, with values being an array of human readable error messages. |
Example |
|
Rate Limit Response
Status Code |
429 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'rate_limit'. 'errors' will contain the key 'rate_limit' |
Example |
|
Reading
Endpoint |
|
Request Type |
GET |
Rate Limiting |
60 requests per second |
Description: The GET v2/exclusions/:user_id
endpoint retrieves the current exclusion for the user_id
in the request path.
Success Response
Status Code |
200 |
||||
Response Body |
JSON dictionary with 'status' and 'exclusion' keys.
|
||||
Example |
|
Error Responses
Not Found
Status Code |
404 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which resources were not found, with values being an array of human readable error messages. |
Example |
|
Rate Limit Response
Status Code |
429 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'rate_limit'. 'errors' will contain the key 'rate_limit' |
Example |
|
Creating or Updating
Endpoint |
|
Request Type |
POST |
Rate Limiting |
60 requests per second |
Description: The POST v2/exclusions
endpoint creates or updates an exclusion for a given user_id.
Required Parameters
game_id |
Your Teak App ID |
secret_key |
Your Teak Server Secret |
user_id |
The Game Assigned Player ID of the player you are creating or updating an exclusion for. This must match the value provided by the game client’s Teak SDK integration. |
Optional Parameters
expire_at |
An ISO8601 timestamp of when the exclusion should expire. If omitted in a creation or update request, the exclusion will not expire. |
Success Response
Status Code |
200 |
||||||||||
Response Body |
JSON dictionary with 'status', 'action', 'exclusion', 'purged_channels', and 'previous_expire_at' keys.
|
||||||||||
Example |
|
Error Responses
Not Found
Status Code |
404 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which resources were not found, with values being an array of human readable error messages. |
Example |
|
Invalid Parameter
Status Code |
422 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which parameters were invalid, with values being an array of human readable error messages. |
Example |
|
Rate Limit Response
Status Code |
429 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'rate_limit'. 'errors' will contain the key 'rate_limit' |
Example |
|
Destroying
Endpoint |
|
Request Type |
DELETE |
Rate Limiting |
60 requests per second |
Description: The DELETE v2/exclusions
endpoint destroys an exclusion for a given user_id.
Required Parameters
game_id |
Your Teak App ID |
secret_key |
Your Teak Server Secret |
user_id |
The Game Assigned Player ID of the player clearing an exclusion for. This must match the value provided by the game client’s Teak SDK integration. |
Success Response
Status Code |
200 |
||||
Response Body |
JSON dictionary with 'status', 'action', 'exclusion', 'purged_channels', and 'previous_expire_at' keys.
|
||||
Example |
|
Error Responses
Not Found
Status Code |
404 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which resources were not found, with values being an array of human readable error messages. |
Example |
|
Invalid Parameter
Status Code |
422 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'error'. 'errors' will be a dictionary containing keys indicating which parameters were invalid, with values being an array of human readable error messages. |
Example |
|
Rate Limit Response
Status Code |
429 |
Response Body |
JSON dictionary with 'status' and 'errors' keys. 'status' will be 'rate_limit'. 'errors' will contain the key 'rate_limit' |
Example |
|