Documentation
Pub/Sub Unsubscribe API
Unsubscribe a device from topics from your backend server.
API Endpoint
POST https://api.pushy.me/devices/unsubscribe?api_key=SECRET_API_KEY
Make sure to replace SECRET_API_KEY
with your app's Secret API Key listed in the Dashboard.
Note: This is a backend API endpoint. Never expose your application's Secret API Key in your client code.
JSON Post Parameters
Key | Description | Type |
---|---|---|
token
|
The token of the device to unsubscribe. | A string |
topics
|
An array of topics to unsubscribe the device from. Topics are case-sensitive and must match the following regular expression: [a-zA-Z0-9-_.]+ .
|
A string[] array |
Sample POST Body
{
"token": "a6345d0278adc55d3474f5",
"topics": [
"news",
"media"
]
}
API Response
Successful Response Example
{"success": "true"}
Failure Response Example
{"error":"We could not find a device with that token linked to your account."}