Get a chatroom by id

GET /chat/chatrooms/{id}

Headers

  • X-Popsell-Brand integer Required

    The id of the target brand

Path parameters

  • id integer Required

    The chatroom id

Responses

  • 200 application/json

    Returns the chatroom

    Hide response attributes Show response attributes object
    • id_chatroom integer
    • ambassadors array[object]
      Hide ambassadors attributes Show ambassadors attributes object
      • id_ambassador integer(int32)
      • image string
      • firstname string
      • lastname string
      • username string
      • email string
      • email_tmp string
      • active integer(int32)
      • status integer(int32)
      • online boolean

        true: when last_action_date is less than 5 minutes ago

      • last_action_date string(date-time)
      • customer_id string
      • anonymized boolean
      • chatroom_pivot_data array[object]
        Hide chatroom_pivot_data attributes Show chatroom_pivot_data attributes object
        • id_chatroom integer(int32)
        • id_ambassador integer(int32)
        • last_read_message integer(int32)
        • is_blocked boolean
        • archived boolean
    • date_insert string(date-time)
    • last_message_date string(date-time)
    • type_chatroom integer

      0: one to one , 7: one to many

    • type_discussion integer

      0: between members, 1: between external, 2: between members and external

    • source string

      0:direct, 1:waiting_list, 2:hot_list

    • established_dialogue string(date-time)

      true: chatrooms with at least two authors, false: chatrooms with only one author

    • last_rating object

      Additional properties are allowed.

      Hide last_rating attributes Show last_rating attributes object
      • value integer
      • comment string
    • last_summary object

      Additional properties are allowed.

      Hide last_summary attributes Show last_summary attributes object
      • date_insert string
      • summary string
      • anomaly integer
      • topic integer
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

GET /chat/chatrooms/{id}
curl \
 --request GET 'https://domain.tld/api/v2/chat/chatrooms/{id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-Popsell-Brand: 3"
Response examples (200)
{
  "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": "2025-05-04T09:42:00Z",
      "customer_id": "string",
      "anonymized": true,
      "chatroom_pivot_data": [
        {
          "id_chatroom": 42,
          "id_ambassador": 42,
          "last_read_message": 42,
          "is_blocked": true,
          "archived": 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
  }
}
Response examples (401)
{
  "message": "Unauthorized."
}