Messages

List all messages in chat

GET messages

Endpoint

GET /api/v1/chats/:chat_id/messages

Parameters

Name Description
page Page number
per_page Number of items per page

Request

Route

GET /api/v1/chats/766/messages

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNDYxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTg0LCJleHAiOjE3NDAxNDM1ODQsImp0aSI6ImZmZTFmNDJkLTU3ZWQtNDc5OS1iNmE2LWE3NDg0ZGIyY2MyNiJ9.L-ktkOYMZcKRR8SSwFj4y4Yt_vmiIH6m8jjVhX93LfU
Host: example.org
Cookie: 

Query Parameters

{}=

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
per-page: 20
total: 2
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"30ea56733cabc4754588c34f314ced01"
cache-control: max-age=0, private, must-revalidate
x-request-id: e51ab6ba-0b5c-4fcb-b1bd-02d9e3a4a0d6
x-runtime: 0.010430
content-length: 213

Body

{
  "messages": [
    {
      "id": 22,
      "created_at": "2025-01-22T13:13:04.212Z",
      "files": [

      ],
      "sender_id": 49,
      "text": "Second message"
    },
    {
      "id": 21,
      "created_at": "2025-01-22T13:13:04.205Z",
      "files": [

      ],
      "sender_id": 49,
      "text": "First message"
    }
  ]
}