---
title: "Claim or release a gift idea"
method: POST
path: "/api/gift/{token}/claim"
tags: ["gifts"]
---

# Claim or release a gift idea

`POST /api/gift/{token}/claim`

## Request

- Base URL: `https://leafle.org` (the document declares no server; this is the origin it was published from)
- URL: `https://leafle.org/api/gift/{token}/claim`
- Auth: none required

**Access: signed link.** The token in the path is the credential.

Mark one of this link's suggested books as yours to buy. A new claim needs a valid email for the release link; `undo: true` releases it without an email. Claims coordinate givers; they are not purchases or reservations. Anyone holding the gift link can change them.

## Path parameters

- `token` string, required

## Request body

- GiftClaimBody
  - `title` string, required
  - `author` string
  - `email` string
  - `undo` boolean

## Response `200`

Successful Response

- GiftClaimResult: POST /api/gift/{token}/claim — ack + the refreshed claim list.
  - `ok` boolean, required
  - `claimed` BookRef[], required
    - `title` string, required
    - `author` string, required

## Other responses

- `400`: Invalid input; see detail for the reason.
- `410`: This link is no longer available.
- `422`: Validation Error
- `429`: Request or usage limit reached. Wait before retrying.

---

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