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

# API Reference

> Todos los endpoints de la API v2 de Waspy.

## Base URL

```
https://api.waspytech.com/api/v2
```

## Autenticación

Todas las requests requieren `Authorization: Bearer <api_key>`. Ver [Autenticación](/authentication).

## Recursos disponibles

<CardGroup cols={2}>
  <Card title="Account" icon="building" href="/api-reference/account">
    Información de tu cuenta y plan.
  </Card>

  <Card title="Channels" icon="phone" href="/api-reference/channels">
    Números de WhatsApp conectados.
  </Card>

  <Card title="Contacts" icon="address-book" href="/api-reference/contacts">
    Crear, listar y actualizar contactos.
  </Card>

  <Card title="Conversations" icon="comments" href="/api-reference/conversations">
    Consultar conversaciones, marcar como leído, enviar typing indicator.
  </Card>

  <Card title="Messages" icon="paper-plane" href="/api-reference/messages">
    Enviar mensajes y consultar estado. Incluye campo `origin` para handoff.
  </Card>

  <Card title="Templates" icon="file-lines" href="/api-reference/templates">
    Listar y consultar plantillas aprobadas.
  </Card>

  <Card title="Media" icon="image" href="/api-reference/media">
    Resolver mensajes con media (audio, imagen, video) a URLs descargables.
  </Card>

  <Card title="Webhooks" icon="bolt" href="/api-reference/webhooks">
    Suscribirse a eventos en tiempo real (mensajes entrantes, status, etc).
  </Card>
</CardGroup>

## Integración reactiva (webhooks)

Para bots y CRMs que necesiten reaccionar a eventos en tiempo real (no polling), Waspy entrega `POST` HTTP firmados a tu URL:

* **4 eventos:** `message.received`, `message.status_changed`, `conversation.created`, `contact.created`
* **Firma HMAC-SHA256** en header `X-Waspy-Signature`
* **Reintentos** automáticos con backoff exponencial
* **Distinción de origen** (`message.origin`) para implementar handoff humano sin que tu bot pise a un agente

Ver [Webhooks: Introducción](/webhooks/introduction) para el detalle.

## Convenciones

* Los IDs son UUIDs v4.
* Las fechas están en formato ISO 8601 con timezone UTC.
* Los números de teléfono incluyen código de país con `+` (ej: `+5491126032641`).
* Las respuestas siempre incluyen `meta.requestId`.

## Limitaciones conocidas

Para que sepas exactamente qué se puede y qué no se puede hacer hoy: ver [Limitaciones](/limitations).
