Api session event editor chat send message: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
API | API Endpoint: editorchat/send_message. | ||
API Endpoint name is Api session event editor chat send message. | |||
Use this endpoint to Send Message | |||
{|class=wikitable | {|class=wikitable | ||
!Name | !Name | ||
| Line 31: | Line 36: | ||
|} | |} | ||
===Example POST=== | ===Example POST=== | ||
Curl | Curl example POST: | ||
<syntaxhighlight lang="text" copy>curl 'https:// | <syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorchat/send_message/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "DOMAIN", "Text" ]' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
JavaScript | JavaScript example POST: | ||
<syntaxhighlight lang="text" copy>var options = { | <syntaxhighlight lang="text" copy>var options = { | ||
| Line 42: | Line 47: | ||
body: '[ "DOMAIN", "Text" ]' | body: '[ "DOMAIN", "Text" ]' | ||
}; | }; | ||
fetch("https:// | fetch("https://engine.tygron.com/api/session/event/editorchat/send_message/", options) | ||
.then(response => response.text()) | .then(response => response.text()) | ||
.then(result => console.log(result)) | .then(result => console.log(result)) | ||
Latest revision as of 11:50, 10 April 2026
API Endpoint: editorchat/send_message.
API Endpoint name is Api session event editor chat send message.
Use this endpoint to Send Message
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (Enumeration) | Channel | AI_ASSISTANT or DOMAIN |
| 1 | REQUIRED | (String) | String |
Response Codes
| Response Code: | Description |
|---|---|
| 204 | No Content |
| 300-600 | Codes Overview |
Example POST
Curl example POST:
curl 'https://engine.tygron.com/api/session/event/editorchat/send_message/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ "DOMAIN", "Text" ]'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ "DOMAIN", "Text" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorchat/send_message/", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));