---
title: "Register Telegram Webhook"
method: POST
path: "/v1/admin/telegram/register-webhook"
tags: ["telegram-webhook"]
---

# Register Telegram Webhook

`POST /v1/admin/telegram/register-webhook`

## Request

- Base URL: `https://api.storyflo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.storyflo.com/v1/admin/telegram/register-webhook`
- Auth: none declared

Idempotent one-shot setWebhook against Telegram.

Fires ``POST https://api.telegram.org/bot{TOKEN}/setWebhook`` with
the configured public URL + the secret-token. Operator hits this
once after rotating the secret (or on first install). Don't put
this in a startup hook — TG rate-limits webhook re-registration
and we restart machines frequently.

Auth: standard ``X-Storyflo-Email-Token`` admin gate.

## Headers

- `x-storyflo-email-token` string, nullable

## Request body

- RegisterWebhookRequest: Body of POST /v1/admin/telegram/register-webhook.
  - `webhook_url` string, nullable: Full URL Telegram should POST updates to. Defaults to `https://api.storyflo.com/v1/telegram/webhook` (env override TELEGRAM_WEBHOOK_PUBLIC_URL).

## Response `200`

Successful Response

- RegisterWebhookResponse
  - `ok` boolean, required
  - `webhook_url` string, required
  - `telegram_response` object, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/storyflo/apis/storyflo-inference-router.md) · [All operations](https://skmtc.dev/storyflo/apis/storyflo-inference-router/llms.txt) · [OpenAPI document](https://skmtc.dev/storyflo/apis/storyflo-inference-router/revisions/c3a1a735ac7a?raw)
