---
title: "Create a new Telegram notification provider"
method: POST
path: "/notification-providers/telegram"
tags: ["Notification Providers"]
---

# Create a new Telegram notification provider

`POST /notification-providers/telegram`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/notification-providers/telegram`
- Auth: HTTP bearer

## Request body

- CreateTelegramProviderRequest
  - `config` TelegramConfig, required: Configuration for a Telegram notification provider (Telegram Bot API `sendMessage`). Request-side config. Not `Serialize`: `bot_token` is a `SecretString`; use [`TelegramConfig::into_stored_value`].
    - `bot_token` string, password, required: Bot token from @BotFather. Encrypted at rest and masked in normal API responses. Send `***` on update to keep the stored token.
    - `chat_id` union, required: Chat to post to: a numeric user, group or channel ID (`-100…` for supergroups and channels) or a public `@channelusername`. A JSON integer is accepted too.
      - string
      - integer
    - `message_thread_id` integer, nullable: Optional forum topic (`message_thread_id`) for forum-style groups.
  - `enabled` boolean, nullable
  - `name` string, required

## Response `201`

Successfully created Telegram provider

- NotificationProviderResponse
  - `config` unknown, required
  - `created_at` string, date-time, required
  - `enabled` boolean, required
  - `id` integer, required
  - `name` string, required
  - `provider_type` string, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid bot token, chat ID or topic ID
- `401`: Unauthorized
- `403`: Insufficient permissions
- `500`: Internal server error

## Changes

- **2026-11-26** `e1864d950604`: 2 breaking
  - the `created_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
  - the `updated_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
- **2026-11-20** `1ee5f7a30cde`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/notification-providers/telegram/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
