Menu

Notifications

Notices of the account and the settings of the emails it gets.

OperationMethod and path
The caller's notifications, newest firstGET /notifications
Which kinds of email the account receivesGET /notifications/preferences
Choose which kinds of email the account receivesPUT /notifications/preferences
Mark notifications readPOST /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.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:read
Chargedno

Parameters

NameInTypeRequiredDescription
cursorquerystringnothe next_cursor of the previous page
limitqueryintegernoa positive integer
unread_onlyquerybooleannotrue or false

Answer 200 (NotificationFeed): the result

  • notifications, array of objects, required
    • body, string, required — the text, as it was mailed
    • params, object, required — the facts the text was written from, by name
    • id, string, required
    • title, string, required
    • template, string, required — what the notification is about, for software to match on (a fixed id such as security-email-changed)
    • created_at, string, required
    • read_at, string or null, required — when it was marked read; null while unread
    • category, string, required — the topic it belongs to, such as security, account or billing
    • mail_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 of pending, sent, failed, undeliverable, none)
  • next_cursor, string or null
  • unread_count, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/notifications' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird notifications):

$ weird notifications

MCP: 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.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:read
Chargedno

Answer 200 (NotificationPreferences): the result

  • categories, array of objects, required
    • id, string, required (one of service, announcements, newsletter, marketing)
    • description, string, required — what the category holds
    • switchable, boolean, required — false: it cannot be turned off (service)
    • default, boolean, required — what applies until the customer chooses
    • enabled, boolean, required — whether its emails reach the account now
    • changed_at, string or null — when the customer last chose; null: never
    • source, 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):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (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 preferences

MCP: 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.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:write
Chargedno

Request body (SetNotificationPreferences):

  • preferences, object, required
    • announcements, boolean
    • newsletter, boolean
    • marketing, boolean

Answer 200 (NotificationPreferences): the result

  • categories, array of objects, required
    • id, string, required (one of service, announcements, newsletter, marketing)
    • description, string, required — what the category holds
    • switchable, boolean, required — false: it cannot be turned off (service)
    • default, boolean, required — what applies until the customer chooses
    • enabled, boolean, required — whether its emails reach the account now
    • changed_at, string or null — when the customer last chose; null: never
    • source, 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):

StatusCodesWhen
400invalid-paramsinvalid-params (field preferences; preferences.service with reason not-switchable; preferences.<name> with reason unknown-category, or a value that is not true or false)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (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.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissionnotifications:write
Chargedno

Request body (MarkNotificationsRead):

  • ids, array of strings (0 to 1000 items)

Answer 200 (NotificationsMarked): the result

  • marked, integer, required
  • unread_count, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (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…]

MCP: weird_notifications_mark_read.

This page is generated from the API's public document; it changes when the document does.