---
title: "Refresh an agent claim code"
method: POST
path: "/agent/identity/claim"
tags: ["Agent Discovery"]
---

# Refresh an agent claim code

`POST /agent/identity/claim`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/agent/identity/claim`
- Auth: none required

Get a new user code for a pending agent registration, such as after the last one expired. The claim token must still be valid.

## Request body

- AgentClaimRequest: A request for a new user code.
  - `claim_token` string, required: The claim_token from the registration.
  - `email` string, email, required: The login_hint of the registration.

## Response `200`

The new claim attempt & its user code.

- AgentClaimAttempt: A new claim attempt for a pending agent registration.
  - `claim_attempt` AgentClaimChallenge, required: The code the user enters to claim the agent.
    - `expires_in` 600, required: Seconds until the user code expires.
    - `interval` 5, required: Seconds to wait between token polls.
    - `user_code` string, required: The 6-digit code the user enters.
    - `verification_uri` string, uri, required: The page where the user signs in & enters the code.
  - `claim_attempt_id` string, required
  - `expires_at` string, date-time, required: When the new user code expires.
  - `registration_id` string, required
  - `status` 'initiated', required

## Other responses

- `400`: The body isn't a valid claim request, the email doesn't match the registration, or the registration is no longer pending.
- `410`: The claim token is unknown or expired. Register again.
- `413` (unresolved $ref)
- `415` (unresolved $ref)
- `429`: Too many claim attempts. Retry after Retry-After.
- `500`: Unexpected error.
- `default`: Unexpected error.

## Changes

- **2026-11-02** `20d4bcaa8f4e`: 2 breaking, 1 info
  - the `claim_attempt/expires_in` response's property format changed from `int64` to no format for status `200`
  - the `claim_attempt/interval` response's property format changed from `int64` to no format for status `200`
  - removed the non-success response with the status `500`
- **2026-11-02** `48f2012c62b3`: 1 info
  - added the non-success response with the status `500`
- **2026-11-01** `1863d7ef8b4d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/agent/identity/claim/post.md)

---

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