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

# Tu primer mensaje

> Guía detallada para enviar tu primer mensaje por WhatsApp, Messenger y SMS con Shimli.

Ya enviamos un mensaje básico en el [inicio rápido](/getting-started/quickstart). Ahora veamos cómo enviar diferentes tipos de mensaje por cada canal.

## Mensajes por WhatsApp Business API

### Texto

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "text",
  "body": "¡Hola! Bienvenido a nuestra tienda 🛍️",
  "to": "50499999999",
  "instance": "ID_INSTANCE"
}
```

### Imagen

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "image",
  "body": "https://tu-servidor.com/imagen.jpg",
  "caption": "Mira nuestro nuevo catálogo",
  "to": "50499999999",
  "instance": "ID_INSTANCE"
}
```

### Documento

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "document",
  "body": "https://tu-servidor.com/factura.pdf",
  "filename": "Factura-001.pdf",
  "to": "50499999999",
  "instance": "ID_INSTANCE"
}
```

### Video

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "video",
  "body": "https://tu-servidor.com/video.mp4",
  "caption": "Demo del producto",
  "to": "50499999999",
  "instance": "ID_INSTANCE"
}
```

<Callout type="info">
  Para mensajes multimedia (image, video, audio, document, gif), el campo `body` debe contener la **URL pública** del archivo. Shimli descarga y envía el archivo.
</Callout>

## Mensajes por Facebook Messenger

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "text",
  "body": "¡Hola! ¿En qué te puedo ayudar?",
  "to": "PSID_MESSENGER",
  "instance": "ID_INSTANCE"
}
```

<Callout type="warning">
  El campo `to` para Messenger es el **PSID** (Page-Scoped ID) del usuario, no un número de teléfono. Lo obtienes cuando el usuario inicia una conversación con tu Page.
</Callout>

## Mensajes por SMS

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "type": "text",
  "body": "Tu código de verificación es: 8294",
  "to": "50499999999",
  "instance": "ID_INSTANCE"
}
```

## Tipos de mensaje soportados

<Tabs>
  <Tab title="WhatsApp BA">
    | Tipo      | `type`     | `body`           |
    | --------- | ---------- | ---------------- |
    | Texto     | `text`     | El mensaje       |
    | Imagen    | `image`    | URL de la imagen |
    | Video     | `video`    | URL del video    |
    | Documento | `document` | URL del archivo  |
    | Audio     | `audio`    | URL del audio    |
  </Tab>

  <Tab title="Messenger">
    | Tipo    | `type`  | `body`           |
    | ------- | ------- | ---------------- |
    | Texto   | `text`  | El mensaje       |
    | Imagen  | `image` | URL de la imagen |
    | Video   | `video` | URL del video    |
    | Archivo | `file`  | URL del archivo  |
    | Audio   | `audio` | URL del audio    |
  </Tab>
</Tabs>

## Parámetros opcionales

| Parámetro  | Tipo   | Descripción                                 |
| ---------- | ------ | ------------------------------------------- |
| `caption`  | string | Texto acompañante para imagen o video       |
| `filename` | string | Nombre del documento (solo tipo `document`) |
| `lat`      | string | Latitud (solo tipo `location`)              |
| `lng`      | string | Longitud (solo tipo `location`)             |
