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

# Salesforce MIAW

> Send Salesforce Messaging for In-App and Web (MIAW) events into OpenCX via webhook. Use to sync human-agent replies from Salesforce back into an OpenCX session.

## Overview

The Salesforce MIAW API allows you to sync human agent responses from Salesforce Messaging for In-App and Web (MIAW) into Open.

## Authentication

All endpoints require an API key with the `salesforce-miaw:write` scope. Pass it as a Bearer token in the `Authorization` header:

```bash theme={"dark"}
curl -X POST https://api.open.cx/salesforce/miaw/webhook \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"event": "message:new", "session_id": "your-session-id"}'
```

## Supported Events

| Event         | Description                                   |
| ------------- | --------------------------------------------- |
| `message:new` | A new message was sent in a MIAW conversation |
