Mute or unmute a notification category
const url = 'https://foxleague.ai/api/notifications/preferences';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"category":"example","muted":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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:categoryis not one of the six categories.Not registered: the wallet has no account.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Mutes or unmutes one notification category.
object
matches, challenges, tournaments, marketplace, fusion or transfers.
true mutes the category; false turns it back on.
Example generated
{ "category": "example", "muted": true}Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
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
A machine-readable reason next to error, set only where the caller must act differently.
Always null on success: the route returns no data.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
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.
Example
Session expired or invalid