api-docs v5.116.0

API Docs

Table of contents


Chat_Room

Chat Room - Find

Back to top

Get list of chat rooms

GET /chat-rooms

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-rooms" \
  -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.title string
chatMessages.description string
chatMessages.picURL string
chatMessages.participants string[]

account ids

chatMessages.participantsLastMessageSeen object

map of participant to last seen message id

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "id-1",
    "createdAt": 1564661697125
  },
  {
    "id": "id-2",
    "createdAt": 1564661697125
  }
]

Chat Room - Get

Back to top

Get a specific chat room

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

title string
description string
picURL string
participants string[]

account ids

participantsLastMessageSeen object

map of participant to last seen message id

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125
}

Chat Room - Patch

Back to top

Update chat room

PATCH /chat-rooms/: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
title string optional
description string optional
picURL string optional
participants string[]

account ids

Size range: 1..
createdAt string optional

timestamp

Default value: currentTime
seen boolean optional

directive

Examples

Example usage:

curl "https://yourdomain.com/chat-rooms/<chat-room-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

title string
description string
picURL string
participants string[]

account ids

participantsLastMessageSeen object

map of participant to last seen message id

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125
}

Chat Room - Post

Back to top

Create chat room

POST /chat-rooms

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
title string optional
description string optional
picURL string optional
participants string[]

account ids

Size range: 1..
createdAt string optional

timestamp

Default value: currentTime

Examples

Example usage:

curl "https://yourdomain.com/chat-rooms" \
  -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

createdBy string

account uid

title string
description string
picURL string
participants string[]

account ids

participantsLastMessageSeen object

map of participant to last seen message id

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125
}

results matching ""

    No results matching ""