Search chats by text
Chats
GET search
Endpoint
GET /api/v1/chats/search
Parameters
Name | Description |
---|---|
by_text required | Text to search by |
by_company | Filter by company_id (admin only) |
page | Page number |
per_page | Number of items per page |
Request
Route
GET /api/v1/chats/search?by_text=word
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3MSIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc1ODAxMjQ2MCwiZXhwIjoxNzYwNjA0NDYwLCJqdGkiOiI4MDBmOGQzOC0xYWUwLTQyOGItOWVmMy0yODVhMDg4YWU2M2EifQ.KQXbwmVLSpjolNiXHXqiWFMSJ1EGP0oap69yDMiBGnk
Host: example.org
Cookie:
Query Parameters
by_text=word
Body
{
}
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/"fb4544d8abcb0fab07dac67542a8cd75"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1868df47-fb47-4499-853c-4fde345f3f4f
x-runtime: 0.019858
content-length: 829
Body
{
"messages": [
{
"id": 12,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 46875327,
"title": "Forward Marketing Director"
},
"topic_type": "Job"
},
"created_at": "2025-09-16T08:47:40.545Z",
"files": [
],
"sender": {
"id": 27,
"user": {
"id": 70,
"admin": false,
"contact_phone_number": null,
"first_name": "Wilfred",
"last_name": "Gislason",
"role": "operator"
}
},
"sender_full_name": "Wilfred Gislason",
"sender_id": 27,
"text": "Driver message with word in text field"
},
{
"id": 11,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 46875327,
"title": "Forward Marketing Director"
},
"topic_type": "Job"
},
"created_at": "2025-09-16T08:47:40.538Z",
"files": [
],
"sender": {
"id": 26,
"user": {
"id": 71,
"admin": false,
"first_name": "Coleman",
"last_name": "Boyer",
"referral_code": "154940",
"role": "driver"
}
},
"sender_full_name": "Coleman Boyer",
"sender_id": 26,
"text": "Driver message with word in text field"
}
]
}