Agent access
Start a key claim from inside an agent's session
Changed onCreates a claim and returns two things: a claim_code the human can read (PR-XXXX-XXXX) and a one time claim_token only the agent holds. Show the human approve_url; they sign in (or create the account there) and click Approve. Then poll GET /api/agent/claims/{code} with the claim_token as a Bearer until status is approved; that response carries the api_key once. The key is attached to the approving human's account and named "Agent: <client_name>".
Limits: 5 claims an hour per address, 20 pending per address, 2,000 pending globally (503 with Retry-After). A claim lives 15 minutes; the approval page can extend it to at most 60 minutes from creation.
post/api/agent/claims
Request
- Base URLhttps://api.prereason.com
- Authnone required
Request body
Example request
{
"client_name": "Claude Desktop"
}Response
Claim created; the token is shown once
Example response
{
"claim_code": "PR-7K3F-9Q2M",
"claim_token": "prc_...",
"status": "pending",
"approve_url": "https://www.prereason.com/claim/PR-7K3F-9Q2M",
"expires_in": 900,
"poll": {
"method": "GET",
"header": "Authorization: Bearer <claim_token>",
"interval_seconds": 5
}
}Changes
- info
endpoint added
- info