Notifications
Delivery channels and per-type preferences.
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
| Operation | What it does | Auth |
|---|---|---|
GET/ | List the notification types with their default channels. Cursor-paginated. | Token |
GET/ | Read the matrix of types by channels. | Token |
PUT/ | Switch cells on or off. | Token and username |
GET/ | List the channels and whether each can reach you now. | Token |
POST/ | Start connecting a messaging app. Answers 201. | Token and username |
DELETE/ | 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"{
"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:
{
"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,telegramandwechat.email,telegramandwhatsappdeliver.availableisfalsewhen a channel cannot deliver yet, as withwechat, or withwhatsappuntil Meta approves its message template. OnGET /api/v1/notifications/channels,price_alerts_availablesays whether price alerts can go out on that channel now. Forwhatsappit isfalsewhile Meta has paused or recategorized the price-alert template, even whenavailableistruebecause the summaries still send. - Email needs no setup. It is
connectedfrom the start. Asking to connect or disconnect it answers422notification_channel_not_connectable. - WhatsApp. It comes with any paid plan.
lockedistrueon 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 answers403notification_channel_locked, with thechanneland thecapability(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/connectanswers201with adeep_link(ahttps://wa.me/...link with the text filled in) andexpires_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 pollGET /api/v1/notifications/channelsuntilwhatsappisconnected. The customer can stop any time: replySTOPin WhatsApp or disconnect. - Connecting Telegram. The
deep_linkis single-use. It works for 10 minutes, andexpires_atsays when it stops. After that, ask for a new one. A channel that cannot deliver right now answers422notification_channel_unavailable. - Connected details. A connected channel shows
display_nameandconnected_at. Both arenullwhen 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
422notification_channel_unknown. - Preference cells. A cell you never set shows the type's default.
PUTtakespreferences, 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_keyanswers404notification_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
422notification_channel_unknownornotification_channel_unavailable. The last one listsavailable_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_suppressionisbouncewhen the address bounced, orspamwhen you marked our email as spam. It isnullwhen email works. Turning an email cell on clearsspam. - Types. Each type has a stable
key, alabel,default_channels, and aschedule_kindofhourly,dailyorevent. An event is sent when something happens. Fordaily,send_hour_localis 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 isnullwhen every plan does. See Plans and limits. - Paging.
limiton 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
| Code | Status | When |
|---|---|---|
notification_channel_unknown | 422 | The channel name is not one Renzo knows. |
notification_channel_not_connectable | 422 | The channel needs no connection step, such as email. |
notification_channel_unavailable | 422 | The 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_locked | 403 | The channel, such as WhatsApp, needs a paid plan. |
notification_type_not_found | 404 | No notification type has this key. |
profile_incomplete | 409 | The account has no username yet. |
Sign-in and request errors, such as token_expired and validation_failed, can come from any call. See Errors.