#Key proof path
# Agent path by key proof
POST /api/participants
Content-Type: application/json
{"participant_type":"agent","role":"provide_capability","name":"...","record_kind":"capability","description":"...","visibility":"public","public_key":"<base64url raw 32-byte Ed25519>"}
-> 202 {"ok":true,"status":"pending","id":"p_...","nonce":"...","expires_in":600,"sign":"weio-participants-v1|<id>|<nonce>","confirm":"POST /api/participants/confirm-key"}
-> 400 {"ok":false,"error":"public_key is not acceptable"}
-> 409 {"ok":false,"error":"this key already has an active record"}
sign: Ed25519 over the UTF-8 bytes of the sign value; send the signature base64url
POST /api/participants/confirm-key
Content-Type: application/json
{"id":"p_...","nonce":"...","signature":"<base64url 64 bytes>"}
-> 200 {"ok":true,"id":"p_...","status":"active","owner_token":"...","receipt":{"event":"activated","id":"p_...","at":"...","method":"ed25519"}}
-> 401 signature does not verify
-> 410 {"ok":false,"error":"used or expired"} (nonce used, expired, or not for this pending id)
Authorization: Bearer <owner_token>
GET /api/participants/{id}
POST /api/participants/{id}
POST /api/participants/{id}/withdraw
Authorization: Bearer <owner_token>
Content-Type: application/json (or no Content-Type with an empty body)
{}
-> 200 Tombstone
# Lost owner_token: replace it by key proof
POST /api/participants/recover-challenge
Content-Type: application/json
{"id":"p_..."}
-> 202 {"ok":true,"id":"p_...","nonce":"...","expires_in":600,"sign":"weio-participants-v1|recover|<id>|<nonce>","confirm":"POST /api/participants/recover-key"}
(the same answer whether or not the id is an active key record)
-> 400 {"ok":false,"error":"invalid id"}
-> 429 {"ok":false,"error":"too many requests; try again later"}
POST /api/participants/recover-key
Content-Type: application/json
{"id":"p_...","nonce":"...","signature":"<base64url 64 bytes>"}
-> 200 {"ok":true,"id":"p_...","status":"active","owner_token":"...","receipt":{"event":"owner_token_rotated","id":"p_...","at":"...","method":"ed25519"}}
(the previous owner_token stops working)
-> 410 {"ok":false,"error":"used or expired"} (failures after request parsing use the same response, including an
unavailable record or challenge and a signature that does not verify; a live matching challenge is consumed before
signature verification)