---
title: "Register an agent for a person (service_auth)"
method: POST
path: "/agent/identity"
tags: ["OAuth"]
---

# Register an agent for a person (service_auth)

`POST /agent/identity`

## Request

- Base URL: `https://codeatlas.com.br`
- URL: `https://codeatlas.com.br/agent/identity`
- Auth: none required

WorkOS auth.md service_auth registration. Send the person's email as login_hint. CodeAtlas emails that address a confirmation link. Show the returned claim.user_code to the person; they open the link, type the code and confirm. Then poll POST /oauth2/token with grant_type=urn:workos:agent-auth:grant-type:claim and the claim_token. Answers 503 when the confirmation email cannot be sent. Limit: 10 per hour per IP.

## Request body

- ServiceAuthRequest
  - `type` 'service_auth', required
  - `login_hint` string, email, required: The email of the person the agent acts for.

## Response `200`

Registration created. Surface claim.verification_uri and claim.user_code to the person.

- ServiceAuthResponse
  - `registration_id` string, required
  - `registration_type` 'service_auth', required
  - `claim_token` string, required: Returned once. Keep in memory for the ceremony.
  - `claim_token_expires` string, date-time, required
  - `claim_url` string, uri, required
  - `post_claim_scopes` string[], required
  - `claim` object, required
    - `user_code` string, required
    - `verification_uri` string, uri, required
    - `expires_in` 600, required
    - `interval` 5, required

## Other responses

- `400`: invalid_request, anonymous_not_enabled or identity_assertion_not_enabled.
- `429`: Rate limit exceeded. Wait Retry-After seconds.
- `503`: temporarily_unavailable: the confirmation email could not be sent.

---

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