Skip to main content
POST
/
public
/
knowledge-base
/
search
Search knowledge base
curl --request POST \
  --url https://web-api.clerk.chat/public/knowledge-base/search \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --data '
{
  "query": "What is RCS?",
  "sourceIds": [
    123
  ],
  "limit": 10,
  "similarity": 0.77
}
'
{
  "data": [
    {
      "id": 123,
      "content": "<string>",
      "similarity": 0.85
    }
  ],
  "total": 5,
  "query": "What is RCS?"
}

Authorizations

apiKey
string
header
required

Body

application/json
query
string
required

The search query

Example:

"What is RCS?"

sourceIds
number[]

Optional list of source IDs to search within

limit
number
default:10

Maximum number of sections to return (1-50)

Required range: 1 <= x <= 50
Example:

10

similarity
number
default:0.77

Minimum similarity threshold (0-1)

Required range: 0 <= x <= 1
Example:

0.77

Response

Search completed successfully

data
object[]
required
total
number
required

The total number of sections returned

Example:

5

query
string
required

The original search query

Example:

"What is RCS?"