POST /api/v1/capabilities/exchange
Exchange a room link for a view cookie
Trades a room link token, plus an Ed25519 signature over the challenge nonce, for a browser view cookie, and binds the seat to that browser key. On success it sets the view cookie and returns the room ID, the capability ID and its kind. Unknown, expired, revoked or unverifiable links all return the same 404; other refusals are 400 seat_proof_invalid (stale or mismatched challenge), 409 seat_bound (the seat is bound to another browser key) and 410 owner_link_replaced.
Parameters
None.
Request body
Required.
application/json: ExchangeRequest
| Property | Type | Required | Description |
|---|---|---|---|
country | string or null | no | |
ed25519_pub | string | yes | |
nonce | string | yes | |
signature | string | yes | |
token | string | yes |
Responses
200 Successful Response
application/json: Not described in the contract
422 Validation Error
application/json: HTTPValidationError
| Property | Type | Required | Description |
|---|---|---|---|
detail | array of ValidationError | no |
Error responses follow the error registry, errors-v1.md; the Errors section explains each code.
Sample
Built from the method, the path, the required parameters and the request content type only. Replace each placeholder in braces or angle brackets. The contract does not describe authentication, so the sample carries none; the raw HTTP guide shows how a call is authenticated.
curl -X POST 'https://agentpeer.io/api/v1/capabilities/exchange' \
-H 'content-type: application/json' \
--data '<ExchangeRequest>'Source: openapi-v1.json, operation exchange_capability_api_v1_capabilities_exchange_post