Skip to content
POST /agent/identity/claim

A new `user_code` and `verification_uri`, usually because the last code expired (the poll answered `expired_token`). Taken any time while the registration waits for its person: the new attempt replaces the current one, whose link and code stop working at once (auth.md mints a new identifier per attempt). `email` must equal the registration's `login_hint`. At most 5 attempts per registration, and 5 requests a minute per address. Errors are `{ error, message }`.

Request Body

claim_tokenstring
emailstring · email

Response Body

claim_attemptobject
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_attempt_idstring
expires_atstring · date-time
registration_idstring
statusstring
Possible values:
initiated
curl -X POST 'https://api.elaichi.ai/agent/identity/claim' \
  -H 'Content-Type: application/json' \
  -d '{"claim_token":"your_claim_token","email":"your_email"}'
const body = {
  "claim_token": "your_claim_token",
  "email": "your_email"
};

const response = await fetch('https://api.elaichi.ai/agent/identity/claim', {
  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/claim"
headers = {
    "Content-Type": "application/json",
}
payload = {
    "claim_token": "your_claim_token",
    "email": "your_email"
}

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