---
title: "Claim an agent into an organization"
method: POST
path: "/agents/{agent_id}/claim"
tags: ["Agents"]
---

# Claim an agent into an organization

`POST /agents/{agent_id}/claim`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/agents/{agent_id}/claim`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Mnemom-Api-Key`
  - API key in cookie `mnemom_session`

Binds an unclaimed (or legacy hash-claimed) agent to the authenticated caller and an organization. Requires authentication — the caller proves possession of the agent via `hash_proof`, and the agent's `org_id` is set to the resolved org (the authz + listing boundary, ADR-062). Supply `org_id` to claim into a specific org the caller is a member of (role floor: member); omit it to claim into the caller's personal org. Idempotent: re-claiming an agent the caller already owns returns 200 with the resolved org.

## Path parameters

- `agent_id` string, required

## Request body

- object
  - `hash_proof` string, required: Agent possession proof — either the live birth token (`mnbt_…`) whose row pins this agent's hash, or the full 64-hex SHA-256 digest of `${apiKey}|${agentName}` (or `${apiKey}` for an unnamed singleton agent).
  - `org_id` string: Optional. The organization to claim the agent into (e.g. `org-...` or `pers-...`). The caller must be a member of this org (role floor: member). If omitted, the agent is claimed into the caller's personal org.

## Response `200`

Agent claimed into the resolved organization

- object
  - `claimed` boolean, required
  - `agent_id` string, required
  - `org_id` string, required: The organization the agent was claimed into (echoes the resolved org — the supplied `org_id`, or the caller's personal org when omitted).
  - `claimed_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `409`: Agent already claimed by a different account (`agent_cross_tenant`). The proof is valid but the agent is owned by another principal — this is a resource-state conflict, not a permission failure. Aligns with the hijack-closure contract (#609 / MNE-395).
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `503`: An upstream dependency is currently unavailable. The request was not processed; retry after the cooldown window.

---

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