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

<ParamField path="type" type="string" required>
  Always `'send'`.
</ParamField>

<ParamField path="message" type="object" required>
  The message payload that was sent to the agent.
</ParamField>

## 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 title="Do you need practical examples?" icon="text-align-start" href="https://www.ibm.com/docs/SSAVQO/deploy/web_chat_agent/tutorials/tutorials_lp.html" arrow="true" cta="Learn with walk-throughs" horizontal>
  Learn how to apply the features available for embedded chat into your implementation with guidance and examples.
</Card>
