Skip to main content
GET
/
chat
/
search
Search chats
curl --request GET \
  --url https://www.dench.com/api/v1/chat/search \
  --header 'Authorization: Bearer <token>'
[
  {
    "threadId": "th_abc123",
    "threadTitle": "Deploy checklist",
    "messageId": "cm_def456",
    "role": "user",
    "snippet": "How do we deploy to prod?",
    "createdAt": 1765526400000,
    "runId": null
  }
]

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Query Parameters

query
string
required

Full-text query across past messages.

limit
integer
Required range: 1 <= x <= 50
excludeThreadId
string
includeAutomated
boolean

Response

Successful response

threadId
string
required
threadTitle
string
required
messageId
string
required
role
enum<string>
required
Available options:
user,
assistant,
system
snippet
string
required
createdAt
number
required
runId
string | null
required