Quick links

AS Core

Mandate and ticket signing and verification (protocol v0.7)

GET/api/as/pubkeyPublic

Get AS Ed25519 public key

Response

{ "publicKey": "hex-string" }
GET/api/as/compatPublic

What this Authority Server expects of its clients (protocol version, endpoints, retired fields)

Response

{ "protocolVersion": "0.7", "supportedVersions": ["0.7"], "endpoints": { "mandate": "/api/as/mandate", "ticket": "/api/as/ticket", ... } }
POST/api/as/mandateAPI key or session

Sign a mandate (replaces /api/as/attest, which now answers 410)

Refuses a request without supported_versions covering "0.7" with VERSION_UNSUPPORTED, and a profile_hash mismatch with PROFILE_HASH_MISMATCH.

Request body

{
  "authorization_id": "authz_<uuid>",
  "profile_id": "charge@0.6",
  "profile_hash": "sha256:...",
  "supported_versions": ["0.7"],
  "bounds": { "profile": "charge@0.6", "amount_max": 100 },
  "scope_hash": "sha256:...",
  "execution_context_hash": "sha256:...",
  "gate_content_hashes": { "intent": "sha256:..." },
  "commitment_mode": "automatic",
  "domain": "finance",
  "did": "did:key:...",
  "group_id": "demo-team",
  "ttl": 3600
}

Response

{
  "authorization_id": "authz_...",
  "mandate_id": "uuid",
  "bounds_hash": "sha256:...",
  "scope_hash": "sha256:...",
  "blob": "base64url-encoded",
  "expires_at": 1772495020,
  "status": "active"
}
POST/api/as/ticketAPI key or session

Request a mandate ticket for one execution (replaces /api/as/receipt, which now answers 410)

On refusal: { "approved": false, "errors": [{ "code": "BOUND_EXCEEDED" | "CUMULATIVE_LIMIT_EXCEEDED" | "MANDATE_NOT_FOUND" | "MANDATE_EXPIRED" | "MANDATE_REVOKED" | "APPROVAL_REQUIRED" | ..., "message", ... }] }.

Request body

{
  "authorizationId": "authz_<uuid>",
  "profileId": "charge@0.6",
  "action": "create_payment_link",
  "actionType": "charge",
  "idempotencyKey": "uuid",
  "executionContext": { "amount": 5, "currency": "EUR" }
}

Response

{ "approved": true, "ticket": { "id", "mandateId", "boundsHash", "limits", "version": "0.7", "issuer": "did:key:...", "signature", ... } }
POST/api/as/verifyPublic

Verify a mandate blob

Request body

{ "blob": "base64url-encoded" }

Response

{ "valid": true, "payload": { ... }, "revoked": null }
POST/api/as/verify-ticketPublic

Verify a signed ticket (replaces /api/as/verify-receipt, which now answers 410)

Request body

{ "ticket": { ...ticketFields, "signature": "base64url-encoded" } }

Response

{ "valid": true }

Auth

Registration, sessions, and key management

POST/api/auth/registerPublic

Register a new user and get an API key

Request body

{ "name": "Alice", "email": "alice@example.com" }

Response

{
  "user": { "id": "...", "name": "Alice", "email": "...", "did": "did:key:..." },
  "apiKey": "uuid"    // shown once, never retrievable again
}
POST/api/auth/sessionX-API-Key header

Create a browser session (sets hap-session cookie)

Sets HttpOnly cookie. Use for browser-based access.

Response

{ "user": { "id": "...", "name": "...", "email": "...", "did": "..." } }
POST/api/auth/renew-keySession or API key

Rotate API key (old key invalidated immediately)

Response

{ "apiKey": "new-uuid" }
POST/api/auth/logoutSession cookie

End session and clear cookie

Response

{ "ok": true }

Profiles

Agent execution profiles (protocol and community)

GET/api/profilesPublic

List and search profiles

Query parameters

?type=protocol|community  &author={userId}  &q={search}

Response

{ "profiles": [{ "id", "version", "description", "paths" }] }
POST/api/profilesAPI key or session

Create a community profile

Profile ID is auto-namespaced. Immutable once published. TTL max 24h.

Request body

{ "profile": { ...AgentProfile JSON } }

Response

{ "profile_id": "community/{userId}/{name}@{version}", "created_at": ... }
GET/api/profiles/{id}Public

Get full profile definition

Response

{ ...full AgentProfile }

Groups

Authorization mapping for domain authority

GET/api/groupsAPI key or session

List user's groups with their domains

Response

{ "groups": [{ ...group, "myDomains": [...], "isAdmin": bool }] }
POST/api/groupsAPI key or session

Create a new group

Request body

{ "name": "Backend Team" }

Response

{ "group": { ... }, "inviteCode": "abc12345" }
POST/api/groups/joinAPI key or session

Join a group via invite code

Request body

{ "inviteCode": "abc12345" }

Response

{ "group": { ... }, "member": { ... } }
GET/api/groups/{id}API key or session (member)

Group detail with all members

Response

{ "group": { ... }, "members": [...], "isAdmin": bool }
PUT/api/groups/{id}/members/{userId}API key or session (admin)

Assign domains to a group member

Request body

{ "domains": ["engineering", "security"] }

Response

{ "member": { ... } }
DELETE/api/groups/{id}/members/{userId}API key or session (admin)

Remove a member from the group

Response

{ "ok": true }
POST/api/groups/{id}/inviteAPI key or session (admin)

Regenerate invite code

Request body

{ "expiresIn": 86400 }   // optional, seconds

Response

{ "inviteCode": "...", "expiresAt": ... }

Mandates

Query mandate status (replaces the Attestations group; the old /api/attestations* paths now answer 410)

GET/api/mandatesPublic

Get an authorization’s mandate blobs + state

Query parameters

?authorization_id=authz_<uuid>

Response

{ "authorization_id", "bounds_hash", "scope_hash", "mandates": [{ "domain", "blob", "expires_at" }] }
GET/api/mandates/mineAPI key or session

User's own mandates with status filtering

Query parameters

?status=active|pending|expired|revoked

Response

{ "mandates": [{ "authorization_id", "boundsHash", "scopeHash", "profileId", "status", ... }] }
GET/api/mandates/pendingPublic

Authorizations pending mandate for a domain

Query parameters

?domain=finance

Response

{ "pending": [{ "authorization_id", "missing_domains", ... }] }

Other

Utility endpoints

GET/api/usersPublic

List demo users (API keys omitted)

Response

{ "users": [{ "id", "name", "email", "did" }] }
GET/api/healthPublic

Server health check

Response

{ "status": "ok", "timestamp": "..." }