---
title: "Subscribe"
method: POST
path: "/subscriptions"
tags: ["subscriptions"]
---

# Subscribe

`POST /subscriptions`

## Request

- Base URL: `https://botapi.tamtam.chat`
- URL: `https://botapi.tamtam.chat/subscriptions`
- Auth: API key in query parameter `access_token`

Subscribes bot to receive updates via WebHook. After calling this method, the bot will receive notifications about new events in chat rooms at the specified URL.

Your server **must** be listening on one of the following ports: **80, 8080, 443, 8443, 16384-32383**

## Request body

- SubscriptionRequestBody: Request to set up WebHook subscription
  - `url` string, required: URL of HTTP(S)-endpoint of your bot. Must starts with http(s)://
  - `update_types` string[]: List of update types your bot want to receive. See `Update` object for a complete list of types
  - `version` string: Version of API. Affects model representation

## Response `200`

Success or not result

- SimpleQueryResult: Simple response to request
  - `success` boolean, required: `true` if request was successful. `false` otherwise
  - `message` string: Explanatory message if the result is not successful

## Other responses

- `401`: Authorization Error. No `access_token` provided or token is invalid
- `500`: Internal Server Error

---

[API](https://skmtc.dev/tamtam/apis/tamtam-bot-api.md) - [All operations](https://skmtc.dev/tamtam/apis/tamtam-bot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tamtam/apis/tamtam-bot-api/revisions/fa85402ea716?raw)
