Skip to content

Mute or unmute a notification category

PUT
/api/notifications/preferences
curl --request PUT \
--url https://foxleague.ai/api/notifications/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "category": "example", "muted": true }'

Mutes or unmutes one notification category for you. A muted category creates no notification at all: nothing in the feed, on the live socket or as a browser push.

Who: a signed-in player.

Refusals:

  • Unknown notification category: category is not one of the six categories.
  • Not registered: the wallet has no account.
Media type application/json

Mutes or unmutes one notification category.

object
category
required

matches, challenges, tournaments, marketplace, fusion or transfers.

string
muted
required

true mutes the category; false turns it back on.

boolean
Example generated
{
"category": "example",
"muted": true
}

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