# unlink_ticket_pull_request

`tools/call` · `POST /clanker/v1/tickets:unlink-pull-request`

Unlink a GitHub pull request from a ticket, such as one closed for a new pull request or linked by mistake. Returns the ticket. Needs write access.

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

## Inputs

- `ticket` (string, required): A ticket ID, such as WEB-31.
- `pullRequest` (string, required): A github.com pull request, by its link, such as https://github.com/acme/web/pull/142, or as owner/name#number, such as acme/web#142.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "unlink_ticket_pull_request",
    "arguments": {
      "ticket": "WEB-31",
      "pullRequest": "acme/web#142"
    }
  }
}
```

## 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/tickets:unlink-pull-request \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ticket": "WEB-31",
    "pullRequest": "acme/web#142"
  }'
```
