đźš§ SanctumAI is in beta. APIs may change before v1.0.
API ReferenceOverview

API Reference

SanctumAI exposes an HTTP admin API on localhost when the daemon is running. This API is used by the web dashboard and can be used for automation.

Base URL

http://localhost:7700/api/v1

The API is localhost-only by default. It does not listen on external interfaces.

Authentication

All requests require a Bearer token:

curl -H "Authorization: Bearer <token>" http://localhost:7700/api/v1/credentials

The token is generated during sanctum daemon start and printed to stdout. It’s also stored in ~/.sanctum/daemon.token.

Endpoints

MethodPathDescription
Credentials
GET/credentialsList credentials
GET/credentials/:pathGet credential
POST/credentialsStore credential
DELETE/credentials/:pathDelete credential
Agents
GET/agentsList agents
POST/agentsRegister agent
DELETE/agents/:nameRemove agent
Policies
GET/policiesList policies
POST/policiesCreate policy
DELETE/policies/:nameDelete policy
POST/policies/simulateSimulate policy
Audit
GET/auditQuery audit log
GET/audit/verifyVerify chain integrity
Auth
POST/auth/challengeRequest auth challenge
POST/auth/verifyVerify challenge response

Response Format

All responses are JSON:

{
  "data": { ... },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2026-02-14T22:30:00Z"
  }
}

Errors return:

{
  "error": {
    "code": "ACCESS_DENIED",
    "message": "Policy does not grant access to this resource"
  }
}