> ## 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.

# Enviar botões de ação

> Envie mensagens com botões de ação (URL e ligar)

export const ChannelSupport = ({whatsapp = 'yes', web = 'yes', instagram = 'yes', messenger = 'yes', telegram = 'yes', lang = 'pt'}) => {
  const L = ({
    pt: {
      title: 'Disponibilidade por canal',
      win: 'No WhatsApp Oficial exige a janela de 24 horas aberta. Nos outros canais não há janela.',
      names: ['WhatsApp Oficial', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    },
    en: {
      title: 'Availability per channel',
      win: 'On WhatsApp Official it requires the 24-hour window to be open. The other channels have no window.',
      names: ['WhatsApp Official', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    },
    es: {
      title: 'Disponibilidad por canal',
      win: 'En WhatsApp Oficial exige que la ventana de 24 horas esté abierta. Los demás canales no tienen ventana.',
      names: ['WhatsApp Oficial', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    }
  })[lang];
  const mark = v => v === 'yes' ? '✅' : v === 'partial' ? '⚠️' : '❌';
  const vals = [whatsapp, web, instagram, messenger, telegram];
  return <div>
      <p><strong>{L.title}</strong></p>
      <table>
        <thead>
          <tr>{L.names.map(n => <th key={n} style={{
    textAlign: 'center'
  }}>{n}</th>)}</tr>
        </thead>
        <tbody>
          <tr>{vals.map((v, i) => <td key={i} style={{
    textAlign: 'center'
  }}>{mark(v)}</td>)}</tr>
        </tbody>
      </table>
      {whatsapp === 'yes' && <p>{L.win}</p>}
    </div>;
};

## Conceituação

Envia uma mensagem com botões de ação para um contato. O campo `content.type` deve ser `INTERACTIVE_ACTION`.

Tipos de botão disponíveis:

* **URL** — Abre um link ao clicar
* **CALL** — Liga para um número ao clicar

Os campos `header` e `footer` são opcionais.

<ChannelSupport lang="pt" />

<Note>
  Detalhes da regra do WhatsApp Oficial em [janela de conversa](/conversation-window). Veja a [matriz de capacidades](/channels/overview) para todos os canais.
</Note>


## OpenAPI

````yaml pt/messages/openapi-interactive-action.json POST /v1/channels/{channelId}/messages
openapi: 3.1.0
info:
  title: Omni Z-API - Enviar Botões de Ação
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/messages:
    post:
      tags:
        - Mensagens
      summary: Enviar botões de ação
      description: Envia uma mensagem com botões de ação (URL e/ou ligar).
      operationId: sendInteractiveActionMessage
      parameters:
        - name: channelId
          in: path
          required: true
          description: ID do canal
          schema:
            type: string
            example: SEU_CHANNEL_ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendInteractiveActionRequest'
            examples:
              urlAndCall:
                summary: URL + Ligar
                value:
                  recipient:
                    identifier: '5511999999999'
                  content:
                    type: INTERACTIVE_ACTION
                    body:
                      message: Como podemos ajudar?
                    header:
                      message: Omni Z-API
                    footer:
                      message: Escolha uma opção
                    attachments:
                      - id: '1'
                        title: Visite nosso site
                        name: URL
                        url: https://www.omni.z-api.io
                      - id: '2'
                        title: Fale conosco
                        name: CALL
                        phones:
                          - '5511999999999'
              urlOnly:
                summary: Apenas URL
                value:
                  recipient:
                    identifier: '5511999999999'
                  content:
                    type: INTERACTIVE_ACTION
                    body:
                      message: Confira nosso site
                    attachments:
                      - id: '1'
                        title: Acessar site
                        name: URL
                        url: https://www.omni.z-api.io
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SendInteractiveActionRequest:
      type: object
      required:
        - recipient
        - content
      properties:
        recipient:
          type: object
          required:
            - identifier
          properties:
            identifier:
              type: string
              description: Telefone do destinatário (DDI + DDD + número)
              example: '5511999999999'
        content:
          type: object
          required:
            - type
            - body
            - attachments
          properties:
            type:
              type: string
              description: Tipo da mensagem
              enum:
                - INTERACTIVE_ACTION
            body:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
                  description: Texto principal da mensagem
            header:
              type: object
              properties:
                message:
                  type: string
                  description: Título da mensagem
            footer:
              type: object
              properties:
                message:
                  type: string
                  description: Rodapé da mensagem
            attachments:
              type: array
              description: Lista de botões de ação
              items:
                type: object
                required:
                  - id
                  - title
                  - name
                properties:
                  id:
                    type: string
                    description: Identificador do botão
                  title:
                    type: string
                    description: Texto exibido no botão
                  name:
                    type: string
                    description: Tipo do botão
                    enum:
                      - URL
                      - CALL
                  url:
                    type: string
                    description: URL para botões do tipo URL
                  phones:
                    type: array
                    description: Telefone para botões do tipo CALL
                    items:
                      type: string
    MessageResponse:
      type: object
      properties:
        messageId:
          type: string
          description: ID da mensagem enviada
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
  responses:
    MessageSuccess:
      description: Mensagem enviada com sucesso
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            messageId: wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0
    Unauthorized:
      description: Token inválido ou ausente.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key gerada no painel de Segurança do Omni Z-API

````