Automattic Telegram Bot API

The telegram-bot API from Automattic — 8 operation(s) for telegram-bot.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /wpcom/v2/telegram-bot/assistant-webhook/{assistant_bot} Set a Telegram webhook for an assistant bot · POST /wpcom/v2/telegram-bot/assistant-webhook/{assistant_bot} #
Ask an LLM
“How do I point a Telegram bot at the WordPress.com assistant webhook?”
“Can I set a webhook for an assistant bot by its assistant bot ID?”
Tell an agent
Set the Telegram webhook for assistant bot {assistant_bot}.
Point assistant bot {assistant_bot} at its webhook endpoint.
POST /wpcom/v2/telegram-bot/connect Connect a Telegram user to WordPress.com · POST /wpcom/v2/telegram-bot/connect #
Ask an LLM
“How do I link a Telegram user to my WordPress.com site?”
“What Telegram data does the connect call need, like auth date and hash?”
Tell an agent
Connect Telegram user {id} with auth date {auth_date} and hash {hash}.
Link Telegram user {id} named {first_name} {last_name} with hash {hash} and auth date {auth_date}.
POST /wpcom/v2/telegram-bot/connect-via-token Connect a Telegram user by token · POST /wpcom/v2/telegram-bot/connect-via-token #
Ask an LLM
“Can I connect a Telegram user using a token instead of a hash?”
“What token and timestamp do I send to link a Telegram user?”
Tell an agent
Connect Telegram user {telegram_id} with token {token} and timestamp {ts}.
Link Telegram user {telegram_id} to bot {bot} using token {token} and timestamp {ts}.
POST /wpcom/v2/telegram-bot/disconnect Disconnect the Telegram user · POST /wpcom/v2/telegram-bot/disconnect #
Ask an LLM
“How do I unlink the Telegram user from WordPress.com?”
“Can I disconnect the Telegram user from my site?”
Tell an agent destructive · confirm first
Disconnect the Telegram user.
Unlink my Telegram account from WordPress.com.
GET /wpcom/v2/telegram-bot/local-agent-poll Poll the local Telegram agent · GET /wpcom/v2/telegram-bot/local-agent-poll #
Ask an LLM
“How do I poll the local Telegram agent for messages?”
“Can my bot fetch Telegram messages from the local agent?”
Tell an agent
Poll the local Telegram agent.
Fetch pending Telegram messages from the local agent.
POST /wpcom/v2/telegram-bot/local-agent-respond Respond to a Telegram message · POST /wpcom/v2/telegram-bot/local-agent-respond #
Ask an LLM
“How do I reply to a Telegram message from the local agent?”
“Can I send a captioned reply to a Telegram message?”
Tell an agent
Respond to Telegram message {message_id} in chat {chat_id} with {text}.
Send a captioned reply {caption} to Telegram message {message_id} in chat {chat_id}.
GET /wpcom/v2/telegram-bot/status Check the Telegram bot status · GET /wpcom/v2/telegram-bot/status #
Ask an LLM
“Is the Telegram bot connected and online?”
“What is the current status of my Telegram bot?”
Tell an agent
Get the Telegram bot status.
Check whether the Telegram bot is connected.
POST /wpcom/v2/telegram-bot/webhook/{bot} Set a Telegram bot webhook · POST /wpcom/v2/telegram-bot/webhook/{bot} #
Ask an LLM
“How do I send my WordPress.com site's Telegram bot a webhook URL?”
“Can I point a Telegram bot at a callback URL?”
Tell an agent
Set the Telegram bot webhook {bot}.
Point Telegram bot {bot} at my callback URL.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/automattic:automattic-telegram-bot-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

