Section G• Last verified November 2026

REST API Reference

Complete endpoint reference for Agents, Mandates, Objectives, Tasks, and Approvals.

REST API Conventions

All endpoints accept and return application/json. Every authenticated request must include the x-mandate-account-id or active session cookie.

Mandate Endpoints

GET/api/mandates

Lists all mandates belonging to the authenticated account.

POST/api/mandates

Creates a new spending mandate with authorized budget, per-tx limits, and allowlists.

Example: Create Mandate cURL
curl -X POST https://mandate.app/api/mandates \
  -H "Content-Type: application/json" \
  -H "x-mandate-account-id: alice.testnet" \
  -d '{
    "title": "DeFi Research Mandate",
    "totalBudgetNear": "1.0",
    "perTxLimitNear": "0.2",
    "approvalThresholdNear": "0.1",
    "allowedRecipients": ["researcher.testnet"]
  }'

Agent Endpoints

GET/api/agents

Returns all registered agents, capability tiers, and health metrics.

POST/api/agents

Provisions a new agent and generates its OutLayer TEE custody wallet.

Objective Endpoints

POST/api/objectives

Submits a natural language goal and returns structured DAG with plan hash.

Approval Endpoints

POST/api/approvals/[id]

Signs or rejects a pending human escalation transaction.