# clearStaleWorkflowTasks

Clear the key owner's stale workflow tasks: open to-dos a workflow made, on their list alone, due more than 7 days before today in timezone (an IANA zone). At most 2,000; they are removed (never completed) in 10 seconds. No read counts them beforehand: ask for the clear as described, then report taskCount (and hasMore); restoreClearedTasks undoes it. bulkTaskId null: nothing qualified.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "clearStaleWorkflowTasks", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `timezone`: `String!` (required)

## Response (data, an example)

```json
{
  "tasksMutation": {
    "clearStaleWorkflowTasks": {
      "bulkTaskId": "<ID>",
      "taskCount": 0,
      "hasMore": true,
      "startsAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "clearStaleWorkflowTasks",
    "variables": {
      "timezone": "<String>"
    }
  }'
```
