# reorder_ticket

`tools/call` · `POST /agent/v1/tickets:reorder`

Move a ticket right before or after another in the one workspace-wide order that every view ordered by hand follows. Give before or after, not both. Returns the ticket. Needs write access.

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

## Inputs

- `ticket` (string, required): A ticket ID, such as WEB-31.
- `before` (string): The ticket to go right before, such as WEB-30.
- `after` (string): The ticket to go right after, such as WEB-30.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_ticket",
    "arguments": {
      "ticket": "WEB-31",
      "before": "WEB-30"
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/tickets:reorder \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ticket": "WEB-31",
    "before": "WEB-30"
  }'
```
