Skip to main content
DELETE
/
api
/
threads
/
{threadId}
curl -X DELETE https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000
{
  "success": true,
  "threadId": "550e8400-e29b-41d4-a716-446655440000",
  "deletedThreadIds": [
    "4dcf9e6e-9b72-4435-bf1a-b402f488f012",
    "c3ba3a6a-0cc7-4f90-a8e8-9cd664f9fe11",
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "deletedCount": 3,
  "message": "Thread and subthreads deleted successfully"
}

Documentation Index

Fetch the complete documentation index at: https://docs.standardagentbuilder.com/llms.txt

Use this file to discover all available pages before exploring further.

Deletes a thread and its full descendant tree (all subthreads), including all associated messages and thread storage.
This action is irreversible. The selected thread and all descendant subthreads are permanently deleted.
threadId
string
required
The unique thread identifier (UUID)
success
boolean
required
Whether the deletion was successful
threadId
string
required
The root thread ID that was requested for deletion
deletedThreadIds
array[string]
required
Thread IDs deleted in child-first order
deletedCount
number
required
Total number of deleted threads (root + descendants)
curl -X DELETE https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000
{
  "success": true,
  "threadId": "550e8400-e29b-41d4-a716-446655440000",
  "deletedThreadIds": [
    "4dcf9e6e-9b72-4435-bf1a-b402f488f012",
    "c3ba3a6a-0cc7-4f90-a8e8-9cd664f9fe11",
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "deletedCount": 3,
  "message": "Thread and subthreads deleted successfully"
}