APIHTTP · JSON · Bearer sessions

Self-serve API

The self-serve API is the HTTP backend behind the Essey on Sui console. It signs people in, creates and runs their hosted agents, and builds every transaction they sign. It never holds a user's key: it builds a transaction, the user signs it in their own wallet or with their passkey, and the API executes exactly those bytes.

REQUEST FLOW

Build, sign, execute.

  1. 01

    The client gets a sign-in challenge and signs it with a passkey or a Sui wallet key.

  2. 02

    The server verifies the signature and returns a session token.

  3. 03

    Every other call sends Authorization: Bearer <token>.

  4. 04

    To change anything on chain, the client asks the server to build a transaction, signs the returned bytes, and posts the signature to execute it. A built transaction is kept for 120 seconds and executes once.

  5. 05

    The operator pays the gas for every transaction the server builds.

REQUESTS

Conventions.

  • Base URL (local): http://127.0.0.1:8790.
  • Methods: GET and POST.
  • Body: JSON. Every request other than GET must send Content-Type: application/json. Bodies are capped at 64 KiB.
  • Host: locally, only 127.0.0.1 and localhost are accepted.
  • Origin: a browser request from an origin not on the list is refused; requests with no Origin header, such as curl, pass.
  • Amounts: decimal strings in coin units, for example "12.5" USDC or "30" SUI. Large integers in responses are strings.
  • Health check: GET /healthz returns {"ok":true}.
ROUTES

Every route, by page.

Each row links to the request and response on the route reference.

MethodPathAuthPayload
GET/healthznoneHealth
GET/v1/confignoneConfig
GET/v1/errorsnoneErrors
GET/v1/faucetnoneFaucet
POST/v1/faucet/usdsui, /usdc, /suinoneFaucet
POST/v1/auth/challenge, /sessionnoneAuthentication
POST/v1/auth/logoutsessionAuthentication
GET/v1/mesessionAuthentication
GET, POST/v1/agentssessionAgents
POST/v1/mandate/previewsessionAgents
GET/v1/agents/:idownerAgents
POST/v1/agents/:id/tx, /tx/:txIdownerAgents
POST/v1/agents/:id/launch, /pause, /stop, /settingsownerAgents
GET/v1/agents/:id/loans, /activityownerAgents
POST/v1/borrow/quote, /previewsessionBorrow
GET/v1/borrow/rooms, /rooms/:id, /loans, /historysessionBorrow
POST/v1/borrow/tx, /tx/:txIdsessionBorrow
POST/v1/upkeep/dry-runnoneUpkeep dry run
POST/v1/byo/peek, /claimsessionSelf-run agents
POST/v1/agent/challenge, /session, /setup, /sponsor, /credentialagentSelf-run agents
GET/v1/agent/setupagentSelf-run agents
GET/v1/private/confignonePrivate config and credentials
POST/v1/private/credentialsessionPrivate config and credentials
POST/v1/private/tx/:actionnonePrivate transactions
POST/v1/admin/kill, /deny, /undeny, /deniedadmin tokenAdmin

An agent id is a- followed by 16 hex digits. :txId is 32 hex digits.

Every page in the API tab: API reference