---
title: "Set webhook"
method: POST
path: "/bot/setWebhook"
tags: ["Bot"]
---

# Set webhook

`POST /bot/setWebhook`

Enables or replaces webhook delivery for the same pending-update queue.

## Headers

- `authorization` string, required

## Request body

- SetWebhookInput
  - `url` string, required
  - `secret_token` string
  - `message_trigger` 'all' | 'mentions'
  - `allowed_updates` BotUpdateKey[]
  - `drop_pending_updates` boolean

## Response `200`

BotTrueSuccess

- BotTrueSuccess
  - `ok` true, required — Always true for a successful request.
  - `result` true, required — Method-specific response payload.

## Other responses

- `400` — The request parameters are missing or invalid.
- `401` — The bot token is missing or invalid.
- `403` — The bot is not allowed to perform this action.
- `404` — The requested method or resource was not found.
- `500` — The server could not complete the request.

## Changes

- **2026-08-25** `d19edad47c57` — 1 breaking
  - removed the enum value `deleted_messages` of the request property `allowed_updates/items/`
- **2026-08-17** `b6346dfdb79c` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/changes/bot/setWebhook/post.md)

---

[API](https://skmtc.dev/inline/apis/inline-bot-http-api-docs.md) · [All operations](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inline/inline-bot-http-api-docs/revisions/69017b8dc5fe/schema)
