Chat
curl --request POST \
--url https://api.eqho.ai/v1/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-org-id: <api-key>' \
--data @- <<EOF
{
"agent_id": "65b975d9242b1175c2622ec4",
"messages": [
{
"role": "ai",
"text": "Hey there, how's it going?"
},
{
"role": "user",
"text": "Can you help me with a question?"
}
]
}
EOFimport requests
url = "https://api.eqho.ai/v1/chat"
payload = {
"agent_id": "65b975d9242b1175c2622ec4",
"messages": [
{
"role": "ai",
"text": "Hey there, how's it going?"
},
{
"role": "user",
"text": "Can you help me with a question?"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"x-org-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'x-org-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_id: '65b975d9242b1175c2622ec4',
messages: [
{role: 'ai', text: 'Hey there, how\'s it going?'},
{role: 'user', text: 'Can you help me with a question?'}
]
})
};
fetch('https://api.eqho.ai/v1/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eqho.ai/v1/chat"
payload := strings.NewReader("{\n \"agent_id\": \"65b975d9242b1175c2622ec4\",\n \"messages\": [\n {\n \"role\": \"ai\",\n \"text\": \"Hey there, how's it going?\"\n },\n {\n \"role\": \"user\",\n \"text\": \"Can you help me with a question?\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-org-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Chat
Chat
POST
/
v1
/
chat
Chat
curl --request POST \
--url https://api.eqho.ai/v1/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-org-id: <api-key>' \
--data @- <<EOF
{
"agent_id": "65b975d9242b1175c2622ec4",
"messages": [
{
"role": "ai",
"text": "Hey there, how's it going?"
},
{
"role": "user",
"text": "Can you help me with a question?"
}
]
}
EOFimport requests
url = "https://api.eqho.ai/v1/chat"
payload = {
"agent_id": "65b975d9242b1175c2622ec4",
"messages": [
{
"role": "ai",
"text": "Hey there, how's it going?"
},
{
"role": "user",
"text": "Can you help me with a question?"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"x-org-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'x-org-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_id: '65b975d9242b1175c2622ec4',
messages: [
{role: 'ai', text: 'Hey there, how\'s it going?'},
{role: 'user', text: 'Can you help me with a question?'}
]
})
};
fetch('https://api.eqho.ai/v1/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eqho.ai/v1/chat"
payload := strings.NewReader("{\n \"agent_id\": \"65b975d9242b1175c2622ec4\",\n \"messages\": [\n {\n \"role\": \"ai\",\n \"text\": \"Hey there, how's it going?\"\n },\n {\n \"role\": \"user\",\n \"text\": \"Can you help me with a question?\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-org-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Org impersonation via x-org-id. Superadmins may impersonate any org; admins may impersonate their direct sub-organizations. Enter the target organization ID to act as that org.
Body
application/json
Response
Successful Response
Was this page helpful?