---
title: agents.register | Doing Work API
description: auth.md agent registration. type anonymous: get a claim_token, then call the claim endpoint with the email of the shop owner who should claim you. type ser
url: https://doingwork.work/docs/reference/agents-register/
---

# agents.register

auth.md agent registration. type anonymous: get a claim_token, then call the claim endpoint with the email of the shop owner who should claim you. type service_auth: pass login_hint (that email) and get the claim code in one step. Before the claim you only reach public calls (pre_claim_scopes is empty). Optional scope narrows the key you will get (read_only, no_money); client_name is shown to the owner. identity_assertion is not accepted (issuer_not_enabled).

|  |  |
|---|---|
| Who | Agents can call this |
| REST | `POST /v1/agent/identity` |
| MCP tool | `agents_register` |
| 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 agent registration. type anonymous: get a claim_token, then call the claim endpoint with 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 |
|---|---|---|
| `type` | string (one of anonymous, service_auth, identity_assertion) | yes |
| `login_hint` | string | no |
| `assertion_type` | string | no |
| `assertion` | string | no |
| `client_name` | string | no |
| `scope` | string | no |

## Example

```http
POST https://doingwork.work/v1/agent/identity
content-type: application/json
Idempotency-Key: 3f1c...

{
  "type": "anonymous"
}
```

## Output

| Field | Type | Always there |
|---|---|---|
| `registration_id` | string | yes |
| `registration_type` | string (one of anonymous, service_auth) | yes |
| `pre_claim_scopes` | array | yes |
| `claim_url` | string | yes |
| `claim_token` | string | yes |
| `claim_token_expires` | string (date-time) | yes |
| `post_claim_scopes` | array | yes |
| `claim` | object | no |
| `claim.user_code` | string | yes |
| `claim.expires_in` | integer | yes |
| `claim.verification_uri` | string | yes |
| `claim.interval` | integer | yes |

```json
{
  "registration_id": "00000000-0000-4000-8000-000000000000",
  "registration_type": "anonymous",
  "pre_claim_scopes": [
    "..."
  ],
  "claim_url": "...",
  "claim_token": "...",
  "claim_token_expires": "...",
  "post_claim_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/). |
