---
title: "Claim Custom Row"
method: POST
path: "/core/custom-data/tables/{name}/claim"
tags: ["custom_data"]
---

# Claim Custom Row

`POST /core/custom-data/tables/{name}/claim`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/custom-data/tables/{name}/claim`
- Auth: HTTP bearer

Atomically take one matching row and mark it.

The operation a query plus an upsert cannot express: two callers doing that
both read the same row before either writes, and upsert has no precondition
to refuse the second. Here the select and the mark are one statement.

An empty result is a 200 with ``found: false`` — running out of rows is an
answer the caller acts on, not an error.

## Path parameters

- `name` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- ClaimRequest: Take one matching row and mark it. Same filter and sort vocabulary as a query — the row you claim is the row that query would have returned first. `patch` is what changes about it, and it is deliberately not a filter: the caller says which row, the config says what happens to it.
  - `filters` QueryFilter[]
    - `property` string, required
    - `op` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'contains' | 'starts_with'
    - `value` unknown
  - `order` QuerySort[]
    - `property` string, required
    - `direction` 'asc' | 'desc'
  - `patch` object, required: Declared properties to set on the claimed row, merged over what is already there. Cannot include the row key.

## Response `200`

Successful Response

- ClaimResponse
  - `found` boolean, required
  - `record` object, nullable

## Other responses

- `404`: Not found
- `422`: Validation Error

---

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