Send message as an agent
chatra_send_messageWRITE: send a chat message to a visitor as a Chatra agent. The visitor sees it immediately in their chat window as if the agent typed it, so only call it with text the user asked you to send. It cannot be unsent except by deleting it. Say which agent writes: agent_id, or agent_email + agent_name + received_from (a dummy agent is created in Chatra when the email is unknown). For automated notices (order status, announcements) use chatra_push_message instead. Returns the new message with its id. POST /messages/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Message text (plain text, 1-5000 characters). | |
| agent_id | No | Chatra agent id (shown on the agent's page in Chatra). | |
| client_id | Yes | Chatra visitor id: the `clientId` your website passed to the chat widget (ChatraSetup.clientId) or the visitor id from a Chatra webhook (client.id). | |
| agent_name | No | Agent display name (with agent_email). | |
| agent_email | No | Agent email (instead of agent_id; needs agent_name and received_from). | |
| received_from | No | Short name of the sending system, e.g. 'usefulapi-mcp'; marks the message in webhooks. |