Start agent registration (auth.md service_auth)
/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
Elaichi extension to the auth.md identity request. What the agent calls itself, shown on the approve page as unverified. Default AI agent.
The person's email. Lowercased.
service_auth
Response Body
Seconds the code is good for (600).
Seconds to wait between polls.
6 digits.
The page the person opens to approve.
Returned once. The credential for the poll.
mcp:readmcp:writemcp:destructivemcp:toolsopenidemail
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())