SentnelOpsSentnelOpsbeta

REST API reference

Base URL: https://api.sentnelops.com — every body is JSON, every request carries Authorization: Bearer <session JWT | org api key>. Roles shown are the minimum; the api key acts as admin.

Errors & rate limits

StatusMeaning
401Missing/invalid credential, expired session, disabled account
403Role too low, segregation-of-duties violation, or wrong current password
404Doesn't exist — or belongs to another tenant (deliberately identical)
409State conflict: lifecycle, already-decided approval, duplicate email, last admin
422Validation error (detail in body)
429Rate limited — default 600 req/min per credential; responses carry X-RateLimit-*, over-limit adds Retry-After

Accounts & sessions

EndpointRoleNotes
POST /orgs/registerpublicOrg + api key (shown once) + first admin, auto-logged-in
POST /auth/loginpublic{ email, password } → { token, user } — 12 h session
GET /auth/meviewerWho am I: via, org_id, role, user
POST /auth/passwordsession{ current_password, new_password }
GET /users · POST /usersadminList / create (email, password, role, name?)
PATCH /users/:idadminrole | status | name; 409 on last admin

Agents & lifecycle

EndpointRoleNotes
POST /agentsdeveloper→ 201 { agent, token } — agent JWT shown once. production starts as draft
GET /agentsviewerFilters: environment, risk_level, status, owner, limit≤200, offset
GET /agents/:idviewer
PATCH /agents/:iddeveloperowner, allowed_mcp, denied_mcp, risk_level, expires_at (+actor). Never status
POST /agents/:id/approvesecurity{ approved_by, note? } — SoD enforced
POST /agents/:id/activatedeveloper{ actor } — approved → active only
POST /agents/:id/suspendsecurity{ actor, reason } — reason mandatory
POST /agents/:id/reactivatesecurity{ actor } — ≤30 d, else re-approval
DELETE /agents/:id?actor=securityDecommission — terminal, tokens revoked
POST /agents/:id/reviewsecurityRecords review; advances next_review by risk cadence
POST /agents/:id/rotate?actor=developer→ { agent, token } — all prior tokens revoked
GET /agents/:id/auditviewerAppend-only event trail, newest first

Lifecycle errors return { code, detail }: illegal_transition · segregation_of_duties · approval_required · reapproval_required · reason_required · terminal_state · scope_frozen.

Policy & reporting

EndpointRoleNotes
POST /policy/checkviewer{ agent_id, mcp_server, tool? } → { permitted, reason, policy_rule } — audited
GET /policy/sourceviewerThe org's editable policy YAML — its own document, or the platform default as a template
PUT /policy/sourcesecurity{ yaml, dry_run? } — strictly validated (422 invalid_policy with line), audited; live within ~5 s
DELETE /policy/sourcesecurityRemove the org document — revert to the platform default
GET /agents/export.csvviewerFull registry (SOC 2 evidence)
GET /reports/governance?days=30viewer5-section governance CSV

MCP proxy & observability

EndpointAuthNotes
POST /mcp-serverssecurity{ name, upstream_url } — upserts per org
GET /mcp-serversviewer
ANY /proxy/:server/:pathagent JWTThe transparent proxy — see the proxy guide for status codes
GET /mcp-callsviewerFilters: agent_id, would_block, status (permitted|error|blocked), limit≤1000, offset
GET /mcp-calls/export.csv?days=30viewerSIEM-ready call log
GET /cimd/:agent_id.jsonpublicResolvable agent identity — metadata only, no secrets
WS /ws/calls?key=<api-key>machineLive feed; a tail, not the log

Approvals

EndpointRoleNotes
GET /approvalsviewerFilter status: pending | approved | denied | timeout
POST /approvals/:id/approve · /denysecurity{ approver?, note? } — sessions decide as themselves; api key must name approver; 409 if already decided

Interactive docs

https://api.sentnelops.com/docs      # Swagger UI — try every endpoint live
https://api.sentnelops.com/health    # liveness, never rate-limited