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

# Introducción

> La API de WhatsApp de manera rápida y sencilla.

Esta guía te ayudará a utilizar la API de WhatsApp de manera rápida y sencilla. Te mostraremos cómo empezar con uno de nuestros clientes de API y cómo realizar tu primera petición. Además, te indicaremos los siguientes pasos y dónde encontrar toda la información necesaria para aprovechar al máximo nuestra potente API REST.

## Url del servidor

El url base del servidor es

```
https://whatsapp.heybot.cloud
```

| Acción           | Recurso            | Method |
| ---------------- | ------------------ | ------ |
| Enviar mensaje   | `/api/v2/message`  | `POST` |
| Enviar plantilla | `/api/v2/template` | `POST` |

## Autenticacion y autorización

Todos los puntos finales de la API se autentican mediante Bearer tokens.

```json theme={null}
"headers": {
    'Authorization': 'Bearer <your_generated_token>'
    'Content-Type': 'application/json',
    'Accept': 'application/json',
}
```

## Ejemplo

```javascript theme={null}
import axios from 'axios';

const response = await axios.post(
  'https://whatsapp.heybot.cloud/api/v2/message',
  {
    to: '+1234567890',
    type: 'text',
    text: {
      body: '¡Hello world!',
    }
  },
  {
    headers: {
      'Authorization': 'Bearer <your_generated_token>',
      'Content-Type': 'application/json'
    }
  }
);
```
