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, or last_rating.

  • Filter the chatrooms by type_chatroom (0: one to one , 7: one to many)

    Values are 0 or 7.

  • Filter the chatrooms by type_discussion(0: between members, 1: between external, 2: between members and external)

    Values are 0, 1, or 2.

  • Filter the chatrooms by source

    Values are hot_list, waiting_list, or direct.

  • established : chatrooms with at least two authors, not established : chatrooms with only one author

    Values are established or not_established.

  • Filter the chatrooms by their last_rating

    Values are not_rated, 0, 1, 2, 3, 4, or 5.

  • Filter the chatrooms by having messages posted by the ambassador

  • page integer

    page number

  • per_page integer

    number of items per page

Responses

GET /manager/chatrooms
curl \
 -X GET https://domain.tld/api/v2/manager/chatrooms \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "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
}
Response examples (401)
{
  "message": "Unauthorized."
}