Skip to main content

API Reference

Every endpoint lives under /api/v1. Two auth modes. API key for signers. JWT session cookie for the dashboard. Some endpoints (signer list, audit log) accept either.

Authentication

Pass the signer’s API key in the x-api-key header. Generated during signer creation.
curl -H "x-api-key: your-api-key" \
  https://api.agentaos.ai/api/v1/sign/session

Signer-Facing Endpoints

API key auth. These are what your agent or CLI calls.
MethodPathPurpose
POST/sign/sessionStart interactive Signer+Server signing session
POST/sign/roundExchange CGGMP24 protocol messages
POST/sign/completeFinalize signing and broadcast transaction
POST/sign-message/sessionStart interactive message signing session
POST/sign-message/completeFinalize message signing, return (v, r, s)
Signing is an interactive multi-round protocol. The client calls /sign/session once, then /sign/round repeatedly until the protocol completes, then /sign/complete to finalize. The full key is never reconstructed.

Dashboard-Facing Endpoints

JWT session auth. These power the dashboard UI.

Signer Management

MethodPathPurpose
POST/signersCreate a new signer (triggers DKG)
GET/signersList all signers
GET/signers/:idGet signer details
PATCH/signers/:idUpdate signer (name, description)
DELETE/signers/:idDelete signer
POST/signers/:id/pausePause signer (blocks all signing)
POST/signers/:id/resumeResume paused signer
GET/signers/:id/balanceGet signer ETH balance
POST/signers/:id/simulateSimulate transaction (gas estimate)
POST/signers/:id/regenerate-keyRotate API key
GET/signers/:id/tokensList tracked tokens
GET/signers/:id/token-balancesGet token balances
POST/signers/:id/tokensAdd token to tracking list
DELETE/signers/:id/tokens/:tokenIdRemove tracked token

Guardrails (Rules Engine)

MethodPathPurpose
GET/signers/:id/policyGet active guardrail policy
PUT/signers/:id/policySave and activate guardrail rules
GET/signers/:id/policy/draftGet draft policy
PUT/signers/:id/policy/draftSave policy as draft
POST/signers/:id/policy/activateActivate the draft policy
POST/signers/:id/policy/backtestBacktest policy against historical transactions

Built-in Policies

Eight policy types you can stack on any signer. Each one is a hard constraint — if a transaction violates any active policy, the server refuses to co-sign.
MethodPathPurpose
GET/signers/:id/policiesList active policies for a signer
POST/signers/:id/policiesCreate a policy
PATCH/policies/:idUpdate policy config
DELETE/policies/:idDelete policy
Available policy types:
TypeWhat It Enforces
spending_limitMax value per transaction
daily_limitMax total spend per 24h
monthly_limitMax total spend per calendar month
allowed_contractsWhitelist of contract addresses the signer can interact with
allowed_functionsWhitelist of function selectors (e.g. only transfer, approve)
blocked_addressesBlacklist — block sends to known bad actors or honeypots
rate_limitMax number of transactions in a time window
time_windowOnly allow signing during specific hours (e.g. business hours UTC)
Built-in policies and rules engine policies are evaluated together. Every active constraint must pass before the server co-signs. Stack them to build defense in depth.

User Share (Browser Signing)

MethodPathPurpose
POST/signers/:id/user-shareStore wallet-encrypted user share blob
GET/signers/:id/user-shareRetrieve encrypted user share blob

User+Server Signing (Dashboard Override)

MethodPathPurpose
POST/signers/:id/sign/sessionStart User+Server signing session
POST/signers/:id/sign/roundExchange CGGMP24 protocol messages
POST/signers/:id/sign/completeFinalize User+Server signing
User+Server signing runs CGGMP24 in the browser via WASM. The user share is decrypted client-side with the wallet signature. The server only sees protocol messages — never the raw share.

DKG (Distributed Key Generation)

MethodPathPurpose
POST/dkg/initStart DKG ceremony
POST/dkg/finalizeComplete DKG, distribute shares

Audit Log

MethodPathPurpose
GET/audit-logPaginated audit log (all signing requests)
GET/audit-log/exportExport audit log as CSV

Auth Endpoints

MethodPathPurpose
POST/auth/registerRegister new wallet user
POST/auth/verify-emailVerify email address
POST/auth/passkey/registerRegister a passkey (WebAuthn)
POST/auth/passkey/login-challengeGet passkey login challenge
POST/auth/passkey/loginAuthenticate with passkey, receive JWT
POST/auth/logoutInvalidate session
GET/auth/meGet current authenticated user

Networks and Contracts

MethodPathPurpose
GET/networksList all enabled networks
GET/contractsList known contracts (supports ?chainId= filter)
POST/contractsAdd a known contract
DELETE/contracts/:idRemove a known contract

System

MethodPathPurpose
GET/health (no /api/v1 prefix)Health check. Returns 200 when healthy, 503 when degraded.

Error Responses

All errors follow a consistent format:
{
  "statusCode": 403,
  "message": "Policy violation",
  "violations": [
    {
      "policyId": "uuid",
      "type": "spending_limit",
      "message": "Transaction exceeds spending limit of 1.0 ETH"
    }
  ]
}
StatusMeaning
400Bad request — invalid input
401Unauthorized — missing or invalid auth
403Forbidden — policy violation or signer paused
404Not found
503Service degraded — Vault sealed or DB unreachable
Policy violations return 403 with a violations array. Every violation includes the policy type and a human-readable message. All violations are logged to the audit trail.

Next Steps