# create_pin

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

Pin a ticket, project, product, environment or team for your person, such as the ticket you are working on. It joins the end of their sidebar's Pinned list at once; pinning something already pinned changes nothing. Returns their pins in 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.

## Request

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

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