# reorder_pin

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

Move one of your person's pins right before or after another. Give before or after, not both. Returns their pins in the new order. Needs write access.

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

## Inputs

- `kind` (string, one of: `ticket`, `project`, `product`, `environment`, `team`, required): What the pin points at: ticket, project, product, environment or team.
- `key` (string, required): The key its pages use: a ticket's ID such as WEB-31, a team's key such as WEB, or a project's, product's or environment's slug such as docs-launch.
- `before` (object): The pin to go right before.
  - `kind` (string, one of: `ticket`, `project`, `product`, `environment`, `team`, required): What the pin points at: ticket, project, product, environment or team.
  - `key` (string, required): The key its pages use: a ticket's ID such as WEB-31, a team's key such as WEB, or a project's, product's or environment's slug such as docs-launch.
- `after` (object): The pin to go right after.
  - `kind` (string, one of: `ticket`, `project`, `product`, `environment`, `team`, required): What the pin points at: ticket, project, product, environment or team.
  - `key` (string, required): The key its pages use: a ticket's ID such as WEB-31, a team's key such as WEB, or a project's, product's or environment's slug such as docs-launch.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_pin",
    "arguments": {
      "kind": "ticket",
      "key": "WEB-31",
      "before": {
        "kind": "project",
        "key": "docs-launch"
      }
    }
  }
}
```

## 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/pins:reorder \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "ticket",
    "key": "WEB-31",
    "before": {
      "kind": "project",
      "key": "docs-launch"
    }
  }'
```
