api-docs v5.116.0
API Docs
Table of contents
Chat_Session
Chat Session - Find
Get list of chat sessions
GET /chat-sessions
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/chat-sessions" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| chatSessions[] | object[] |
array of chatSession |
| chatSessions.id | string |
|
| chatSessions.createdAt | number |
timestamp Default value: currentTime |
| chatSessions.type | string |
Allowed values: telemed |
| chatSessions.room | string |
|
| chatSessions.startedAt | number |
timestamp |
| chatSessions.startedBy | string |
account uid |
| chatSessions.acceptedAt | number |
timestamp |
| chatSessions.acceptedBy | string |
account uid |
| chatSessions.rejectedAt | number |
timestamp |
| chatSessions.rejectedBy | string |
account uid |
| chatSessions.rejectReason | string |
|
| chatSessions.finishedAt | number |
timestamp |
| chatSessions.finishedBy | string |
account uid |
| chatSessions.participants | string[] |
account ids |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
[
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
},
{
"id": "id-2",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
]
Chat Session - Get
Get a specific chat session
GET /chat-sessions/:id
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/chat-sessions/<chat-session-id>" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| id | string |
|
| createdAt | number |
timestamp Default value: currentTime |
| type | string |
Allowed values: telemed |
| room | string |
|
| startedAt | number |
timestamp |
| startedBy | string |
account uid |
| acceptedAt | number |
timestamp |
| acceptedBy | string |
account uid |
| rejectedAt | number |
timestamp |
| rejectedBy | string |
account uid |
| rejectReason | string |
|
| finishedAt | number |
timestamp |
| finishedBy | string |
account uid |
| participants | string[] |
account ids |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Chat Session - Patch
Update chat session
PATCH /chat-sessions/:id
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| type | string |
optional Allowed values: telemed |
| room | string |
optional |
| startedAt | number |
optional timestamp |
| startedBy | string |
optional account uid |
| acceptedAt | number |
optional timestamp |
| acceptedBy | string |
optional account uid |
| rejectedAt | number |
optional timestamp |
| rejectedBy | string |
optional account uid |
| rejectReason | string |
optional |
| finishedAt | number |
optional timestamp |
| finishedBy | string |
optional account uid |
| participants | string[] |
|
| createdAt | number |
optional timestamp Default value: currentTime |
| start | boolean |
optional directive |
| accept | boolean |
optional directive |
| reject | boolean/string |
optional directive |
| finish | boolean/string |
optional directive |
Examples
Example usage:
curl "https://yourdomain.com/chat-sessions/<chat-session-id>" \
-X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"seen": true
}'
Parameters examples
json - Request-Example
{
"seen": true
}
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| id | string |
|
| createdAt | number |
timestamp Default value: currentTime |
| type | string |
Allowed values: telemed |
| room | string |
|
| startedAt | number |
timestamp |
| startedBy | string |
account uid |
| acceptedAt | number |
timestamp |
| acceptedBy | string |
account uid |
| rejectedAt | number |
timestamp |
| rejectedBy | string |
account uid |
| rejectReason | string |
|
| finishedAt | number |
timestamp |
| finishedBy | string |
account uid |
| participants | string[] |
account ids |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Chat Session - Post
Create chat session
POST /chat-sessions
Headers - Header
| Name | Type | Description |
|---|---|---|
| Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Parameters - Parameter
| Name | Type | Description |
|---|---|---|
| type | string |
optional Allowed values: telemed |
| room | string |
optional |
| startedAt | number |
optional timestamp |
| startedBy | string |
optional account uid |
| acceptedAt | number |
optional timestamp |
| acceptedBy | string |
optional account uid |
| rejectedAt | number |
optional timestamp |
| rejectedBy | string |
optional account uid |
| rejectReason | string |
optional |
| finishedAt | number |
optional timestamp |
| finishedBy | string |
optional account uid |
| participants | string[] |
|
| createdAt | number |
optional timestamp Default value: currentTime |
Examples
Example usage:
curl "https://yourdomain.com/chat-sessions" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"participants": ["account-id1", "account-id2"],
"title": "Hello"
}'
Parameters examples
json - Request-Example
{
"participants": ["account-id1", "account-id2"],
"title": "Hello"
}
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| id | string |
|
| createdAt | number |
timestamp Default value: currentTime |
| type | string |
Allowed values: telemed |
| room | string |
|
| startedAt | number |
timestamp |
| startedBy | string |
account uid |
| acceptedAt | number |
timestamp |
| acceptedBy | string |
account uid |
| rejectedAt | number |
timestamp |
| rejectedBy | string |
account uid |
| rejectReason | string |
|
| finishedAt | number |
timestamp |
| finishedBy | string |
account uid |
| participants | string[] |
account ids |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}