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.eyJzdWIiOiI3MSIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc1MzI2NjE3MCwiZXhwIjoxNzU1ODU4MTcwLCJqdGkiOiIzZDBmNTUyNS1mMThlLTQ3ZDQtODEwNS0wMTI0ODU3YjNhYjcifQ.5hQqkKmHgnhNWfP-riAS24uv7Fw8eXv7Hi18ihuJlRI
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/"101b23eb1b4a98f0c89e2108167e2086"
cache-control: max-age=0, private, must-revalidate
x-request-id: 0dfabe18-a897-495c-9bad-dc5751696108
x-runtime: 0.022039
content-length: 837
Body
{
"messages": [
{
"id": 12,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 80642792,
"title": "Regional Government Consultant"
},
"topic_type": "Job"
},
"created_at": "2025-07-23T10:22:49.951Z",
"files": [
],
"sender": {
"id": 27,
"user": {
"id": 70,
"admin": false,
"contact_phone_number": null,
"first_name": "Bess",
"last_name": "Shanahan",
"role": "operator"
}
},
"sender_full_name": "Bess Shanahan",
"sender_id": 27,
"text": "Driver message with word in text field"
},
{
"id": 11,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 80642792,
"title": "Regional Government Consultant"
},
"topic_type": "Job"
},
"created_at": "2025-07-23T10:22:49.942Z",
"files": [
],
"sender": {
"id": 26,
"user": {
"id": 71,
"admin": false,
"first_name": "Tracey",
"last_name": "Wilderman",
"referral_code": "229026",
"role": "driver"
}
},
"sender_full_name": "Tracey Wilderman",
"sender_id": 26,
"text": "Driver message with word in text field"
}
]
}