Skip to main content
POST
/
threads
/
prune
Prune Threads
curl --request POST \
  --url https://api.example.com/threads/prune \
  --header 'Content-Type: application/json' \
  --data '
{
  "thread_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "strategy": "delete"
}
'
{
  "pruned_count": 123
}

Body

application/json

Payload for pruning threads.

thread_ids
string<uuid>[]
required

List of thread IDs to prune.

strategy
enum<string>
default:delete

The prune strategy. 'delete' removes threads entirely. 'keep_latest' prunes old checkpoints but keeps threads and their latest state (requires FF_USE_CORE_API=true).

Available options:
delete,
keep_latest

Response

Success

Response from pruning threads.

pruned_count
integer
required

Number of threads successfully pruned.