Chats

Search chats by text

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.eyJzdWIiOiI3MSIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc0ODUxNjQ5NSwiZXhwIjoxNzUxMTA4NDk1LCJqdGkiOiI0YTQ5YWVjYi0yODI4LTQzODUtYmYxNi00ZTkzN2RjMDRiOTEifQ.pQmSth05nj_S1stwydDPl-wwczNx4cGqZwrQklSh5EA
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/"84d3529d0d5192cd2e41597afd2f76c2"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1481526d-e509-4d7e-a9a2-4becca458b7d
x-runtime: 0.019577
content-length: 829

Body

{
  "messages": [
    {
      "id": 12,
      "chat": {
        "id": 37,
        "topic": {
          "id": 20,
          "number": 40855239,
          "title": "Product Mining Specialist"
        },
        "topic_type": "Job"
      },
      "created_at": "2025-05-29T11:01:35.080Z",
      "files": [

      ],
      "sender": {
        "id": 27,
        "user": {
          "id": 70,
          "admin": false,
          "contact_phone_number": null,
          "first_name": "Ariel",
          "last_name": "Morissette",
          "role": "operator"
        }
      },
      "sender_full_name": "Ariel Morissette",
      "sender_id": 27,
      "text": "Driver message with word in text field"
    },
    {
      "id": 11,
      "chat": {
        "id": 37,
        "topic": {
          "id": 20,
          "number": 40855239,
          "title": "Product Mining Specialist"
        },
        "topic_type": "Job"
      },
      "created_at": "2025-05-29T11:01:35.073Z",
      "files": [

      ],
      "sender": {
        "id": 26,
        "user": {
          "id": 71,
          "admin": false,
          "first_name": "Jonelle",
          "last_name": "Becker",
          "referral_code": "333385",
          "role": "driver"
        }
      },
      "sender_full_name": "Jonelle Becker",
      "sender_id": 26,
      "text": "Driver message with word in text field"
    }
  ]
}