Rename threads
curl --request PATCH \
--url https://www.dench.com/api/v1/chat/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"threadId": "th_abc123",
"title": "Deploy checklist"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{threadId: 'th_abc123', title: 'Deploy checklist'}]})
};
fetch('https://www.dench.com/api/v1/chat/threads', 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"
payload = { "items": [
{
"threadId": "th_abc123",
"title": "Deploy checklist"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"threadId": "th_abc123",
"ok": true
}
],
"succeeded": 1,
"failed": 0
}{
"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
Rename threads
Rename one or more chat threads.
PATCH
/
chat
/
threads
Rename threads
curl --request PATCH \
--url https://www.dench.com/api/v1/chat/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"threadId": "th_abc123",
"title": "Deploy checklist"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{threadId: 'th_abc123', title: 'Deploy checklist'}]})
};
fetch('https://www.dench.com/api/v1/chat/threads', 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"
payload = { "items": [
{
"threadId": "th_abc123",
"title": "Deploy checklist"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"threadId": "th_abc123",
"ok": true
}
],
"succeeded": 1,
"failed": 0
}{
"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.
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
⌘I