--- title: agents.approve | Doing Work API description: Hosted claim page only: the shop owner whose email the claim names types the agent's 6 digit code, picks one of their shops and accepts the agent key terms. url: https://doingwork.work/docs/reference/agents-approve/ --- # agents.approve Hosted claim page only: the shop owner whose email the claim names types the agent's 6 digit code, picks one of their shops and accepts the agent key terms. Makes a named agent key for that shop. Optional scopes narrow it further than the agent asked. | | | |---|---| | Who | Hosted page only (a person does it in the browser) | | REST | `POST /v1/agent/identity/approve` | | MCP tool | Not an MCP tool | | 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 Hosted claim page only: the shop owner whose email the claim names types the agent's 6 digit code, picks one of their shops and accepts the agent key terms. Makes a named agent key for that shop. ## What to tell the owner Send the person the link. They finish this step themselves on the page; you never do it for them. ## Input | Field | Type | Required | |---|---|---| | `claim_attempt_token` | string | yes | | `user_code` | string | yes | | `shop_id` | string | yes | | `scopes` | array | no | | `accept_terms_version` | string | yes | ## Example ```http POST https://doingwork.work/v1/agent/identity/approve content-type: application/json Idempotency-Key: 3f1c... { "claim_attempt_token": "...", "user_code": "...", "shop_id": "00000000-0000-4000-8000-000000000000", "accept_terms_version": "..." } ``` ## Output | Field | Type | Always there | |---|---|---| | `claimed` | boolean | yes | | `key_id` | string | yes | | `label` | string | yes | | `scopes` | array | yes | ```json { "claimed": true, "key_id": "00000000-0000-4000-8000-000000000000", "label": "...", "scopes": [ "..." ] } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |