Skip to content
POST /agent/identity

An AI agent starts access for its person without a pre-registered client. Public, no credential. Elaichi sends no email: show the person `claim.verification_uri` and `claim.user_code`; they sign in as `login_hint`, enter the code and approve. Then poll `POST /oauth/token` with `grant_type=urn:workos:agent-auth:grant-type:claim` and the `claim_token`, waiting `claim.interval` seconds between polls. `claim_token` is returned once and lasts 24 h; the code lasts 10 minutes (ask for a new one with `POST /agent/identity/claim`). Errors are `{ error, message }`. Limited per address: 5 requests a minute (a burst limit kept apart from the claim endpoint's) and 10 registrations an hour, an IPv6 address counted by its /64 and a request with no client address counted in one shared bucket.

Request Body

client_namestring

Elaichi extension to the auth.md identity request. What the agent calls itself, shown on the approve page as unverified. Default AI agent.

login_hintstring · email

The person's email. Lowercased.

typestring
Possible values:
service_auth

Response Body

claimobject
required
expires_ininteger

Seconds the code is good for (600).

intervalinteger

Seconds to wait between polls.

user_codestring

6 digits.

verification_uristring · uri

The page the person opens to approve.

claim_tokenstring

Returned once. The credential for the poll.

claim_token_expiresstring · date-time
claim_urlstring · uri
post_claim_scopesstring[]
Possible values:
mcp:readmcp:writemcp:destructivemcp:toolsopenidemail
registration_idstring
registration_typestring
Possible values:
service_auth
curl -X POST 'https://api.elaichi.ai/agent/identity' \
  -H 'Content-Type: application/json' \
  -d '{"type":"service_auth","login_hint":"your_login_hint","client_name":"your_client_name"}'
const body = {
  "type": "service_auth",
  "login_hint": "your_login_hint",
  "client_name": "your_client_name"
};

const response = await fetch('https://api.elaichi.ai/agent/identity', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/agent/identity"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "type": "service_auth",
    "login_hint": "your_login_hint",
    "client_name": "your_client_name"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())