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

# send

Triggered after the chat sends a message to the agent. Use this event for analytics, logging, or triggering side effects after a message is dispatched.

## Event Properties

**type** `string` *required*

Always `'send'`.

**message** `object` *required*

The message payload that was sent to the agent.

## Example

```javascript theme={null}
instance.on('send', (event, instance) => {
    console.log('Message sent:', event.message);
    
    // Log to analytics
    analytics.track('message_sent', {
        content: event.message.message.content,
        timestamp: Date.now()
    });
    
    // Show typing indicator
    showTypingIndicator();
});
```

> [card] [Do you need practical examples?](https://www.ibm.com/docs/SSAVQO/deploy/web_chat_agent/tutorials/tutorials_lp.html)
>
> Learn how to apply the features available for embedded chat into your implementation with guidance and examples.
