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

# Sending embed events to Omni

> Trigger actions in an embedded Omni application by sending events into the Omni iframe.

You can send events into an Omni iframe to trigger actions in your embedded Omni application. Like emitted events, events sent to Omni should use the [`postMessage` protocol](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).

## Event shape

Events sent to Omni are expected to have the following shape:

```typescript theme={null}
type EmbedEvent<Payload> = {
  payload: Payload
  name: EmbedEventName
}
```

The following is an example of a JavaScript event handler that sends a `navigate` embed event to an Omni iframe via `postmessage`:

```javascript wrap theme={null}
const handleNavigateButtonClick = (path) => {
  document.querySelector('iframe').contentWindow.postMessage(
    {
      name: "navigate",
      payload: { path },
    },
    "https://youromniorganization.embed-omniapp.co"
  );
};
```

## Supported events

The following events can be sent to an Omni iframe:

| Event                                                                                                | Description                                                     |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`appearance:mode`](/embed/events/appearance-mode)                                                   | Triggers a color scheme change of the embedded Omni session.    |
| [`dashboard:filter-change-by-url-parameter`](/embed/events/dashboard-filter-change-by-url-parameter) | Triggers the change of a filter value on an embedded dashboard. |
| [`navigate`](/embed/events/navigate)                                                                 | Triggers a redirect to the path specified in the payload.       |
