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

# Quickstart

> Enviá tu primer mensaje por WhatsApp en 5 minutos.

## Antes de empezar

Necesitás:

1. Una cuenta de Waspy con un número de WhatsApp conectado
2. Una API key (creala en **Configuración → API Keys**)

***

## Paso 1: Verificar tu cuenta

Comprobá que tu cuenta está activa y tu número conectado:

```bash theme={null}
curl https://api.waspytech.com/api/v2/account \
  -H "Authorization: Bearer wspy_tu_api_key"
```

Deberías recibir los datos de tu cuenta con el plan activo.

***

## Paso 2: Obtener tu canal

Listá los números conectados para obtener el `phoneNumberId`:

```bash theme={null}
curl https://api.waspytech.com/api/v2/channels \
  -H "Authorization: Bearer wspy_tu_api_key"
```

```json theme={null}
{
  "data": [
    {
      "id": "uuid-del-canal",
      "phoneNumber": "+5491155654076",
      "displayName": "Mi Tienda",
      "status": "connected"
    }
  ]
}
```

Copiá el `id` del canal. Lo vas a necesitar para enviar mensajes.

***

## Paso 3: Enviar un mensaje

<Warning>
  Los mensajes de texto libre solo se pueden enviar si el contacto escribió en las últimas 24 horas (ventana de servicio). Si no, usá un template. Ver [Ventana de servicio](/concepts/service-window).
</Warning>

### Enviar un template (funciona siempre)

```bash theme={null}
curl -X POST https://api.waspytech.com/api/v2/messages \
  -H "Authorization: Bearer wspy_tu_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumberId": "uuid-del-canal",
    "to": "+5491126032641",
    "type": "template",
    "template": {
      "name": "hello_world",
      "language": { "code": "es_AR" }
    }
  }'
```

### Enviar texto libre (requiere ventana activa)

```bash theme={null}
curl -X POST https://api.waspytech.com/api/v2/messages \
  -H "Authorization: Bearer wspy_tu_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumberId": "uuid-del-canal",
    "to": "+5491126032641",
    "type": "text",
    "text": "Hola! Este mensaje fue enviado desde la API."
  }'
```

***

## Paso 4: Verificar el envío

Consultá el estado del mensaje con el `id` que recibiste:

```bash theme={null}
curl https://api.waspytech.com/api/v2/messages/MSG_ID \
  -H "Authorization: Bearer wspy_tu_api_key"
```

Los estados posibles son: `queued` → `sent` → `delivered` → `read` (o `failed`).

***

## Próximos pasos

<CardGroup cols={2}>
  <Card title="Enviar templates" icon="file-lines" href="/guides/send-template">
    Usá templates con variables dinámicas.
  </Card>

  <Card title="Gestionar contactos" icon="address-book" href="/guides/manage-contacts">
    Creá y actualizá contactos desde tu sistema.
  </Card>
</CardGroup>
