---
title: "Claim Agent"
method: POST
path: "/agents/{agent_id}:claim"
tags: ["Agents"]
---

# Claim Agent

`POST /agents/{agent_id}:claim`

Claim ownership of a self-registered agent using its claim token.

Authenticated by the platform bearer token but requires **no** agent
permission — the single-use claim token minted at ``/register`` is the proof,
so the registering human (even a plain member) can take ownership. Sets
``owner_id`` to the caller; the existing scoping + approve paths then apply.

Restricted to ``USER`` actors: ``Agent.owner_id`` is a FK to ``users.id``, so
only a human can own an agent. The ``require_actor_type`` gate rejects a
non-user actor (agent/service-account/toolkit) at the boundary with a 403;
``AgentService.claim`` re-checks the same invariant as defense-in-depth.

``allow_expired_password=True`` is intentional (matching ``GET /agents/{id}``):
claiming is an onboarding step a brand-new user may hit before they have
rotated a temporary password, so a must-change-password state must not block
it. The claim only sets ownership — it grants no scopes and cannot act as the
agent — so allowing it under an expired password is low-risk.

## Path parameters

- `agent_id` string, required

## Request body

- ClaimRequest — Request body for claiming ownership of a self-registered agent.
  - `token` string, required

## Response `200`

Successful Response

- AgentResponse — Agent representation in API responses.
  - `approved_at` string, date-time, nullable
  - `approved_by` string, nullable
  - `created_at` string, date-time, required
  - `denial_reason` string, nullable
  - `denied_by` string, nullable
  - `description` string, nullable
  - `has_api_key` boolean
  - `id` string, required
  - `name` string, required
  - `owner_id` string, nullable
  - `parent_agent_id` string, nullable
  - `registered_by` string, required
  - `status` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/jentic/apis/jentic-control-plane-api.md) · [All operations](https://skmtc.net/jentic/apis/jentic-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jentic/jentic-control-plane-api/revisions/4296a42a693e/schema)
