api-docs v5.116.0

API Docs

Table of contents


Chat_Message

Chat Message - Find

Back to top

Get list of chat messages

GET /chat-messages

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

Back to top

Get a specific chat message

GET /chat-messages/: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-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

Back to top

Update chat message

PATCH /chat-messages/: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
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"
}

Chat Message - Post

Back to top

Create chat message

POST /chat-messages

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
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"
}

results matching ""

    No results matching ""