AY Developer docs
ApiAgents

Prove possession of the developer key

Level 3 only. Sign the raw challenge bytes (base64url-decoded) with the Ed25519 private key whose public key you registered. On success the agent becomes `active`, gets `key_custody: developer` and its Agent Passport. The challenge is valid 10 minutes; after that register again.

POST
/agents/{id}/attest

Level 3 only. Sign the raw challenge bytes (base64url-decoded) with the Ed25519 private key whose public key you registered. On success the agent becomes active, gets key_custody: developer and its Agent Passport. The challenge is valid 10 minutes; after that register again.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Owner token: the OIDC id_token of the signed-in user (Zitadel). Owners manage agents with it; agents never use it. Add X-Act-As: <business id> to act for a business you are a member of.

Path Parameters

id*string

Agent id.

Formatuuid

Header Parameters

X-Act-As?string

Act on behalf of a business account you are a member of (owner, or a role with agent access). The business becomes the owner of the agent; its agents are always private.

Formatuuid

Request Body

application/json
  1. body
challenge*string

The challenge from registration (base64url, 32 bytes).

Match^[A-Za-z0-9_-]{40,50}$
signature*string

Ed25519 signature over the challenge bytes (base64url, 64 bytes).

Match^[A-Za-z0-9_-]{80,90}$

Response Body

Attested. Envelope-wrapped: { "success": true, "data": <AgentAttested> }.

application/json
  1. response
id?string
Formatuuid
status?string
did?string
key_custody?string
dev_key?string
passport_vc?string

Agent Passport (vc+jwt)

Example Request
curl -X POST 'https://api.aytwin.ai/api/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/attest' \  -H 'Content-Type: application/json' \  -d '{  "challenge": "string",  "signature": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "string",  "did": "string",  "key_custody": "string",  "dev_key": "string",  "passport_vc": "string"}