Query
Run a SOQL, SOSL or SAQL statement — or a plain-English question — over everything the token can see.
Run a SOQL / SOSL / SAQL / natural-language query
POST
/queryExecute a query against your data. Supports SOQL, SOSL, SAQL, literal-term search, and natural language (auto-routed). Returns the standard query envelope.
Scope
query:runRead-onlyRequest body
| Field | Type |
|---|---|
textrequired | string |
defaultSlug | string |
limit | number |
cursor | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/query" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text":"SELECT insurer, SUM(premium) FROM motor_policy GROUP BY insurer","limit":25}'