---
title: "Approve a pairing (browser-side, signed-in user)"
method: POST
path: "/api/pair/approve"
---

# Approve a pairing (browser-side, signed-in user)

`POST /api/pair/approve`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/api/pair/approve`
- Auth: HTTP bearer

Idempotent. The plaintext token is delivered to the agent via `/api/pair/poll`, never returned here. If the code belongs to an app created with `pair: true` that nobody has claimed, approving also claims that app for the approver, best-effort. The legacy `/pair/approve` path 308s here.

## Request body

- object
  - `user_code` string, required

## Response `200`

Approved

- PairApproveResponse: Pairing approved. `claimed` is true when the code's bound app (`POST /app {pair: true}`) belongs to the approver after this approval, whether this approval moved it or it was already theirs.
  - `ok` true, required
  - `claimed` boolean, required

## Other responses

- `400`: Body is not JSON or `user_code` is missing/malformed.
- `401`: Sign in required to approve a pairing.
- `404`: No pairing matches that code.
- `409`: Pairing already approved, or another user claimed its bound app first.
- `410`: Pairing expired.
- `429`: Rate limited: too many codes from this account or address, or, for a code bound to an unclaimed app, claims are paused this minute after too many missed codes. Retry after `Retry-After`.

---

[API](https://skmtc.dev/charm/apis/charming-api.md) · [All operations](https://skmtc.dev/charm/apis/charming-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charm/apis/charming-api/revisions/a9d06c419b3a?raw)
