ProvenbyProvenby

API and MCP

Automate Provenby from CI, scripts or an AI assistant. Authentication, limits, errors and the MCP server.

Everything in the console is available over a REST API at https://provenby.com/v1. The full, interactive reference is at /docs/api (OpenAPI schema: /openapi.json).

Authenticate

Create an API key under Settings → API keys (owners and admins). A key looks like sk_…, is shown once, and is stored by us only as a hash. Send it either way:

curl https://provenby.com/v1/targets -H "Authorization: Bearer sk_..."
curl https://provenby.com/v1/targets -H "X-API-Key: sk_..."

A key carries a role (admin, operator or viewer, never above your own) and can be narrowed further:

Revoke a key with DELETE /v1/api-keys/{id}. Create keys over the API with POST /v1/api-keys.

Run a test from CI

Start a pentest after a deploy, then poll until it finishes:

API=https://provenby.com/v1
AUTH="Authorization: Bearer $PROVENBY_KEY"

RUN=$(curl -s -X POST $API/runs -H "$AUTH" -H "Content-Type: application/json" \
  -d '{"target_id": "tgt_...", "tier": "agent"}' | jq -r .id)

while true; do
  STATE=$(curl -s $API/runs/$RUN -H "$AUTH" | jq -r .state)
  case "$STATE" in completed|failed|cancelled) break ;; esac
  sleep 30
done

curl -s "$API/results?target_id=tgt_...&state=open&severity=high" -H "$AUTH"

Use "tier": "light" for a free quick check. Instead of polling, you can receive run.completed with a webhook.

Limits

Lists and pagination

List endpoints return {"data": ……………………, "next_cursor": "..."}, newest first. Pass ?cursor=<next_cursor> for the next page and ?limit= (up to 200) to change the page size. next_cursor is null on the last page.

Errors

Errors share one shape, with a stable code you can match on and, for validation errors, the field at fault:

{"error": {"code": "target_unverified", "message": "Target is not verified. Verify ownership before launching a run."}}
StatusMeaning
401Missing, invalid, expired or revoked credential.
403The credential is valid but its role, scope or IP allowlist doesn't permit this.
404Not found, or not in your workspace.
409Conflicts with the current state, for example starting a run on an unverified target.
422A field is missing or invalid; see field.
429Rate limited; retry after Retry-After seconds.

MCP (for AI assistants)

Provenby is an MCP server (Model Context Protocol, Streamable HTTP with JSON responses) at https://provenby.com/v1/mcp. Point an MCP-capable assistant at it with an API key in the Authorization: Bearer header. It offers these tools:

ToolWhat it doesScope it needs
list_targetsList your targets.targets:read
trigger_runStart a run on a verified, authorized target.runs:write
list_runsList runs, newest first.runs:read
get_runGet one run.runs:read
list_resultsList findings, by target, severity or state.results:read
get_reportThe aggregate findings report, optionally for one target.reports:read

The key's role, scopes, expiry and IP allowlist apply to MCP exactly as to the REST API. For an assistant that should only read findings, give it a results:read key that expires.