Skip to main content
POST
/
med-assist
/
session
curl --location --request POST 'https://matrix.eka.care/med-assist/session' \
--header 'x-agent-id: <agent-id>'
import requests

url = "https://api.eka.care/med-assist/session"

payload = {}
headers = {
  'x-agent-id': '<agent-id>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
const url = "https://api.eka.care/med-assist/session";

const headers = {
  'x-agent-id': '<agent-id>'
};

fetch(url, {
  method: 'POST',
  headers: headers
})
.then(response => response.text())
.then(result => console.log(result));
{
  "session_id": "a349a41e-5d49-488a-b300-66ccbfdf16b3",
  "session_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"error": {
"code": "forbidden",
"msg": "No agent id provided"
}
}
{
"error": {
"code": "not_found",
"msg": "Agent not found"
}
}
{
"error": {
"code": "internal_server_error",
"msg": "Internal server error"
}
}
curl --location --request POST 'https://matrix.eka.care/med-assist/session' \
--header 'x-agent-id: <agent-id>'
import requests

url = "https://api.eka.care/med-assist/session"

payload = {}
headers = {
  'x-agent-id': '<agent-id>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
const url = "https://api.eka.care/med-assist/session";

const headers = {
  'x-agent-id': '<agent-id>'
};

fetch(url, {
  method: 'POST',
  headers: headers
})
.then(response => response.text())
.then(result => console.log(result));

Next Steps

After creating a session, use the returned session_id and session_token to:
  1. Connect to the WebSocket endpoint: wss://api-ws.eka.care/ws/med-assist/session/<session-id>
  2. Authenticate using the session token
  3. Start sending medical queries through the WebSocket connection
See the WebSocket documentation for detailed implementation.

Authorizations

x-agent-id
string
header
required

Your API key for authentication

Body

application/json

The body is of type object.

Response

Session created successfully

session_id
string<uuid>

Unique session identifier

Example:

"a349a41e-5d49-488a-b300-66ccbfdf16b3"

session_token
string

JWT token for WebSocket authentication

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."