Api session event editor chat send message: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
API Endpoint to Send Message.
API Endpoint: editorchat/send_message.


API Endpoint name is Api session event editor chat send message
API Endpoint name is Api session event editor chat send message.
 
Use this endpoint to Send Message


{|class=wikitable
{|class=wikitable
Line 34: Line 36:
|}
|}
===Example POST===
===Example POST===
Curl Example POST:
Curl example POST:


<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 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 Example POST:
JavaScript example POST:


<syntaxhighlight lang="text" copy>var options = {
<syntaxhighlight lang="text" copy>var options = {

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));