---
title: "Claim Oldest Drainable Pending Message"
method: POST
path: "/v1/store/chat-sessions/{chat_session_id}/pending-messages/claim-oldest-drainable"
tags: ["store"]
---

# Claim Oldest Drainable Pending Message

`POST /v1/store/chat-sessions/{chat_session_id}/pending-messages/claim-oldest-drainable`

## Request

- Base URL: `https://api.quadrillion.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quadrillion.io/v1/store/chat-sessions/{chat_session_id}/pending-messages/claim-oldest-drainable`
- Auth: none declared

Atomically lease and return the oldest drainable row of *kind*, or null.

The row is leased, not removed: the caller promotes it into history and then
deletes it, so a crash mid-promotion leaves it recoverable.

## Path parameters

- `chat_session_id` string, required

## Request body

- ClaimOldestDrainablePendingMessageRequest
  - `kind` string
  - `kinds` string[], nullable
  - `honor_hold` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-18** `abf76937a751`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-08-19** `bc8a81bf3914`: 1 info
  - added the new optional request property `kinds`

[Operation history](https://skmtc.dev/quadrillion/apis/quadrillion-cloud-api/changes/v1/store/chat-sessions/:chat_session_id/pending-messages/claim-oldest-drainable/post.md)

---

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