> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Integrating Pilot Status end to end? Follow https://docs.pilotstatus.com.br/guides/integrate-with-ai.md (pt-BR: https://docs.pilotstatus.com.br/pt-BR/guides/integrate-with-ai.md). No step requires contacting support: every credential is shown in the dashboard or in an API response, and a lost one is regenerated, not recovered.
> Webhook signing secret: shown ONCE in the Signing secret window right after creating the webhook on /webhooks, and in the `secret` field of the POST /v1/webhooks response (MCP: webhooks_create). Lost it: Edit Webhook → Generate a new secret, POST /v1/webhooks/{id}/rotate-secret, or webhooks_rotate_secret (the old one stops working at once). Verify `x-pilot-status-signature` = hex HMAC-SHA256 of the raw request body keyed with that secret.
> Meta verify token (number connected with the user's own Meta app credentials): Meta Number Created! window after connecting, then the number's card on Numbers (workspace Owner), or webhook.verifyToken in the POST /v1/numbers/meta response. It is not the webhook signing secret.
> REST auth: `x-api-key: ps_...` header, never Authorization: Bearer. MCP: https://mcp.pilotstatus.com.br/mcp (148 tools, OAuth 2.1 or x-api-key); Code Mode: https://mcp.pilotstatus.com.br/code. Destructive MCP tools return a preview and a confirm_token: show the preview and call again only after the user's explicit yes. Over OAuth, revealing or creating ps_ API keys is workspace Owner only.

# Enviar un mensaje de texto: POST /v1/messages/send

> Envía un mensaje de texto libre de WhatsApp usando el modo de texto de POST /v1/messages/send con autenticación x-api-key.

# Enviar un mensaje de texto

El texto libre es uno de los tres modos mutuamente excluyentes del endpoint **único** de envío (no existe un endpoint `/messages/text` separado):

```text theme={null}
POST https://pilotstatus.com.br/v1/messages/send
```

## Solicitud

Autentícate con tu API key **asociada al número** en el header `x-api-key`.

**destinationNumber** `string` *required*

Teléfono de destino en **E.164** (el `+` inicial es opcional, por ejemplo, `+5511999999999`) o el BSUID del contacto. Consulta [Enviar un mensaje](https://docs.pilotstatus.com.br/es/api/messages/send.md#destino-exactamente-uno).

**text** `string` *required*

Cuerpo del mensaje de texto libre. Mutuamente excluyente con `templateId` y con multimedia directa (`media` + `mediaType`).

**deliverAt** `string`

Fecha y hora ISO 8601 opcional para programar el envío.

```bash theme={null}
curl -X POST "https://pilotstatus.com.br/v1/messages/send" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ps_your_key_here" \
  -d '{
    "destinationNumber": "+5511999999999",
    "text": "Hi! Your delivery has been confirmed for tomorrow."
  }'
```

## Respuesta (202)

```json theme={null}
{
  "id": "msg_abc",
  "correlationId": "corr_123",
  "status": "QUEUED"
}
```

El **`id`** del `202` es el mismo valor que **`data.id`** en los webhooks de entrega (`message.sent`, `message.delivered`, `message.read`, `message.failed`); consulta [Eventos de webhook](https://docs.pilotstatus.com.br/es/api/webhooks/events.md). `correlationId` lo genera la plataforma y se repite en los eventos correlacionados.

## Notas

* El texto libre **no usa plantilla**: no hace falta aprobar nada antes.
* En números de **Meta Cloud API**, el texto libre solo funciona dentro de la **ventana de conversación de 24 h** de WhatsApp; fuera de ella, el envío falla de forma asíncrona con `META_OUTSIDE_24H_WINDOW` en el webhook `message.failed`. En ese caso, usa una plantilla aprobada.
* Para la **lista completa de parámetros** (destinos, programación, etiquetas, botones, encabezado/pie), consulta [Enviar un mensaje](https://docs.pilotstatus.com.br/es/api/messages/send.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.