Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete a ChatKit thread

beta.chatkit.threads.delete(thread_id) -> ThreadDeleteResponse
DELETE
/chatkit/threads/{thread_id}

Delete a ChatKit thread along with its items and stored attachments.

Parameters
thread_id: str
Returns
class ThreadDeleteResponse: …

Confirmation payload returned after deleting a thread.

id: str

Identifier of the deleted thread.

deleted: bool

Indicates that the thread has been deleted.

object: Literal["chatkit.thread.deleted"]

Type discriminator that is always chatkit.thread.deleted.

Delete a ChatKit thread

from openai import OpenAI

client = OpenAI()
thread = client.beta.chat_kit.threads.delete(
    "cthr_123",
)
print(thread.id)
{
  "id": "cthr_123",
  "object": "chatkit.thread.deleted",
  "deleted": true
}
Returns Examples
{
  "id": "cthr_123",
  "object": "chatkit.thread.deleted",
  "deleted": true
}