Query parameters
-
sort string
Sort the chatrooms by last_message_date (-last_message_date: descending, last_message_date: ascending)
Values are
id_chatroom
,date_insert
,last_message_date
, orlast_rating
. -
filter[type_chatroom] string
Filter the chatrooms by type_chatroom (0: one to one , 7: one to many)
Values are
0
or7
. -
filter[type_discussion] string
Filter the chatrooms by type_discussion(0: between members, 1: between external, 2: between members and external)
Values are
0
,1
, or2
. -
filter[source] string
Filter the chatrooms by source
Values are
hot_list
,waiting_list
, ordirect
. -
filter[dialogue] string
established : chatrooms with at least two authors, not established : chatrooms with only one author
Values are
established
ornot_established
. -
filter[last_rating] string
Filter the chatrooms by their last_rating
Values are
not_rated
,0
,1
,2
,3
,4
, or5
. -
filter[ambassador] integer
Filter the chatrooms by having messages posted by the ambassador
-
page integer
page number
-
per_page integer
number of items per page
curl \
-X GET https://domain.tld/api/v2/manager/chatrooms \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"current_page": 42,
"data": [
{
"id_chatroom": 8,
"ambassadors": [
{
"id_ambassador": 42,
"image": "string",
"firstname": "string",
"lastname": "string",
"username": "string",
"email": "string",
"email_tmp": "string",
"active": 42,
"status": 42,
"online": true,
"last_action_date": "2024-05-04T09:42:00+00:00",
"customer_id": "string",
"anonymized": true
}
],
"date_insert": "2023-10-06T13:41:09.123000Z",
"last_message_date": "2023-10-06T13:41:09.123000Z",
"type_chatroom": 0,
"type_discussion": 2,
"source": 2,
"established_dialogue": "2023-10-06 13:41:09.123",
"last_rating": {
"value": 5,
"comment": "Great ambassador"
},
"last_summary": {
"date_insert": "string",
"summary": "string",
"anomaly": 42,
"topic": 42
}
}
],
"first_page_url": "string",
"from": 42,
"last_page": 42,
"last_page_url": "string",
"links": [
{
"url": "string",
"label": "string",
"active": true
}
],
"next_page_url": "string",
"path": "string",
"per_page": 42,
"prev_page_url": "string",
"to": 42,
"total": 42
}
{
"message": "Unauthorized."
}