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

# Inbound Message | Webhook Events

> Fires whenever a contact sends a message to a user in the HoopAI platform.

The `InboundMessage` event fires each time a contact sends a message to your account across any supported channel. Use it to trigger automations, update CRM records, route conversations to the right team member, or feed data into external systems in real time.

## Supported channels

| Channel   | Description                 |
| --------- | --------------------------- |
| Call      | Inbound phone calls         |
| Voicemail | Voicemail messages          |
| SMS       | Text messages               |
| GMB       | Google My Business messages |
| FB        | Facebook Messenger          |
| IG        | Instagram Direct            |
| Email     | Email messages              |
| Live Chat | Live chat widget            |

## Channel-specific details

**SMS/Text messages:** Include standard fields with `contentType` set to `text/plain` and standard status indicators.

**Calls:** When answered, both `status` and `callStatus` show `completed`. Unanswered calls show `voicemail` status with recording URLs in the `attachments` array.

**Email:** Uses an expanded schema with `emailMessageId`, `threadId`, `from`, `subject`, `to`, `cc`, and `bcc` fields for comprehensive email tracking.

## Payload

| Field            | Type     | Description                                                                                                |
| ---------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `type`           | `string` | Always `"InboundMessage"`                                                                                  |
| `locationId`     | `string` | Account ID where the message was received                                                                  |
| `contactId`      | `string` | ID of the contact who sent the message                                                                     |
| `conversationId` | `string` | ID of the conversation this message belongs to                                                             |
| `userId`         | `string` | ID of the assigned user in the conversation                                                                |
| `messageType`    | `string` | Channel the message arrived on. One of `SMS`, `Email`, `Call`, `Voicemail`, `FB`, `IG`, `GMB`, `Live Chat` |
| `direction`      | `string` | Always `"inbound"` for this event                                                                          |
| `body`           | `string` | Text content of the message                                                                                |
| `contentType`    | `string` | MIME type of the message body (e.g. `text/plain`)                                                          |
| `attachments`    | `array`  | List of attachment URLs; empty array if none                                                               |
| `status`         | `string` | Delivery status of the message (e.g. `delivered`, `completed`, `voicemail`)                                |
| `dateAdded`      | `string` | ISO 8601 timestamp when the message was received                                                           |
| `callDuration`   | `number` | Duration of the call in seconds (Call/Voicemail only)                                                      |
| `callStatus`     | `string` | Outcome of the call, e.g. `completed` or `voicemail` (Call/Voicemail only)                                 |
| `emailMessageId` | `string` | Provider message ID for email threading (Email only)                                                       |
| `threadId`       | `string` | Thread identifier for grouping email replies (Email only)                                                  |
| `from`           | `string` | Sender email address (Email only)                                                                          |
| `subject`        | `string` | Email subject line (Email only)                                                                            |
| `to`             | `array`  | List of recipient email addresses (Email only)                                                             |
| `cc`             | `array`  | List of CC'd email addresses (Email only)                                                                  |
| `bcc`            | `array`  | List of BCC'd email addresses (Email only)                                                                 |

## Example payload

#### SMS

```json theme={null}
{
  "type": "InboundMessage",
  "locationId": "ve9EPM428h8vShlRW1KT",
  "attachments": [],
  "body": "Hello, I have a question",
  "contactId": "nmFmQEsNgz6AVpgLVUJ0",
  "contentType": "text/plain",
  "conversationId": "BqTwX8QFwXzpegMve9EQ",
  "dateAdded": "2021-11-26T12:41:02.193Z",
  "direction": "inbound",
  "messageType": "SMS",
  "status": "delivered"
}
```

#### Email

```json theme={null}
{
  "type": "InboundMessage",
  "locationId": "ve9EPM428h8vShlRW1KT",
  "emailMessageId": "CAHZKpXk6sXE@mail.gmail.com",
  "threadId": "CAHZKpXk6sXE",
  "from": "contact@example.com",
  "subject": "Re: Your recent inquiry",
  "to": ["user@business.com"],
  "cc": [],
  "bcc": [],
  "contactId": "nmFmQEsNgz6AVpgLVUJ0",
  "conversationId": "BqTwX8QFwXzpegMve9EQ",
  "dateAdded": "2021-11-26T12:41:02.193Z",
  "direction": "inbound",
  "messageType": "Email",
  "status": "delivered"
}
```

## Related

* [Outbound Message](/api-reference/webhooks/outbound-message) — fires when a user sends a message to a contact
* [Conversation Unread](/api-reference/webhooks/conversation-unread) — fires when a conversation's unread count changes
* [Conversations API](/api-reference/conversations/overview) — query conversations and messages programmatically
