Skip to content
Primary navigation

Delete thread

$ openai beta:threads delete
DELETE/threads/{thread_id}

Delete a thread.

ParametersExpand Collapse
--thread-id: string

The ID of the thread to delete.

ReturnsExpand Collapse
thread_deleted: object { id, deleted, object }
id: string
deleted: boolean
object: "thread.deleted"

Delete thread

openai beta:threads delete \
  --api-key 'My API Key' \
  --thread-id thread_id
{
  "id": "thread_abc123",
  "object": "thread.deleted",
  "deleted": true
}
Returns Examples
{
  "id": "thread_abc123",
  "object": "thread.deleted",
  "deleted": true
}