Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sage-f6b5014e.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Sage server exposes a REST API used by the client and the agent to manage the full proposal lifecycle — from sponsored creation and risk scoring to autonomous execution, deep analysis, and policy configuration.

Base URL

EnvironmentURL
Localhttp://localhost:3001
Productionhttps://api.trysage.xyz

Authentication

Routes are guarded by a single auth middleware that accepts either:
  • Agent / server-to-serverAuthorization: Bearer $AGENT_SECRET (the shared secret)
  • End userAuthorization: Bearer <privy-jwt> (verified against the Privy app)
Authorization: Bearer $AGENT_SECRET
A few read endpoints (/portfolio, /tokens, /events) are public; the rest require a bearer token.

Endpoints

MethodEndpointAuthDescription
POST/sponsor/createCreate (or resolve) the user’s multisig + vault, server-paid
POST/sponsor/sendAdd the server fee-payer signature and broadcast a user-signed tx
POST/sponsor/closeReclaim rent from completed proposal accounts
POST/queueRegister a proposal, run risk analysis, return the verdict
POST/executeServer co-signs and broadcasts vaultTransactionExecute
GET/transactionsList proposals for a vault
GET/transactions/:idFetch one proposal (score, verdict, status)
PATCH/transactions/:idReject or mark a proposal for review
GET/analyze/:idDeep security analysis (GoPlus, Rugcheck, threat intel)
GET/statusScreening mode, Telegram config, learned patterns
PATCH/statusUpdate screening mode and policy limits
GET/rulesList custom policy rules
POST PATCH DELETE/rules/:idManage custom policy rules
GET/portfolioLive portfolio via Zerion
GET/tokensToken metadata
GET/eventsBehavioral event log
POST/notify-resolveUpdate a Telegram notification after approve/reject
POST/bot-pingLink a Telegram chat to a vault on /start
POST/telegram-webhookTelegram message webhook
GET/healthHealth check
The server self-calls /execute and /sponsor/close over localhost using AGENT_SECRET, so the same secret powers both the agent and internal server-to-server flows.