RenzoDocs

Notifications

Delivery channels and per-type preferences.

View as Markdown

Renzo sends messages, such as market summaries and price alerts, by email, Telegram and WhatsApp. These calls let a customer see the channels, connect Telegram or WhatsApp, and choose which types arrive on which channel. Every call needs a token. Calls that change something also need a username.

Endpoints

OperationWhat it doesAuth
GET/api/v1/notifications/typesList the notification types with their default channels. Cursor-paginated.Token
GET/api/v1/notifications/preferencesRead the matrix of types by channels.Token
PUT/api/v1/notifications/preferencesSwitch cells on or off.Token and username
GET/api/v1/notifications/channelsList the channels and whether each can reach you now.Token
POST/api/v1/notifications/channels/{channel}/connectStart connecting a messaging app. Answers 201.Token and username
DELETE/api/v1/notifications/channels/{channel}Disconnect a messaging app. Answers 204.Token and username

Without a username, calls that need one answer 409 profile_incomplete. See Account. Any mutating call accepts an Idempotency-Key. See Idempotency.

Example: turn on Telegram for a summary

First connect Telegram. The answer is 201 with a single-use link:

curl -X POST "$BASE/api/v1/notifications/channels/telegram/connect" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "channel": "telegram",
  "deep_link": "https://t.me/RenzoAlertsBot?start=Zk3p9QxT2mVw",
  "expires_at": "2026-11-04T13:40:00Z"
}

Open deep_link in Telegram and press Start. Then switch the type on for that channel:

curl -X PUT "$BASE/api/v1/notifications/preferences" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"preferences": [{"type_key": "market.pre_market_summary", "channel": "telegram", "enabled": true}]}'

The answer is 200 with the whole matrix:

Response
{
  "channels": ["email", "whatsapp", "telegram", "wechat"],
  "types": [
    {
      "type_key": "market.pre_market_summary",
      "label": "Pre-market summary",
      "description": "A short summary of the markets before the US open.",
      "channels": [
        { "channel": "email", "available": true, "connected": true, "enabled": true, "locked": false },
        { "channel": "whatsapp", "available": true, "connected": false, "enabled": false, "locked": true },
        { "channel": "telegram", "available": true, "connected": true, "enabled": true, "locked": false },
        { "channel": "wechat", "available": false, "connected": false, "enabled": false, "locked": false }
      ]
    }
  ],
  "email_suppression": null
}

Rules and edge cases

  • Channels. The names are email, whatsapp, telegram and wechat. email, telegram and whatsapp deliver. available is false when a channel cannot deliver yet, as with wechat, or with whatsapp until Meta approves its message template. On GET /api/v1/notifications/channels, price_alerts_available says whether price alerts can go out on that channel now. For whatsapp it is false while Meta has paused or recategorized the price-alert template, even when available is true because the summaries still send.
  • Email needs no setup. It is connected from the start. Asking to connect or disconnect it answers 422 notification_channel_not_connectable.
  • WhatsApp. It comes with any paid plan. locked is true on a cell or channel when the caller is on the free plan. WhatsApp carries price alerts and the pre-market and post-market summaries only. Connecting or turning it on from the free plan answers 403 notification_channel_locked, with the channel and the capability (notifications.whatsapp) in the body. A customer who loses Premium keeps the WhatsApp cells as set, but nothing is queued for WhatsApp until Premium returns.
  • Connecting WhatsApp. POST .../channels/whatsapp/connect answers 201 with a deep_link (a https://wa.me/... link with the text filled in) and expires_at. The customer must open it and press Send in WhatsApp. Renzo connects the account when that message arrives. There is no redirect back, so poll GET /api/v1/notifications/channels until whatsapp is connected. The customer can stop any time: reply STOP in WhatsApp or disconnect.
  • Connecting Telegram. The deep_link is single-use. It works for 10 minutes, and expires_at says when it stops. After that, ask for a new one. A channel that cannot deliver right now answers 422 notification_channel_unavailable.
  • Connected details. A connected channel shows display_name and connected_at. Both are null when nothing is linked.
  • Disconnecting. Delivery stops at once and the linked account is forgotten. Disconnecting twice is not an error. Price alerts that no chosen channel can reach any more are paused. See Price alerts.
  • Unknown channel. A channel name Renzo does not know answers 422 notification_channel_unknown.
  • Preference cells. A cell you never set shows the type's default. PUT takes preferences, a list of {type_key, channel, enabled}. Cells you leave out keep their value. The answer is the whole matrix.
  • Unknown type. An unknown type_key answers 404 notification_type_not_found.
  • Unavailable channel. Connecting a channel that cannot connect now, or turning a cell on for a channel that is unknown or cannot deliver answers 422 notification_channel_unknown or notification_channel_unavailable. The last one lists available_channels. On connect it holds the messaging channels that can be connected now. On a preference it holds the channels that work for that type, so a type that WhatsApp does not carry names the others.
  • Email problems. email_suppression is bounce when the address bounced, or spam when you marked our email as spam. It is null when email works. Turning an email cell on clears spam.
  • Types. Each type has a stable key, a label, default_channels, and a schedule_kind of hourly, daily or event. An event is sent when something happens. For daily, send_hour_local is the hour (0 to 23) in your time zone. Types are managed by Renzo, so the list can grow.
  • Plan. A type may have min_product, the lowest plan that gets it. It is null when every plan does. See Plans and limits.
  • Paging. limit on the types list defaults to 20 and may not pass 100. See Pagination.
  • Messages. Email messages carry an unsubscribe link. See Email unsubscribe. Price alert messages carry a stop link. See Price alerts.

Errors

CodeStatusWhen
notification_channel_unknown422The channel name is not one Renzo knows.
notification_channel_not_connectable422The channel needs no connection step, such as email.
notification_channel_unavailable422The channel cannot deliver right now, or does not carry this type. The body lists available_channels: on connect, the channels that can be connected now; on a preference, the channels that carry that type.
notification_channel_locked403The channel, such as WhatsApp, needs a paid plan.
notification_type_not_found404No notification type has this key.
profile_incomplete409The account has no username yet.

Sign-in and request errors, such as token_expired and validation_failed, can come from any call. See Errors.

Reference

On this page