Skip to main content
POST
/
tasks
/
{task_id}
/
clean
Clean Task
curl --request POST \
  --url https://api.example.com/tasks/{task_id}/clean \
  --header 'Content-Type: application/json' \
  --data '
{
  "force": false,
  "idle_days": 7
}
'
{
  "task_id": "<string>",
  "cleaned_at": "2023-11-07T05:31:56Z",
  "messages_deleted": 123,
  "task_states_deleted": 123,
  "events_deleted": 123
}

Documentation Index

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

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

Path Parameters

task_id
string
required

Body

application/json
force
boolean
default:false

Skip the idle-threshold check. Active-workflow and unprocessed-events checks still apply. Admin use only.

idle_days
integer
default:7

Idle threshold in days (ignored when force=true).

Required range: x >= 1

Response

Successful Response

task_id
string
required
cleaned_at
string<date-time>
required
messages_deleted
integer
required
task_states_deleted
integer
required
events_deleted
integer
required