Skip to documentation
ScrumPulseDocumentation
v2.0 docsSign in
Developers

API reference

Reference the verified FastAPI routes, authentication conventions, filters, errors, and rate limits.

Last updated August 8, 2026

The API is JSON over HTTPS except for server-sent events and CSV/PDF exports. FastAPI also exposes generated OpenAPI JSON and Swagger UI at the API host.

Authentication#

Protected routes require:

Authorization: Bearer <clerk-session-token>

Public API routes are /api/health, /api/readiness, /api/billing/webhook, and /api/runs/stream. The chat webhook uses an HMAC signature or a matching Clerk organization identity. The public SSE route still requires a scoped stream token in its own handler.

After authentication, middleware resolves the user’s application role and enforces a route-specific permission. Read routes generally require app:read; sensitive reads and all writes use their documented operational permission. An unmapped write route defaults to admin:all.

Health and identity#

MethodPathPurpose
GET/api/healthProcess liveness.
GET/api/readinessDatabase and configuration readiness.
GET/api/statusTrigger state and latest run status.
GET/api/user/meCurrent organization and subscription summary.
GET/api/user/planPlan plus enforced limits.
GET/api/rbac/meCurrent application role, effective permissions, and delegable permissions.

Runs, metrics, and exports#

MethodPathPurpose
GET/api/runsList runs with limit, offset, board_type, and project_key.
GET/api/projectsAggregate run data by project; optional board_type.
GET/api/runs/next-taskReturn the highest-ranked active task from the connected board.
GET/api/runs/{run_id}Read one organization-scoped run.
GET/api/runs/{run_id}/actionsRead one run’s action log.
POST/api/runs/triggerStart or resume a guarded run.
POST/api/runs/{run_id}/confirmClear a run-level confirmation gate.
GET/api/runs/streamStream run logs as server-sent events.
GET/api/runs/exportExport filtered history as CSV or PDF.
GET/api/runs/{run_id}/actions/exportExport one action log as CSV or PDF.
GET/api/metricsReturn trend data; supports window and project filters.

Approval routes also expose POST /api/runs/start and POST /api/runs/{run_id}/execute.

Approvals and backlog#

MethodPathPurpose
GET/api/approvals/inboxList pending approval requests.
GET/api/approvals/statsCount approval states.
POST/api/runs/{run_id}/actions/{action_id}/approveApprove one action.
POST/api/runs/{run_id}/actions/{action_id}/rejectReject one action.
POST/api/runs/{run_id}/approve-allApprove remaining proposed actions.
POST/api/runs/{run_id}/rejectReject a run.
GET/api/backlog-proposalsFilter proposals by status, board, project, kind, or query.
POST/api/backlog-proposals/{proposal_id}/decisionDecide one proposal.
POST/api/backlog-proposals/decisionDecide several proposals.
POST/api/import/backlogCreate up to 200 backlog items.
POST/api/meetings/ingestExtract proposals from a transcript up to 200,000 characters.

Settings, features, and billing#

MethodPathPurpose
GET, PUT/api/org/settingsRead or change write mode, action cap, and confirmation threshold.
GET, POST/api/settings/integrationRead or save board integration settings.
POST/api/settings/test-connectionTest Taiga or Jira access.
GET, PUT/api/scheduleRead or save schedule preferences.
GET/api/feature-flagsList organization feature flags.
PUT/api/feature-flags/{name}Change a supported feature flag.
POST/api/billing/create-checkoutCreate a Stripe subscription checkout.
POST/api/billing/portalCreate a Stripe customer portal session.
POST/api/billing/webhookReceive and verify Stripe subscription events.
POST/api/webhooks/chat/{org_id}Answer a signed chat integration request.

Role administration#

MethodPathRequired permissionPurpose
GET/api/rbac/meapp:readReturn the caller’s effective access.
GET/api/rbac/membersroles:manageList Clerk organization members and effective ScrumPulse access.
PUT/api/rbac/members/{user_id}roles:manageAssign an operational role and delegable permissions.

Only a Clerk organization administrator receives roles:manage and billing:manage. Neither permission can be added through a database role assignment.

Request example#

curl --request GET \
  --header "Authorization: Bearer <clerk-session-token>" \
  "https://<api-host>/api/runs?limit=20&offset=0&board_type=taiga"

Response example#

[
  {
    "id": "<run-id>",
    "board_type": "taiga",
    "project_key": "example-project",
    "status": "completed",
    "is_dry_run": true,
    "planned_actions_count": 3,
    "executed_actions_count": 0,
    "cycles_run": ["A", "D"]
  }
]

Errors and status codes#

FastAPI handler errors commonly use {"detail":"..."}. Authentication and rate-limit middleware use {"error":"..."}. An authorization denial returns HTTP 403 with detail.error, detail.required_permission, and detail.role. Expect 400 for invalid input, 401 for missing or invalid identity, 403 for authorization, tenant, or plan restrictions, 404 for missing scoped resources, 409 for terminal-state conflicts, 413 for oversized transcripts, 429 for rate limiting, 500 for server errors, and 503 when authorization dependencies are unavailable.

Pagination, filtering, and sorting#

GET /api/runs uses limit and offset and sorts newest first. Other list routes use documented filters but do not share one universal pagination envelope. There is no general public sorting parameter.

Rate limits#

Defaults are 200 reads and 60 writes per minute per derived key. A 429 response includes Retry-After and retry_after_seconds. The limiter is process-local and environment-configurable, so these defaults are not a multi-instance service guarantee.