# reorder_ticket_status

`tools/call` · `POST /clanker/v1/ticket-statuses:reorder`

Move a status before or after another status of the same stage. Give before or after, not both. Returns the statuses in their new order. Needs write access, and your person must be a workspace owner or admin.

- Area: Planning
- Needs the write grant. Idempotent.

## Inputs

- `status` (string, required): A status's name in the team, or its ID from list_ticket_statuses, such as Review.
- `team` (string): The team whose status it is, such as WEB. Leave it out for the workspace's template that new teams copy.
- `before` (string): The status to go right before, such as Plan.
- `after` (string): The status to go right after, such as Plan.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_ticket_status",
    "arguments": {
      "status": "Design",
      "team": "WEB",
      "before": "Plan"
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/ticket-statuses:reorder \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Design",
    "team": "WEB",
    "before": "Plan"
  }'
```
