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

# Provider Outbound Message | Webhook Events

> Fires when a message is sent via an external communication provider configured as the default channel.

The `ProviderOutboundMessage` event fires when a user sends a message to a contact and a custom external communication provider is configured as the default channel for the account. This event differs from the standard `OutboundMessage` event — the payload is smaller and structured specifically for provider routing rather than conversation tracking. Only the fields listed below will be present.

## Supported channels

| Channel | Supported modules                            |
| ------- | -------------------------------------------- |
| SMS     | Web App, Mobile App, Workflows, Bulk Actions |
| Email   | Web App, Mobile App, Workflows, Bulk Actions |

## Payload

| Field            | Type     | Description                                                                              |
| ---------------- | -------- | ---------------------------------------------------------------------------------------- |
| `type`           | `string` | Channel type for this message. Either `"SMS"` or `"Email"`                               |
| `locationId`     | `string` | Account ID from which the message was sent                                               |
| `messageId`      | `string` | Unique identifier for the message                                                        |
| `contactId`      | `string` | ID of the contact who received the message                                               |
| `userId`         | `string` | ID of the user who sent the message                                                      |
| `attachments`    | `array`  | List of attachment URLs; empty array if none                                             |
| `message`        | `string` | Text body of the message (SMS only)                                                      |
| `phone`          | `string` | Recipient phone number in E.164 format (SMS only)                                        |
| `emailMessageId` | `string` | Provider-assigned message ID for email (Email only)                                      |
| `emailTo`        | `string` | Recipient email address or addresses (Email only)                                        |
| `emailFrom`      | `string` | Sender display name and email address, e.g. `From Name <email@example.com>` (Email only) |
| `html`           | `string` | Full HTML body of the email (Email only)                                                 |
| `subject`        | `string` | Email subject line (Email only)                                                          |

## Example payload

#### SMS

```json theme={null}
{
  "contactId": "GKBhT6BfwY9mjzXAU3sq",
  "locationId": "GKAWb4yu7A4LSc0skQ6g",
  "messageId": "GKJxs4P5L8dWc5CFUITM",
  "type": "SMS",
  "phone": "+15864603685",
  "message": "The text message to be sent to the contact",
  "attachments": ["https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"],
  "userId": "GK56r6wdJDrkUPd0xsmx"
}
```

#### Email

```json theme={null}
{
  "contactId": "GKKFF0QB9gV8fGA6zEbr",
  "locationId": "GKifVDyQeo7nwe27vMP0",
  "messageId": "GK56r6wdJDrkUPd0xsmx",
  "emailMessageId": "GK56r6wdJDrkUPd0xsmx",
  "type": "Email",
  "emailTo": ["abc@gmail.com"],
  "emailFrom": "From Name <email@gmail.com>",
  "attachments": ["https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"],
  "html": "<div style=\"font-family: verdana, geneva; font-size: 11pt;\"><p>Testing an outbound email from custom provider.</p></div>",
  "subject": "Subject from Conversation Page",
  "userId": "GK56r6wdJDrkUPd0xsmx"
}
```

## Related

* [Outbound Message](/api-reference/webhooks/outbound-message) — fires for standard outbound messages not routed through a custom provider
* [Inbound Message](/api-reference/webhooks/inbound-message) — fires when a contact sends a message to a user
* [Conversations API](/api-reference/conversations/overview) — query conversations and messages programmatically
