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

# Edit Telegram message

> Edit the text of a message already sent (when allowed).



## OpenAPI

````yaml /en/telegram-api/api-reference/openapi-telegram.json patch /v1/telegram/messages/{messageId}/edit
openapi: 3.0.3
info:
  title: Notifique API — Telegram
  description: >-
    Send Telegram messages and manage connections. Authenticate with
    `Authorization: Bearer sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfTgBearerAuth: []
  - ntfTgApiKeyHeader: []
tags:
  - name: Messages
    description: Send and manage messages
  - name: Instances
    description: Create and connect bots or USER accounts
  - name: Chats
    description: List chats
paths:
  /v1/telegram/messages/{messageId}/edit:
    patch:
      tags:
        - Mensagens
      summary: Edit Telegram message
      description: Edit the text of a message already sent (when allowed).
      operationId: ntfTg_patchV1TelegramMessageEdit
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
              properties:
                text:
                  type: string
                  minLength: 1
                  description: >-
                    Novo texto (limite alinhado ao permitido para mensagens de
                    texto no produto).
            example:
              message: Texto corrigido
      responses:
        '200':
          description: Text atualizado no Telegram e registro marcado como editado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_MessageIdStatusResponse'
              example:
                success: true
                data:
                  messageId: clxx_msg
                  status: EDITED
        '400':
          description: >-
            Validação, tipo incompatível, moderação de conteúdo, instance
            inativa ou recusa do Telegram.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Bad Request
                message: Só é possível editar mensagens de texto.
                code: BAD_REQUEST
        '401':
          description: Chave ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '403':
          description: Sem escopo ou instance não permitida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Forbidden
                message: 'Missing scope: telegram:update'
                code: FORBIDDEN
        '404':
          description: Message não encontrada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Not Found
                message: Message not found
                code: NOT_FOUND
components:
  schemas:
    NtfTg_MessageIdStatusResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            messageId:
              type: string
            status:
              type: string
              enum:
                - DELETED
                - CANCELLED
                - EDITED
    NtfTg_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Message legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Responses de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - error
        - message
        - code
  securitySchemes:
    ntfTgBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Authorization: Bearer sk_live_xxxxx'
    ntfTgApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````