Skip to content

Remove a browser push subscription

POST
/api/push/unsubscribe
curl --request POST \
--url https://foxleague.ai/api/push/unsubscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "endpoint": "example" }'

Removes one of your browser push subscriptions. An endpoint you do not have is not an error.

Who: a signed-in player, who can only remove their own subscriptions.

Refusals:

Media type application/json

The browser push subscription to remove.

object
endpoint
required

The push service address to remove.

string
Example generated
{
"endpoint": "example"
}

Success or a refusal: read success (the refusals are in the description).

Media type application/json

The answer of a request that returns no data. POST /api/tournaments/{id}/delete answers its refusals with it: success is false and error says why.

object
code

A machine-readable reason next to error, set only where the caller must act differently.

string
data

Always null on success: the route returns no data.

error

Why the request was refused, in plain words. Present when success is false.

string
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": null,
"success": true
}

No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.

Media type text/plain
string
Example
Session expired or invalid