Skip to content
sentrasec

REST API

Authentication, scans, findings and evidence through the Sentrasec REST API.

Sentrasec exposes a REST interface over HTTPS. Everything the console and CLI do goes through it, so anything they can do, you can automate.

Base URL

DeploymentBase URL
SaaShttps://api.sentrasec.ai
Self-hostedYour SENTRASEC_API_URL

Authentication

Bearer tokens, issued per workspace:

curl https://api.sentrasec.ai/v1/findings \
  -H "Authorization: Bearer $SENTRASEC_TOKEN"

Tokens carry the permissions of the identity they were issued to. Scope them to what the automation actually needs.

Apps

GET    /v1/apps
POST   /v1/apps
GET    /v1/apps/{id}
PATCH  /v1/apps/{id}
DELETE /v1/apps/{id}
curl -X POST https://api.sentrasec.ai/v1/apps \
  -H "Authorization: Bearer $SENTRASEC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "payments-api", "repository": "github.com/acme/payments-api"}'

Scans

GET    /v1/scans
POST   /v1/scans
GET    /v1/scans/{id}
GET    /v1/scans/{id}/findings

Scans are asynchronous. Submitting returns immediately with a scan id and a status:

{
  "id": "scn_01h8x9k2m",
  "app_id": "app_01h8x9k2m",
  "status": "queued",
  "created_at": "2026-07-25T09:14:22Z"
}

Poll GET /v1/scans/{id} until status is completed or failed.

Findings

GET    /v1/findings
GET    /v1/findings/{id}
PATCH  /v1/findings/{id}

Filter with query parameters:

curl "https://api.sentrasec.ai/v1/findings?severity=critical,high&app_id=app_01h8x9k2m&status=open" \
  -H "Authorization: Bearer $SENTRASEC_TOKEN"

Updating a finding records a decision. A reason is required, because that is what makes the audit trail worth having:

curl -X PATCH https://api.sentrasec.ai/v1/findings/fnd_01h8x9 \
  -H "Authorization: Bearer $SENTRASEC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "accepted_risk", "reason": "Endpoint is internal-only and behind mTLS."}'

Evidence and compliance

GET    /v1/compliance/frameworks
GET    /v1/compliance/{framework}/evidence

Evidence is generated from scans that already ran and traces back to them.

Pagination

List endpoints are cursor-paginated:

{
  "data": [],
  "next_cursor": "eyJpZCI6ImZuZF8wMWg4eDkifQ",
  "has_more": true
}

Pass ?cursor= to continue.

Rate limits

Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. On 429, back off using Retry-After.

Self-hosted deployments set their own limits.

Errors

StatusMeaning
400Malformed request
401Missing or invalid token
403Token lacks permission
404Not found, or not visible to this token
409Conflict with current state
422Valid syntax, invalid values
429Rate limited
5xxServer error

Error bodies carry a machine-readable code and a human-readable message.