API Documentation

REST API for notifications via Telegram and Max. Subscribers, OTP, broadcasts, forms, helpdesk.

Subscriber permissions

Permissions are subscriber consent types. A user can be subscribed to "news" but not "marketing". Broadcasts are filtered by permission, and a subscriber can opt out of a specific type without unsubscribing entirely.

Creating a permission

A permission is created once per project. key is the machine identifier, title is the label shown to the subscriber.

key string required

Identifier: latin, digits, _

title string required

Label shown to the subscriber

POST /v1/permissions
{
"key": "marketing",
"title": "Marketing emails"
}

Filtering broadcasts by permission

Pass permission to /v1/broadcast — the message reaches only subscribers who have that permission (or those with no permissions set at all).

POST /v1/broadcast
{
"text": "20% off",
"permission": "marketing"
}

Opting out of a permission

Removing a permission from a subscriber is a partial unsubscribe. They stop receiving that broadcast type but stay active for the rest. A subscription.permission_changed webhook is sent.

DELETE /v1/subscribers/{subscriber_id}/permissions/marketing

Bulk removal — POST /v1/subscribers/{id}/permissions/bulk-remove with an array of keys. Current subscriber permissions — GET /v1/subscribers/{id}/permissions.

Related sections