Bot API

Bot API Docs

Публичный справочник по owner-side управлению и bot-token runtime endpoint-ам.

Каналы бота
Bot tokenGET/v1/bot-api/channels

Список каналов, доступных текущему bot token.

Авторизация: Bearer bot token

Статусы
200Список каналов, доступных текущему bot token.
401Missing or invalid bearer token.
429Rate limit exceeded.
curl
curl -H "Authorization: Bearer <bot_token>" https://api.yullama.ru/v1/bot-api/channels
JSON response
{
  "items": [
    {
      "bot_role": "moderator",
      "created_at": "2026-04-21T10:00:00Z",
      "description": "Owned channel for bot publishing",
      "id": "22d6...",
      "slug": "news-russia",
      "title": "News Russia"
    }
  ]
}
Создать пост в канале
Bot tokenPOST/v1/bot-api/channels/{id}/posts

Публикует пост от имени бота в привязанный канал.

Авторизация: Bearer bot token

Параметры
idpath · requiredAttached channel identifier.
Статусы
201Публикует пост от имени бота в привязанный канал.
400Malformed input or invalid parameter value.
401Missing or invalid bearer token.
403Authenticated but not allowed to perform this action.
429Rate limit exceeded.
curl
curl -X POST https://api.yullama.ru/v1/bot-api/channels/<channel_id>/posts \
  -H "Authorization: Bearer <bot_token>" \
  -H "Content-Type: application/json" \
  -d '{"body":"Bot API production news update"}'
JSON request
{
  "body": "Bot API production news update"
}
JSON response
{
  "author_username": "newsbot_russia_v1",
  "body": "Bot API production news update",
  "channel_id": "22d6...",
  "created_at": "2026-04-21T10:55:00Z",
  "id": "90ab..."
}
Текущий бот
Bot tokenGET/v1/bot-api/me

Возвращает identity текущего бота по bot token.

Авторизация: Bearer bot token

Статусы
200Возвращает identity текущего бота по bot token.
401Missing or invalid bearer token.
429Rate limit exceeded.
curl
curl -H "Authorization: Bearer <bot_token>" https://api.yullama.ru/v1/bot-api/me
JSON response
{
  "bot_user_id": "b63c...",
  "display_name": "News Bot Russia",
  "id": "7f9d...",
  "username": "newsbot_russia_v1"
}
Получить updates polling-ом
Bot tokenGET/v1/bot-api/updates

Забирает bot events через offset/limit/timeout polling.

Авторизация: Bearer bot token

Параметры
offsetquery · optionalReturn updates with `update_id > offset`.
limitquery · optionalMaximum number of items to return.
timeoutquery · optionalLong polling timeout in seconds. Current maximum is 30 seconds.
Статусы
200Забирает bot events через offset/limit/timeout polling.
400Malformed input or invalid parameter value.
401Missing or invalid bearer token.
429Rate limit exceeded.
curl
curl -H "Authorization: Bearer <bot_token>" "https://api.yullama.ru/v1/bot-api/updates?offset=0&limit=50&timeout=30"
JSON response
{
  "items": [
    {
      "created_at": "2026-04-21T10:42:00Z",
      "event_type": "channel.post_created",
      "payload": {
        "body": "Owner published to channel",
        "channel_id": "22d6...",
        "post_id": "90ab..."
      },
      "update_id": 41
    }
  ]
}