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.eyJzdWIiOiI3MSIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc2MzYyNjM2MiwiZXhwIjoxNzY2MjE4MzYyLCJqdGkiOiJiYjg0MDVhZC0yMzQyLTQ1MmMtYjYwZi1jMDJlN2E5MDdjYTgifQ.QcjeNTwbTiB-PpEuwz70eoEkyoMvf0QlBMcIIunBJjU
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/"b31651ba6f85f13affe34aded10a3308"
cache-control: max-age=0, private, must-revalidate
x-request-id: fdc40118-696c-4792-80c7-8a7bf6ec0d6d
x-runtime: 0.019573
content-length: 861
Body
{
"messages": [
{
"id": 12,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 5879266,
"title": "District Architect"
},
"topic_type": "Job"
},
"created_at": "2025-11-20T08:12:41.966Z",
"files": [
],
"sender": {
"id": 27,
"user": {
"id": 70,
"admin": false,
"contact_phone_number": null,
"financial_company_id": null,
"first_name": "Leeanne",
"last_name": "Muller",
"role": "operator"
}
},
"sender_full_name": "Leeanne Muller",
"sender_id": 27,
"text": "Driver message with word in text field"
},
{
"id": 11,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 5879266,
"title": "District Architect"
},
"topic_type": "Job"
},
"created_at": "2025-11-20T08:12:41.960Z",
"files": [
],
"sender": {
"id": 26,
"user": {
"id": 71,
"admin": false,
"financial_company_id": null,
"first_name": "Jerald",
"last_name": "Tromp",
"referral_code": "798626",
"role": "driver"
}
},
"sender_full_name": "Jerald Tromp",
"sender_id": 26,
"text": "Driver message with word in text field"
}
]
}