--- title: agents.claim | Doing Work API description: auth.md claim. Pass your claim_token and the email of the shop owner who should claim you. You get a 6 digit user_code and a verification_uri: tell the. url: https://doingwork.work/docs/reference/agents-claim/ --- # agents.claim auth.md claim. Pass your claim_token and the email of the shop owner who should claim you. You get a 6 digit user_code and a verification_uri: tell the person to open the link, sign in with that email and type the code. Then poll the token endpoint with grant_type urn:workos:agent-auth:grant-type:claim. Calling again with the same claim_token starts a fresh code and cancels the old one. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/agent/identity/claim` | | MCP tool | `agents_claim` | | Writes | yes, send an Idempotency-Key | | Area | [Sign-in and agent access](https://doingwork.work/docs/reference/#sign-in-and-agent-access) | ## When to use it auth.md claim. Pass your claim_token and the email of the shop owner who should claim you. ## What to tell the owner Say what you did in plain words and what happens next. ## Input | Field | Type | Required | |---|---|---| | `claim_token` | string | yes | | `email` | string | yes | ## Example ```http POST https://doingwork.work/v1/agent/identity/claim content-type: application/json Idempotency-Key: 3f1c... { "claim_token": "...", "email": "owner@example.com" } ``` ## Output | Field | Type | Always there | |---|---|---| | `registration_id` | string | yes | | `claim_attempt_id` | string | yes | | `status` | string (one of initiated) | yes | | `expires_at` | string (date-time) | yes | | `claim_attempt` | object | yes | | `claim_attempt.approval` | string | yes | | `claim_attempt.authenticated` | string | yes | | `claim_attempt.persistence` | string | yes | | `claim_attempt.next_step` | string | yes | | `claim_attempt.claim_attempt_token` | string | yes | | `claim_attempt.user_code` | string | yes | | `claim_attempt.expires_in` | integer | yes | | `claim_attempt.interval` | integer | yes | | `claim_attempt.claim_page` | string | yes | | `claim_attempt.verification_uri_length` | integer | yes | | `claim_attempt.verification_uri` | string | yes | ```json { "registration_id": "00000000-0000-4000-8000-000000000000", "claim_attempt_id": "00000000-0000-4000-8000-000000000000", "status": "initiated", "expires_at": "...", "claim_attempt": { "approval": "...", "authenticated": "...", "persistence": "...", "next_step": "...", "claim_attempt_token": "...", "user_code": "...", "expires_in": 1, "interval": 1, "claim_page": "...", "verification_uri_length": 1, "verification_uri": "..." } } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |