List Chat Messages
GET
/api/partner/v2/chats/{chat_id}/chat_messages
const url = 'https://api.linqapp.com/api/partner/v2/chats/1/chat_messages?page=1&per_page=25&before=2025-05-21T15%3A30%3A00.000-05%3A00&after=2025-05-21T15%3A30%3A00.000-05%3A00&sort=asc';const options = { method: 'GET', headers: {'X-LINQ-INTEGRATION-TOKEN': '<X-LINQ-INTEGRATION-TOKEN>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.linqapp.com/api/partner/v2/chats/1/chat_messages?page=1&per_page=25&before=2025-05-21T15%3A30%3A00.000-05%3A00&after=2025-05-21T15%3A30%3A00.000-05%3A00&sort=asc' \ --header 'X-LINQ-INTEGRATION-TOKEN: <X-LINQ-INTEGRATION-TOKEN>'Retrieves a paginated list of messages for a specific chat
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” chat_id
required
integer
The chat ID
Query Parameters
Section titled “Query Parameters ” page
integer
Page number for pagination (default 1)
per_page
integer
Number of items per page (default 25, max 100)
before
string format: date-time
Example
2025-05-21T15:30:00.000-05:00Filter messages sent before this timestamp (ISO 8601 format)
after
string format: date-time
Example
2025-05-21T15:30:00.000-05:00Filter messages sent after this timestamp (ISO 8601 format)
sort
string
Sort order for messages (default is chronological/ascending)
Responses
Section titled “ Responses ”Successful response
Media type application/json
object
data
Array<object>
object
id
integer
text
string
sent_at
string format: date-time
delivered_at
string format: date-time
delivery_status
Current delivery status of the message
string
edited_at
string format: date-time
is_read
boolean
sent_from
The phone number or identifier that sent this message
string
chat_handle_id
integer
attachments
Array<object>
object
id
Unique identifier for the attachment
string format: uuid
url
string
filename
string
mime_type
string
file_size
integer
reactions
Array<object>
object
id
integer
chat_message_id
integer
reaction
The type of reaction
string
is_from_me
boolean
from_phone
string
sent_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
meta
object
page
integer
total_pages
integer
total_count
integer
per_page
integer
Example
{ "data": [ { "id": 224, "text": "Hello, how are you?", "sent_at": "2025-05-21T15:30:00.123-05:00", "delivered_at": "2025-05-21T15:30:05.456-05:00", "delivery_status": "pending", "edited_at": "2025-05-21T15:31:00.789-05:00", "is_read": false, "sent_from": "+15551234567", "chat_handle_id": 123, "attachments": [ { "id": "abc12345-1234-5678-9abc-def012345678", "url": "https://storage.googleapis.com/linq-files/attachments/abc123.pdf", "filename": "document.pdf", "mime_type": "application/pdf", "file_size": 12345 } ], "reactions": [ { "id": 456, "chat_message_id": 224, "reaction": "love", "is_from_me": false, "from_phone": "+15551234567", "sent_at": "2025-05-21T15:30:00.000-05:00", "created_at": "2025-05-21T15:30:00.000-05:00", "updated_at": "2025-05-21T15:30:00.000-05:00" } ] } ], "meta": { "page": 1, "total_pages": 5, "total_count": 123, "per_page": 25 }}