---
title: "Send Message V1"
method: POST
path: "/api/v1/messages"
tags: ["messages"]
---

# Send Message V1

`POST /api/v1/messages`

## Request

- Base URL: `https://www.elocuenti.com`
- URL: `https://www.elocuenti.com/api/v1/messages`
- Auth: HTTP bearer

Send a WhatsApp template or free text message.

## Request body

- PublicMessageBody: Request body for POST /api/v1/messages.
  - `to` string, required
  - `type` 'template' | 'text', required
  - `template` MessageTemplate: The `template` block of a `type: "template"` send.
    - `name` string, required
    - `language` string, nullable
    - `params` object, nullable
  - `text` MessageText: The `text` block of a `type: "text"` send.
    - `body` string, required
  - `idempotency_key` string, required
  - `reference` string, nullable
  - `from` string, nullable: Optional. The business WhatsApp number to send from, in E.164 (e.g. `+573001234567`). Omit it to send from the business default. A number that is not one of the business's active numbers is refused with 422 `from_number_not_available`. `from` is part of the request identity: retrying the same `idempotency_key` with a different `from` (or adding/removing it) is another request and answers 409 `idempotency_conflict`; change the key when you change the number. A `from` refused with 422 is final for its key too: correct the number and send a new key.

## Response `200`

Successful Response

- MessageAcceptedResponse
  - `data` MessageAccepted, required: `data` of a POST answer: 201 when WhatsApp accepted the send, 200 when the key replays.
    - `id` string, nullable, required: Message id; null if WhatsApp accepted it but it was not stored.
    - `whatsapp_message_id` string, nullable, required
    - `status` 'accepted', required
    - `to` string, required
    - `conversation_id` string, nullable, required
    - `from` string, nullable: The business number the message left from, in E.164.
    - `deduplicated` boolean, required: True when this idempotency_key was already accepted.
  - `request_id` string, nullable

## Other responses

- `201`: Recurso creado.
- `400`: Petición malformada: una validación que el JSON Schema no puede expresar (reglas entre campos, headers de firma obligatorios ausentes) o un cuerpo que no es UTF-8. Un JSON roto en UTF-8 responde, en cambio, **422** `json_invalid`.
- `401`: No autenticado: falta la credencial, es inválida o expiró.
- `403`: Autenticado, pero sin permiso sobre este recurso o tenant.
- `404`: El recurso referenciado no existe (o no es visible para este tenant).
- `409`: Conflicto con el estado actual del recurso.
- `422`: El cuerpo o los parámetros no pasan la validación del esquema.
- `429`: Se superó el límite de peticiones del API key o de la IP.
- `500`: Error interno no recuperable por el cliente.
- `502`: Un proveedor externo respondió con un error o de forma inesperada.
- `503`: El servicio no puede atender la petición por configuración ausente o una dependencia caída. Es reintentable.
- `504`: Se venció el tiempo de espera de una dependencia aguas abajo. Es reintentable: si la operación es idempotente, un reintento no la duplica.

---

[API](https://skmtc.dev/elocuenti/apis/elocuenti-api.md) · [All operations](https://skmtc.dev/elocuenti/apis/elocuenti-api/llms.txt) · [OpenAPI document](https://skmtc.dev/elocuenti/apis/elocuenti-api/revisions/633c2767ac8a?raw)
