docs/minds/rest_api/delete_thread.mdx
This API endpoint deletes a Thread and all associated Messages using the DELETE method.
None.
Unique identifier for the deleted thread.
</ResponseField> <ResponseField name="deleted" type="boolean" required>Indicates whether the thread was successfully deleted.
</ResponseField> <ResponseField name="object" type="string" required>The type of the returned object, which will be "thread.deleted".
A valid API key must be passed in the Authorization header:
Authorization: Bearer MINDS_API_KEY
Generate your API key here.
Id of the Thread to be deleted.
</ParamField> <RequestExample>curl -X DELETE "https://mdb.ai/threads/mdb_thread_d79c95547e5f4501a32df6f492ad5be9" \
-H "Authorization: Bearer MINDS_API_KEY"
from openai import OpenAI
client = OpenAI(
api_key='MINDS_API_KEY',
base_url='https://mdb.ai/'
)
response = client.beta.threads.delete("thread_abc123")
print(response)
import OpenAI from "openai";
const openai = new OpenAI(
api_key='MINDS_API_KEY',
baseURL='https://mdb.ai/'
);
async function main() {
const response = await openai.beta.threads.del("thread_abc123");
console.log(response);
}
main();
{
"id": "mdb_thread_d79c95547e5f4501a32df6f492ad5be9",
"deleted": true,
"object": "thread.deleted"
}