---
title: "Envia mensagem WhatsApp (template, texto, interativa, localização ou reação)"
method: POST
path: "/v1/messages"
tags: ["messages"]
---

# Envia mensagem WhatsApp (template, texto, interativa, localização ou reação)

`POST /v1/messages`

Aceita exatamente **um** tipo de payload por request: `templateName`,
`body`, `interactive`, `location` ou `reaction`. Retorna `202 Accepted`
com o ID interno; o status real chega via webhook.

## Request body

- SendMessageRequest — Envia exatamente UM tipo de payload: `templateName` OU `body` OU `interactive` OU `location` OU `reaction`.
  - `receiver` string, required — Número E.164 do destinatário.
  - `sender` string, nullable — Número remetente (opcional; usa default da org).
  - `type` 'template' | 'text' | 'interactive' | 'location' | 'reaction', nullable — Tipo explícito. Quando omitido, infere de outros campos.
  - `templateName` string, nullable
  - `templateVariables` string[], nullable — Lista posicional de variáveis (aceita alias `variables`).
  - `smartLinkParam` string, nullable
  - `smartLinkUrl` string, nullable
  - `body` string, nullable — Texto livre (apenas em janela 24h aberta).
  - `interactive` InteractivePayload
    - `type` 'list' | 'button', required
    - `body` string, required
    - `buttonText` string, nullable
    - `sections` InteractiveSection[], nullable
      - `title` string, required
      - `rows` InteractiveRow[], required
        - `id` string, required
        - `title` string, required
        - `description` string, nullable
    - `buttons` InteractiveButton[], nullable
      - `id` string, required
      - `title` string, required
  - `location` LocationPayload
    - `latitude` number, double, required
    - `longitude` number, double, required
    - `name` string, nullable
    - `address` string, nullable
  - `reaction` ReactionPayload
    - `emoji` string, required
    - `messageId` string, required — internalId da mensagem a reagir.
  - `replyTo` string, nullable — internalId da mensagem original sendo respondida.
  - `scheduled_at` string, date-time, nullable
  - `mode` 'LIVE', nullable
  - `media_url` string, nullable — DEPRECATED — use variables posicionalmente (header na primeira posição).

## Response `202`

Mensagem aceita pra envio

- MessageResponse
  - `id` string, nullable
  - `status` 'PENDING' | 'SCHEDULED' | 'PROCESSING' | 'SENT' | 'DELIVERED' | 'READ' | 'FAILED' | 'CANCELED', required
  - `mode` 'LIVE', required
  - `sender` string, required
  - `receiver` string, required
  - `body` string, nullable
  - `cost` number, float, nullable

## Other responses

- `400` — Payload inválido
- `401` — Token ausente ou inválido
- `403` — Sem permissão (plano, escopo, status da conta)
- `422` — Entidade não processável (validação semântica falhou)
- `429` — Rate limit excedido — honre header `Retry-After`

---

[API](https://skmtc.net/ararahq/apis/ararahq-api.md) · [All operations](https://skmtc.net/ararahq/apis/ararahq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ararahq/ararahq-api/revisions/174c89e36a13/schema)
