Read thread
curl --request GET \
--url https://www.dench.com/api/v1/chat/threads/{threadId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.dench.com/api/v1/chat/threads/{threadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/chat/threads/{threadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"thread": {
"threadId": "th_abc123",
"title": "Deploy checklist",
"lastMessageAt": 1765526400000,
"createdAt": 1765526000000,
"status": "idle",
"visibility": "private",
"createdByUserId": "us_xyz789",
"archivedAt": null,
"fileContextPath": null,
"parentThreadId": null,
"nestingDepth": null,
"summary": null,
"activeRunId": null
},
"messages": [
{
"id": "cm_def456",
"role": "user",
"createdAt": 1765526400000,
"updatedAt": 1765526400000,
"text": "How do we deploy?",
"runId": null,
"status": "complete",
"revision": 0,
"isDraft": false
},
{
"id": "cm_ghi789",
"role": "assistant",
"createdAt": 1765526460000,
"updatedAt": 1765526460000,
"text": "Push to main; Vercel auto-deploys.",
"runId": "rn_jkl012",
"status": "complete",
"revision": 1,
"isDraft": false
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}chat
Read thread
Read a past chat thread.
GET
/
chat
/
threads
/
{threadId}
Read thread
curl --request GET \
--url https://www.dench.com/api/v1/chat/threads/{threadId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.dench.com/api/v1/chat/threads/{threadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/chat/threads/{threadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"thread": {
"threadId": "th_abc123",
"title": "Deploy checklist",
"lastMessageAt": 1765526400000,
"createdAt": 1765526000000,
"status": "idle",
"visibility": "private",
"createdByUserId": "us_xyz789",
"archivedAt": null,
"fileContextPath": null,
"parentThreadId": null,
"nestingDepth": null,
"summary": null,
"activeRunId": null
},
"messages": [
{
"id": "cm_def456",
"role": "user",
"createdAt": 1765526400000,
"updatedAt": 1765526400000,
"text": "How do we deploy?",
"runId": null,
"status": "complete",
"revision": 0,
"isDraft": false
},
{
"id": "cm_ghi789",
"role": "assistant",
"createdAt": 1765526460000,
"updatedAt": 1765526460000,
"text": "Push to main; Vercel auto-deploys.",
"runId": "rn_jkl012",
"status": "complete",
"revision": 1,
"isDraft": false
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}Authorizations
DenchApiKeyAgentSession
Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.
Path Parameters
Query Parameters
Required range:
1 <= x <= 200⌘I