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

# Send text with buttons

> Send text messages with quick reply buttons

## Overview

Sends a text message with quick reply buttons. The `content.type` field must be `INTERACTIVE_BUTTON`. The recipient can choose from the presented options.

Optionally, you can include an **image** or **video** with the message using the `thumbnail` and `mimeType` fields inside `body`.

<Note>
  This endpoint only works when the [conversation window](/en/conversation-window) is open (24 hours).
</Note>


## OpenAPI

````yaml en/messages/openapi-interactive-button.json POST /v1/channels/{channelId}/messages
openapi: 3.1.0
info:
  title: Hub Message - Send Text with Buttons
  version: 1.0.0
servers:
  - url: https://api.hubmessage.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/messages:
    post:
      tags:
        - Messages
      summary: Send text with buttons
      description: Sends a text message with quick-reply buttons.
      operationId: sendInteractiveButtonMessage
      parameters:
        - name: channelId
          in: path
          required: true
          description: Channel ID
          schema:
            type: string
            example: YOUR_CHANNEL_ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendInteractiveButtonRequest'
            examples:
              text:
                summary: Text with buttons
                value:
                  recipient:
                    identifier: '5511999999999'
                  content:
                    type: INTERACTIVE_BUTTON
                    body:
                      message: How would you rate our service?
                    attachments:
                      - id: '1'
                        title: Excellent
                      - id: '2'
                        title: Good
                      - id: '3'
                        title: Average
              withImage:
                summary: With image
                value:
                  recipient:
                    identifier: '5511999999999'
                  content:
                    type: INTERACTIVE_BUTTON
                    body:
                      message: Check out our offer!
                      thumbnail: https://example.com/image.jpg
                      mimeType: image/jpeg
                    attachments:
                      - id: '1'
                        title: I'm interested
                      - id: '2'
                        title: No, thank you
              withVideo:
                summary: With video
                value:
                  recipient:
                    identifier: '5511999999999'
                  content:
                    type: INTERACTIVE_BUTTON
                    body:
                      message: Watch and choose
                      thumbnail: https://example.com/video.mp4
                      mimeType: video/mp4
                    attachments:
                      - id: '1'
                        title: Option A
                      - id: '2'
                        title: Option B
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SendInteractiveButtonRequest:
      type: object
      required:
        - recipient
        - content
      properties:
        recipient:
          type: object
          required:
            - identifier
          properties:
            identifier:
              type: string
              description: Recipient phone number (country code + area code + number)
              example: '5511999999999'
        content:
          type: object
          required:
            - type
            - body
            - attachments
          properties:
            type:
              type: string
              description: Message type
              enum:
                - INTERACTIVE_BUTTON
            body:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
                  description: Message text
                thumbnail:
                  type: string
                  description: URL of an image or video (optional)
                  nullable: true
                mimeType:
                  type: string
                  description: Thumbnail media type (e.g. image/jpeg, video/mp4)
            attachments:
              type: array
              description: List of quick-reply buttons (maximum 3)
              items:
                type: object
                required:
                  - id
                  - title
                properties:
                  id:
                    type: string
                    description: Button identifier
                  title:
                    type: string
                    description: Text displayed on the button
    MessageResponse:
      type: object
      properties:
        messageId:
          type: string
          description: Sent message ID
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
  responses:
    MessageSuccess:
      description: Message sent successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            messageId: wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0
    Unauthorized:
      description: Invalid or missing token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generated in the Hub Message Security panel

````