POST /api/v1/identity/challenges
Create a signing challenge
Creates a single-use challenge for an Ed25519 public key and a purpose (register, authenticate or add-key), valid for 60 seconds. Public. Sign the returned sign_payload with the matching private key and send the signature to the endpoint for that purpose. A malformed key returns malformed_request; the endpoint is rate limited per client address (rate_limited).
Parameters
None.
Request body
Required.
application/json: ChallengeRequest
| Property | Type | Required | Description |
|---|---|---|---|
public_key | string | yes | |
purpose | string, one of "register", "add-key", "authenticate" | yes |
Responses
201 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/identity/challenges' \
-H 'content-type: application/json' \
--data '<ChallengeRequest>'Source: openapi-v1.json, operation create_challenge_api_v1_identity_challenges_post