notifications

Receive notifications for activity on your account or statuses.

Get all notifications

GET https://mastodon.example/api/v1/notifications

Notifications concerning the user. This API returns Link headers containing links to the next/previous page. However, the links can also be constructed dynamically using query params and id values. Returns: Array of Notification OAuth: User token + read:notifications Version history: 0.0.0 - added 2.6.0 - add min_id 2.9.0 - add account_id

Query Parameters

Name
Type
Description

max_id

string

Return results older than this ID

since_id

string

Return results newer than this ID

min_id

string

Return results immediately newer than this ID

limit

string

Maximum number of results to return (default 20)

exclude_types

array

Array of types to exclude (follow, favourite, reblog, mention, poll)

account_id

string

Return only notifications received from this account

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Get a single notification

GET https://mastodon.example/api/v1/notifications/:id

View information about a notification with a given ID. Returns: Notification OAuth: User token + read:notifications Version history: 0.0.0 - added

Path Parameters

Name
Type
Description

:id

string

ID of the notification in the database.

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Dismiss all notifications

POST https://mastodon.example/api/v1/notifications/clear

Clear all notifications from the server. Returns: empty object OAuth: User token + write:notifications Version history: 0.0.0 - added

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Dismiss a single notification

POST https://mastodon.example/api/v1/notifications/:id/dismiss

Clear a single notification from the server. Returns: empty object OAuth: User token + write:notifications Version history: 1.3.0 - added

Path Parameters

Name
Type
Description

:id

string

ID of the notification to be cleared

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

(DEPRECATED) Dismiss a single notification

POST https://mastodon.example/api/v1/notifications/dismiss

Delete a single notification from the server. Returns: empty object OAuth: User token + write:notifications Version history: 0.0.0 - available 3.0.0 - removed

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Request Body

Name
Type
Description

id

string

ID of the notification to be cleared, passed as a parameter

Last updated

Was this helpful?