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.eyJzdWIiOiI3MSIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc0MjQ2NDkwNiwiZXhwIjoxNzQ1MDU2OTA2LCJqdGkiOiJlZjYzYTc5NS04MDBiLTQzN2UtOTcyYy05Yzk4M2UxYzQ1NDQifQ.LVJgzHQ3fVcoaqMXlLtmFqeP9ywmszZ36leExPpC1Vc
Host: example.org
Cookie:
Query Parameters
by_text=word
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/"552d84a4c8f7a967d517f6573718cde8"
cache-control: max-age=0, private, must-revalidate
x-request-id: b6868684-732e-48ae-bf65-af87200c07bd
x-runtime: 0.038594
content-length: 823
Body
{
"messages": [
{
"id": 12,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 42258923,
"title": "Banking Administrator"
},
"topic_type": "Job"
},
"created_at": "2025-03-20T10:01:46.324Z",
"files": [
],
"sender": {
"id": 27,
"user": {
"id": 70,
"admin": false,
"contact_phone_number": null,
"first_name": "Shane",
"last_name": "Reichel",
"role": "operator"
}
},
"sender_full_name": "Shane Reichel",
"sender_id": 27,
"text": "Driver message with word in text field"
},
{
"id": 11,
"chat": {
"id": 37,
"topic": {
"id": 20,
"number": 42258923,
"title": "Banking Administrator"
},
"topic_type": "Job"
},
"created_at": "2025-03-20T10:01:46.298Z",
"files": [
],
"sender": {
"id": 26,
"user": {
"id": 71,
"admin": false,
"first_name": "Shawanna",
"last_name": "Armstrong",
"referral_code": "524748",
"role": "driver"
}
},
"sender_full_name": "Shawanna Armstrong",
"sender_id": 26,
"text": "Driver message with word in text field"
}
]
}