Skip to main content
POST
/
chat
/
threads
New chat
curl --request POST \
  --url https://www.dench.com/api/v1/chat/threads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Summarize the latest CRM changes."
}
'
{
  "threadId": "th_abc123",
  "runId": "rn_def456",
  "workflowRunId": "wrun_01HX9",
  "threadUrl": "https://www.dench.com/acme/chat/th_abc123",
  "streamUrl": "https://www.dench.com/api/chat/stream?sessionId=th_abc123",
  "yolo": false
}

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.

Body

application/json
prompt
string
required

The user message that starts the turn.

model
string
fileContextPath
string
visibility
enum<string>
Available options:
private,
shared
yolo
boolean

Bypass approval gates for this turn.

title
string

Response

Successful response

threadId
string
required
runId
string
required
workflowRunId
string | null
required
threadUrl
string
required

Web URL of the thread.

streamUrl
string
required

SSE stream URL for the live response.

yolo
boolean
required