Skip to main content
The PIN API authenticates most traffic with Authorization: Bearer. Node-agent control-plane routes under /v1/agent/* nest an extra shared secret on top of that Bearer check. Bearer credential Pass a JWT from login or a long-lived API key:
The middleware accepts either an HS256 JWT issued by POST /v1/auth/login / POST /v1/auth/register or an API key created via /v1/apikeys. On first boot the server may seed an admin API key, printed once in the logs for ARIAPIN_API_KEY in serve; there is no ADMIN_API_KEY env bootstrap. Keys are scoped to the owning user. Public routes (no auth):
  • GET /health
  • GET /version
  • POST /v1/auth/login
  • POST /v1/auth/register
Node-agent nesting Routes under /v1/agent/* are mounted inside the authenticated /v1 group. Each agent callback requires both headers:
X-Agent-Secret must equal the server environment variable AGENT_REGISTER_SECRET. If that variable is empty, agent registration is disabled and these routes return 401. This is a shared deployment secret, not an HMAC scheme and not a per-user API key. Example (user route)
Example (node-agent route)
Missing or invalid credentials return 401 with: