API reference
Everything in the Ship Safe dashboard is available over REST. Generate an API key in Settings → API keys and authenticate every request with it.
curl https://api.shipsafe.pro/v1/scans \
-H "Authorization: Bearer $SHIPSAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"repoId": "your-repo-id"}'Machine-readable spec: the full OpenAPI 3.0 document lives at api.shipsafe.pro/v1/openapi.json — import it into Postman, Insomnia, or an OpenAPI client generator.
Scans
Trigger scans, poll status, and re-run or cancel them.
| POST | /v1/scans | Trigger a scan of a connected repo |
| GET | /v1/scans | List scans (filter by repoId, status) |
| GET | /v1/scans/{id} | Get a scan with grade and counts |
| GET | /v1/scans/{id}/runs | Per-scanner run details |
| POST | /v1/scans/upload | Scan an uploaded zip (CI flow) |
| POST | /v1/scans/{id}/rescan | Re-run with the same params |
| POST | /v1/scans/{id}/regrade | Recompute grade after triage |
| POST | /v1/scans/{id}/cancel | Cancel a queued/running scan |
Findings
Everything the engines surfaced, mapped to OWASP, CWE, and SOC 2.
| GET | /v1/scans/{id}/findings | List findings (severity, status, pagination) |
| GET | /v1/findings/{id} | Get a single finding |
| PATCH | /v1/findings/{id} | Triage: suppress, won’t-fix, or reopen |
Fixes
AI-generated fix pull requests (paid tiers).
| POST | /v1/findings/{id}/fixes | Generate a fix PR |
| GET | /v1/fixes/{id} | Poll a fix for its PR URL |
Reports
SOC 2 evidence packs, executive summaries, and full technical PDFs.
| POST | /v1/scans/{id}/reports | Generate a PDF report |
| GET | /v1/reports/{id} | Fresh signed download URL |
Repos
Connect repositories and manage watch mode.
| GET | /v1/repos | List connected repos |
| POST | /v1/repos | Connect a repo |
| PATCH | /v1/repos/{id} | Toggle watch mode |
| DELETE | /v1/repos/{id} | Disconnect |
| GET | /v1/repos/{id}/trends | Grade/risk trend over time |
API keys & badges
Programmatic access and public README badges.
| GET | /v1/api-keys | List keys (prefixes only) |
| POST | /v1/api-keys | Create a key — secret shown once |
| DELETE | /v1/api-keys/{id} | Revoke a key |
| GET | /v1/badges/{owner}--{repo} | Public SVG grade badge (no auth) |
Conventions
- Responses wrap payloads in
{ "data": … }; errors return{ "error": { "code", "message" } }. - Rate limit: 600 requests/minute per key, with tighter caps on expensive routes (scan triggers, report generation).
- Quota errors use HTTP
402with an explanation of the plan limit. - List endpoints paginate with cursors (scans) or page numbers (findings).