api-docs v5.45.0
API Docs
Chat_Message
Chat Message - Post
Create chat message
POST /chat-messages
Headers
| 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 |
|---|---|---|
| room | string |
|
| session | string |
optional |
| text | string |
optional |
| media | string |
optional |
| createdAt | number |
optional timestamp Default value: currentTime |
Examples
Example usage:
curl "https://yourdomain.com/chat-messages" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"room": "room-id",
"text": "hey"
}'
Parameters examples
json - Request-Example
{
"room": "room-id",
"text": "hey"
}
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| id | string |
|
| createdAt | number |
timestamp |
| createdBy | string |
account uid |
| room | string |
|
| session | string |
|
| text | string |
|
| media | string |
for attached media |
| seenBy | string[] |
seeners account id |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Chat Message - Find
Get list of chat messages
GET /chat-messages
Headers
| 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-messages" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| chatMessages[] | object[] |
array of chatMessage |
| chatMessages.id | string |
|
| chatMessages.createdAt | number |
timestamp |
| chatMessages.createdBy | string |
account uid |
| chatMessages.room | string |
|
| chatMessages.session | string |
|
| chatMessages.text | string |
|
| chatMessages.media | string |
for attached media |
| chatMessages.seenBy | string[] |
seeners account id |
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 Message - Get
Get a specific chat message
GET /chat-messages/:id
Headers
| 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-messages/<chat-message-id>" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
| Name | Type | Description |
|---|---|---|
| id | string |
|
| createdAt | number |
timestamp |
| createdBy | string |
account uid |
| room | string |
|
| session | string |
|
| text | string |
|
| media | string |
for attached media |
| seenBy | string[] |
seeners account id |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
Chat Message - Patch
Update chat message
PATCH /chat-messages/:id
Headers
| 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 |
|---|---|---|
| seen | boolean |
optional directive |
Examples
Example usage:
curl "https://yourdomain.com/chat-messages/<chat-message-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 |
| createdBy | string |
account uid |
| room | string |
|
| session | string |
|
| text | string |
|
| media | string |
for attached media |
| seenBy | string[] |
seeners account id |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}