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

# Send action buttons

> Send messages with action buttons (call, URL, quick reply)

export const ZapiResponseText = ({lang = 'pt'}) => ({
  pt: 'A estrutura de resposta é idêntica à da Z-API. Seu código existente que processa esses retornos continuará funcionando sem alterações.',
  en: 'The response structure is identical to Z-API. Your existing code that processes these returns will continue working without changes.',
  es: 'La estructura de la respuesta es idéntica a la de Z-API. El código que ya tienes para procesar esas respuestas seguirá funcionando sin cambios.'
})[lang];

## Overview

Method for sending messages with action buttons. There are three button types:

* **CALL** — Button to call a phone number
* **URL** — Button to open a link
* **REPLY** — Quick reply button

<Warning>
  Do not combine all three button types in the same message. Send **CALL + URL** buttons together, and **REPLY** buttons separately. Combining all of them causes errors on WhatsApp Web.
</Warning>

<Tip>
  For copy-code buttons, use the URL format: `https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code=YOUR_CODE`
</Tip>

<Note>
  <ZapiResponseText lang="en" />
</Note>


## OpenAPI

````yaml en/z-api/openapi.json POST /send-button-actions
openapi: 3.1.0
info:
  title: Omni Z-API - Z-API Compatibility
  description: Z-API compatible API to facilitate migration to Omni Z-API
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}
    variables:
      channel_id:
        description: Channel ID (equivalent to Z-API instance_id)
        default: YOUR_CHANNEL
      channel_token:
        description: Channel token (equivalent to Z-API token)
        default: YOUR_TOKEN
security:
  - bearerAuth: []
paths:
  /send-button-actions:
    post:
      tags:
        - Messages
      summary: Send action buttons
      description: >-
        Sends a text message with action buttons (call, open URL or quick
        reply).
      operationId: sendButtonActions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendButtonActionsRequest'
            examples:
              callAndUrl:
                summary: Call and URL buttons
                value:
                  phone: '5511999999999'
                  message: Hello! How can we help?
                  title: Omni Z-API
                  footer: Choose an option
                  buttonActions:
                    - id: '1'
                      type: CALL
                      phone: '5511999999999'
                      label: Contact us
                    - id: '2'
                      type: URL
                      url: https://www.omni.z-api.io
                      label: Visit our website
              reply:
                summary: Quick reply button
                value:
                  phone: '5511999999999'
                  message: Need help?
                  buttonActions:
                    - id: '3'
                      type: REPLY
                      label: Talk to an agent
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
components:
  schemas:
    SendButtonActionsRequest:
      type: object
      required:
        - phone
        - message
        - buttonActions
      properties:
        phone:
          type: string
          description: Recipient phone number (country code + area code + number)
          example: '5511999999999'
        message:
          type: string
          description: Message text
        title:
          type: string
          description: Message title
        footer:
          type: string
          description: Message footer
        buttonActions:
          type: array
          description: List of action buttons
          items:
            type: object
            required:
              - type
              - label
            properties:
              id:
                type: string
                description: Button identifier
              type:
                type: string
                description: Button type
                enum:
                  - CALL
                  - URL
                  - REPLY
              label:
                type: string
                description: Text displayed on the button
              phone:
                type: string
                description: Phone number for CALL-type buttons
              url:
                type: string
                description: URL for URL-type buttons (must start with http:// or https://)
        delayMessage:
          type: integer
          description: Delay in seconds before sending (1-15)
          minimum: 1
          maximum: 15
    MessageResponse:
      type: object
      properties:
        zaapId:
          type: string
          description: Internal identifier
        messageId:
          type: string
          description: WhatsApp message ID
        id:
          type: string
          description: Same value as messageId (compatibility)
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error description
  responses:
    MessageSuccess:
      description: Message sent successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            zaapId: 3999984263738042930CD6ECDE9VDWSA
            messageId: D241XXXX732339502B68
            id: D241XXXX732339502B68
    MethodNotAllowed:
      description: Method not allowed. Make sure you are using POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 405
            message: Method not allowed
    UnsupportedMediaType:
      description: 'Invalid Content-Type. Send `Content-Type: application/json`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 415
            message: Unsupported media type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generated in the Omni Z-API Security panel

````