automattic-telegram-bot-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WordPress.com REST API — wpcom/v2 namespace Telegram Bot API
  version: v2
  description: Derived by API Evangelist from the WordPress.com REST API route index published at https://public-api.wordpress.com/wpcom/v2/. Paths, HTTP methods, and parameter names/types/descriptions/defaults are taken verbatim from that index. Response schemas are not published in the route index, so successful responses are described but not schematised; the error envelope was observed live on public-api.wordpress.com.
  contact:
    name: Automattic
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/wpcom/v2/
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com
security:
- bearerAuth: []
tags:
- name: Telegram Bot
paths:
  /wpcom/v2/telegram-bot/assistant-webhook/{assistant_bot}:
    post:
      operationId: postWpcomV2TelegramBotAssistantWebhookbyAssistantBot
      summary: POST /wpcom/v2/telegram-bot/assistant-webhook/{assistant_bot}
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: assistant_bot
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/telegram-bot/connect:
    post:
      operationId: postWpcomV2TelegramBotConnect
      summary: POST /wpcom/v2/telegram-bot/connect
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                auth_date:
                  type: integer
                hash:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                username:
                  type: string
                photo_url:
                  type: string
              required:
              - id
              - auth_date
              - hash
  /wpcom/v2/telegram-bot/connect-via-token:
    post:
      operationId: postWpcomV2TelegramBotConnectViaToken
      summary: POST /wpcom/v2/telegram-bot/connect-via-token
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                telegram_id:
                  type: integer
                token:
                  type: string
                ts:
                  type: integer
                bot:
                  type: string
              required:
              - telegram_id
              - token
              - ts
  /wpcom/v2/telegram-bot/disconnect:
    post:
      operationId: postWpcomV2TelegramBotDisconnect
      summary: POST /wpcom/v2/telegram-bot/disconnect
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/telegram-bot/local-agent-poll:
    get:
      operationId: getWpcomV2TelegramBotLocalAgentPoll
      summary: GET /wpcom/v2/telegram-bot/local-agent-poll
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/telegram-bot/local-agent-respond:
    post:
      operationId: postWpcomV2TelegramBotLocalAgentRespond
      summary: POST /wpcom/v2/telegram-bot/local-agent-respond
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chat_id:
                  type: integer
                text:
                  type: string
                caption:
                  type: string
                bot:
                  type: string
                action:
                  type: string
                  enum:
                  - create
                  - edit
                  - delete
                  - chat_action
                  default: create
                message_id:
                  type: integer
              required:
              - chat_id
              - bot
  /wpcom/v2/telegram-bot/status:
    get:
      operationId: getWpcomV2TelegramBotStatus
      summary: GET /wpcom/v2/telegram-bot/status
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/telegram-bot/webhook/{bot}:
    post:
      operationId: postWpcomV2TelegramBotWebhookbyBot
      summary: POST /wpcom/v2/telegram-bot/webhook/{bot}
      tags:
      - Telegram Bot
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: bot
        in: path
        required: true
        schema:
          type: string
components:
  schemas:
    WPRestError:
      type: object
      description: WordPress REST API error envelope (observed on public-api.wordpress.com).
      properties:
        code:
          type: string
          example: rest_unauthorized
        message:
          type: string
          example: Authentication required.
        data:
          type: object
          properties:
            status:
              type: integer
              example: 401
  securitySchemes:
    oauth2:
      type: oauth2
      description: WordPress.com OAuth 2.1, per https://public-api.wordpress.com/.well-known/openid-configuration
      flows:
        authorizationCode:
          authorizationUrl: https://public-api.wordpress.com/oauth2-1/authorize
          tokenUrl: https://public-api.wordpress.com/oauth2-1/token
          refreshUrl: https://public-api.wordpress.com/oauth2-1/token
          scopes:
            global: ''
            auth: ''
            openid: ''
            profile: ''
            email: ''
            users: ''
            sites: ''
            posts: ''
            comments: ''
            taxonomy: ''
            follow: ''
            sharing: ''
            freshly-pressed: ''
            notifications: ''
            insights: ''
            read: ''
            stats: ''
            media: ''
            menus: ''
            batch: ''
            videos: ''
    bearerAuth:
      type: http
      scheme: bearer