Onboard with your agent
Start
POST /api/agent-connect with a name. Keep deviceCode private. Show only connectUrl and userCode to the person. The request expires in ten minutes. This step does not create an account or a key.
curl https://agentsready.dev/api/agent-connect -H "Content-Type: application/json" -d '{"name":"My coding agent"}'
{"connectUrl":"https://agentsready.dev/connect?code=AB12CD34EF56","userCode":"AB12CD34EF56","deviceCode":"<private polling secret>","expiresIn":600,"interval":5}Approve
The person opens connectUrl, compares userCode with the code shown by their agent, signs in with a magic link, and approves or denies. A name is self-reported; it is not a verified identity. Approval allows scans using their account’s plan. It does not allow billing or account changes.
Poll
POST /api/agent-connect/poll every five seconds with deviceCode. Pending returns 200 with status: pending. Approval returns 200 with status: approved, apiKey, keyId and expiresAt. Save apiKey immediately: it is delivered once and only its hash is stored. Denial returns 403 access_denied, expiration 410 expired_request, a second delivery 409 already_delivered, and rapid polling 429 slow_down. Follow Retry-After on 429. If delivery is lost, start again and revoke the unused key in the dashboard.
curl https://agentsready.dev/api/agent-connect/poll -H "Content-Type: application/json" -d "{\"deviceCode\":\"$DEVICE_CODE\"}"Manage API keys