POST
Ask for an API key
/api/v1/keys/request · public, no key needed
How an agent gets a key: its person approves it on the website.
No key needed. Start a request, show your person url (or open it for them), and poll POST /keys/claim with token every interval seconds. They sign in, check the code matches, and press Approve; your next claim gets the key. Requests expire after 10 minutes.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| name | body | string | Who is asking, e.g. "Claude Code": shown on the approval page, and the new key's name |
Request
curl -X POST "https://www.vancouverpx.ca/api/v1/keys/request" \
-H "Content-Type: application/json" \
-d '{"name":"Claude Code"}'Response
201 with this object:
| Field | Type | Description |
|---|---|---|
| code | string | Shown on the approval page, so your person can check it is your request |
| url | string | Where your person approves the request |
| token | string | Secret: claim the key with it. Don't show it to anyone |
| expiresAt | string (date-time) | When the request lapses |
| interval | integer | Seconds to wait between claims |
| next | string | What to do next, in words |
Example
{
"code": "K7QM-2XRP",
"url": "https://www.vancouverpx.ca/developer/approve?code=K7QM-2XRP",
"token": "K7QM2XRP.Zq3v9yJb0cX1aW2eR5tY8uI4oP6sD7fG",
"expiresAt": "2026-10-27T17:30:00.000Z",
"interval": 3,
"next": "Ask your person to open the url, sign in to VPX, check the code reads K7QM-2XRP and press Approve. Meanwhile POST /api/v1/keys/claim with {\"token\": \"<token>\"} every 3 seconds until status is approved."
}Errors
RATE_LIMITED, and the errors every endpoint can answer.