# On Chat Message

On chat message, you want to get chat message, session details and visitor details which you can use to keep a repository of chat at your server.

This trigger send **JSON** data to your web server, as show following.

**Example Webhook**

```javascript
{
	"id":"104111",
	"thread_id":"-1",
	"account_id":"10111",
	"session_id":"61111",
	"room_id":"9395ad5a....",
	"visitor_id":"61111",
	"message":"{
		"type":"message",
		"msg":"sadsdd",
		"user":{
			"id":15111,
			"name":"John",
			"type":"agent",
			"photo":null,
			"state":"online"
			}
	}",
	"recording":"[]",
	"chat_wait_time":"null",
	"chat_duration":"null",
	"translate_to":"en",
	"account_translate_language":"",
	"translate_form_show":"false",
	"date_created":"2018-07-23 05:17:40",
	"date_updated":"2018-07-23 05:17:40",
	"date_picked":"2018-07-23 05:17:42",
	"event":"CHAT_ON_MESSAGE"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.acquire.io/master/webhook-api/webhook-events/on-chat-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
