Menu
Notifications
Notices of the account and the settings of the emails it gets.
| Operation | Method and path |
|---|---|
| The caller's notifications, newest first | GET /notifications |
| Which kinds of email the account receives | GET /notifications/preferences |
| Choose which kinds of email the account receives | PUT /notifications/preferences |
| Mark notifications read | POST /notifications/read |
The caller's notifications, newest first#
GET /notifications · operation listNotifications
The account's notifications, newest first: notifications (each id, template, category, title, body, params, read_at (null while unread), created_at, mail_status), next_cursor (pass it as cursor for the next page; null on the last) and unread_count. unread_only true lists the unread ones alone. Mark them read with POST /notifications/read. Changes nothing. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | notifications:read |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string | no | the next_cursor of the previous page |
limit | query | integer | no | a positive integer |
unread_only | query | boolean | no | true or false |
Answer 200 (NotificationFeed): the result
notifications, array of objects, requiredbody, string, required — the text, as it was mailedparams, object, required — the facts the text was written from, by nameid, string, requiredtitle, string, requiredtemplate, string, required — what the notification is about, for software to match on (a fixed id such assecurity-email-changed)created_at, string, requiredread_at, string or null, required — when it was marked read; null while unreadcategory, string, required — the topic it belongs to, such assecurity,accountorbillingmail_status, string, required — the email of it: pending (waiting to be sent), sent, failed (not sent after every attempt), undeliverable (no address known to send it to), none (never mailed) (one ofpending,sent,failed,undeliverable,none)
next_cursor, string or nullunread_count, integer, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (a field is wrong: field names it) |
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (try again later) |
Example
curl -X GET 'https://api.weird.ro/notifications' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird notifications):
$ weird notificationsMCP: weird_notifications.
Which kinds of email the account receives#
GET /notifications/preferences · operation getNotificationPreferences
Each message category with id, description, switchable, default, enabled (whether its emails reach the account now), changed_at and source (where the last choice came from; null: never chosen, the default applies). service: notices about the account and its services (billing, security, domains, servers); they cannot be turned off. announcements: news about the platform's products; on unless turned off. newsletter and marketing: off until the customer turns them on. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | notifications:read |
| Charged | no |
Answer 200 (NotificationPreferences): the result
categories, array of objects, requiredid, string, required (one ofservice,announcements,newsletter,marketing)description, string, required — what the category holdsswitchable, boolean, required — false: it cannot be turned off (service)default, boolean, required — what applies until the customer choosesenabled, boolean, required — whether its emails reach the account nowchanged_at, string or null — when the customer last chose; null: neversource, string or null — where the last choice came from:customer-api(the account settings or the API),unsubscribe-link(an email's link),import(the move from the previous platform), or a change support made
changed, array of strings — on a change: the categories this call changed
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (try again later) |
Example
curl -X GET 'https://api.weird.ro/notifications/preferences' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird notifications preferences):
$ weird notifications preferencesMCP: weird_notification_preferences.
Choose which kinds of email the account receives#
PUT /notifications/preferences · operation setNotificationPreferences
preferences: an object of category -> true or false, for announcements, newsletter and marketing (at least one); a category left out keeps its choice. Turning on newsletter or marketing is recorded as the customer's consent, with the time, the client address and the user agent. service notices cannot be turned off (400). Answers every category as GET /notifications/preferences does, plus changed: the categories this call changed. Change any choice back the same way. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | notifications:write |
| Charged | no |
Request body (SetNotificationPreferences):
preferences, object, requiredannouncements, booleannewsletter, booleanmarketing, boolean
Answer 200 (NotificationPreferences): the result
categories, array of objects, requiredid, string, required (one ofservice,announcements,newsletter,marketing)description, string, required — what the category holdsswitchable, boolean, required — false: it cannot be turned off (service)default, boolean, required — what applies until the customer choosesenabled, boolean, required — whether its emails reach the account nowchanged_at, string or null — when the customer last chose; null: neversource, string or null — where the last choice came from:customer-api(the account settings or the API),unsubscribe-link(an email's link),import(the move from the previous platform), or a change support made
changed, array of strings — on a change: the categories this call changed
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (field preferences; preferences.service with reason not-switchable; preferences.<name> with reason unknown-category, or a value that is not true or false) |
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (try again later) |
Example
curl -X PUT 'https://api.weird.ro/notifications/preferences' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"preferences":{}}'With the CLI (weird notifications preferences set):
$ weird notifications preferences set <kind> on|off [<kind> on|off…]MCP: weird_notification_preferences_set.
Mark notifications read#
POST /notifications/read · operation markNotificationsRead
Marks the notifications ids names (at most 1000, as GET /notifications lists them) read; without ids, every unread one. Answers marked and unread_count. Marking read again changes nothing; a notification cannot be marked unread. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | notifications:write |
| Charged | no |
Request body (MarkNotificationsRead):
ids, array of strings (0 to 1000 items)
Answer 200 (NotificationsMarked): the result
marked, integer, requiredunread_count, integer, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (a field is wrong: field names it) |
| 401 | unauthorized | unauthorized |
| 403 | insufficient-scope, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (try again later) |
Example
curl -X POST 'https://api.weird.ro/notifications/read' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'With the CLI (weird notifications read):
$ weird notifications read [id…]This page is generated from the API's public document; it changes when the document does.