> ## Documentation Index
> Fetch the complete documentation index at: https://developers.octaviatech.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish to Telegram

> Publish to Telegram.



## OpenAPI

````yaml POST /ai/social/telegram/publish
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /ai/social/telegram/publish:
    post:
      tags:
        - AI
      summary: Send a message to the connected Telegram chat
      description: >-
        Requires an active Telegram connection for the tenant. Sends via the
        bot's `sendMessage` to the stored `chatId`. `parseMode` defaults to
        HTML. Upstream Telegram failures are surfaced as 502.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - text
              properties:
                text:
                  type: string
                  minLength: 1
                  maxLength: 4096
                  description: Message body
                parseMode:
                  type: string
                  description: Telegram formatting mode for `text`
                  enum:
                    - Markdown
                    - MarkdownV2
                    - HTML
                  default: HTML
                disableWebPagePreview:
                  type: boolean
                  description: If true, suppresses link previews
            examples:
              Basic:
                value:
                  text: >-
                    <b>New article</b>: what intermittent fasting actually does
                    to your metabolism.
                  parseMode: HTML
                  disableWebPagePreview: false
      responses:
        '200':
          description: OK (sent)
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Published to Telegram
                data:
                  provider: telegram
                  messageId: 4711
                  chatId: -1001234567890
                  status: 200
        '401':
          description: Unauthorized
        '403':
          description: Forbidden (role not allowed)
        '404':
          description: Telegram connection not found for tenant
        '406':
          description: Validation failed, or the Telegram connection is incomplete
        '500':
          description: Failed to send to Telegram
        '502':
          description: Telegram API returned an error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````