curl --request DELETE \
--url https://davinci-app.com/api/v2/projects/{projectId}/chats/{chatId} \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
client.chats.delete(project_id, chat_id)
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
await client.chats.delete(projectId, chatId);
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects/{projectId}/chats/{chatId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted": true,
"releasedSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Delete a chat
Deletes the chat and its whole conversation. This cannot be undone.
If one of your sessions has a run going in the chat, the run is stopped. If
that session was in the chat it continues in a fresh one. Its id is returned
in releasedSessionId.
curl --request DELETE \
--url https://davinci-app.com/api/v2/projects/{projectId}/chats/{chatId} \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
client.chats.delete(project_id, chat_id)
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
await client.chats.delete(projectId, chatId);
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects/{projectId}/chats/{chatId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted": true,
"releasedSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Personal access token. The scopes granted at issuance determine both which
operations the key may call and the ceiling on the resource permissions it
can exercise. Each scope family is a ladder: projects:manage implies
projects:write and projects:read; cards:manage implies cards:write
and cards:read; and teams:manage implies teams:write and teams:read.
These are named API capability bundles, not blanket domain roles:
manage exposes only the permissions enumerated for that scope and never
bypasses the acting user's current role-based access.