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

# Receber mensagem do usuário final

> Mensagens de texto e multimídia que o usuário final envia durante uma conversa ativa

## Descrição

O Jelou emite este evento no seu webhook quando o usuário final envia uma mensagem durante uma conversa ativa. Todos os eventos incluem o cabeçalho `X-Jelou-Signature` para verificação.

## Evento webhook `message`

<Tabs>
  <Tab title="Mensagem de texto">
    ```json theme={null}
    {
      "field": "messages",
      "object": "message_event",
      "event_type": "message",
      "timestamp": 1776134278574,
      "project_id": "PROJECT_ID",
      "room_id": "ROOM_ID",
      "contact": {
        "id": "USER_ID",
        "name": "USER_NAME"
      },
      "conversation": {
        "id": "CONVERSATION_ID"
      },
      "bot": {
        "id": "BOT_ID",
        "name": "BOT_NAME"
      },
      "value": {
        "id": "MESSAGE_ID",
        "type": "text",
        "content": {
          "body": "Olá"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Mensagem de imagem">
    ```json theme={null}
    {
      "field": "messages",
      "object": "message_event",
      "event_type": "message",
      "timestamp": 1776134352163,
      "project_id": "PROJECT_ID",
      "room_id": "ROOM_ID",
      "contact": {
        "id": "USER_ID",
        "name": "USER_NAME"
      },
      "conversation": {
        "id": "CONVERSATION_ID"
      },
      "bot": {
        "id": "BOT_ID",
        "name": "BOT_NAME"
      },
      "value": {
        "id": "MESSAGE_ID",
        "type": "image",
        "content": {
          "url": "https://storage.example.com/media/image.jpg",
          "mime_type": "image/jpeg"
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Tipos de mensagens suportados

| Tipo       | Campo `value.content`                              | Campos adicionais     |
| ---------- | -------------------------------------------------- | --------------------- |
| `text`     | `{ "body": "Texto da mensagem" }`                  | —                     |
| `image`    | `{ "url": "...", "mime_type": "image/jpeg" }`      | `caption` (opcional)  |
| `video`    | `{ "url": "...", "mime_type": "video/mp4" }`       | `caption` (opcional)  |
| `audio`    | `{ "url": "...", "mime_type": "audio/mpeg" }`      | —                     |
| `document` | `{ "url": "...", "mime_type": "application/pdf" }` | `filename` (opcional) |
