API Reference

Blossum v0.9 keeps the external /v1 API and response shapes stable for the controlled hosted private beta. Errors now carry a requestId (in error.details.requestId, also returned as the X-Request-Id header) so you can quote it in support requests. The API base URL is configured per environment via BLOSSUM_API_URL; in hosted deployments the web and API run as separate services.

Hosted Beta & Health

Base URLBLOSSUM_API_URL (e.g. https://api.your-host)

Configure the API base URL per environment; /v1 lives under it. Locally it is http://localhost:3000.

GET/api/health

Fast, lightweight health: app version, data mode, database + provider modes. Always 200.

GET/api/ready

Readiness probe. In database mode verifies a live connection; returns 503 until ready.

GET/api/live

Liveness probe. Returns 200 while the process is alive.

GET/api/runtime-status

Richer secret-safe diagnostics including the startup-check report (app session / demo).

External API v0.7

GET/v1/design-products

List design products available to an authenticated API client.

POST/v1/projects

Create a project from a design entitlement without auto-billing.

POST/v1/projects/:id/provision

Provision starter files and GitHub Actions workflow into the connected repository.

POST/v1/projects/:id/deploy

Trigger deployment for a provisioned, entitled project.

GET/v1/ai/status

Report whether AI generation is running in demo or real provider mode.

POST/v1/ai/generations

Create an AI generation request that produces reviewable artifacts.

POST/v1/projects/:id/versions/from-generation/:generationId

Create a reviewable project version from accepted artifacts.

POST/v1/projects/:id/versions/:versionId/approve

Approve a project version before provisioning or deployment.

POST/v1/projects/:id/versions/:versionId/provision

Provision an approved project version through the existing GitHub Actions flow.

POST/v1/webhook-endpoints

Register an outbound webhook endpoint for project and deployment lifecycle events.

Authentication & Scopes

HeaderAuthorization: Bearer blsm_test_xxx

All /v1 routes require a workspace-scoped API key.

ScopeWorkspace scoping

Authenticated /v1 requests are always scoped to the API key workspace.

Modememory or database

Demo memory mode remains available while durable database mode is introduced for PostgreSQL-backed runtimes.

Scopeai:write

Required for AI generation creation, run/cancel, and artifact review actions.

Scopeproject_versions:write

Required for project version creation, approval, provisioning, and deployment.

Scoperepository_connections:write

Required for repository connection creation and updates.

Scopewebhooks:write

Required for webhook endpoint creation, updates, and deletes.

Scopeusage:read

Required for usage and rate limit inspection endpoints.

Responses, Limits, and Webhooks

200{ "data": {}, "meta": {} }

External API successes always return a consistent envelope.

Error{ "error": { "code": "string", "message": "string", "details": { "requestId": "req-…" } } }

Errors share a consistent shape; details carries a requestId (also the X-Request-Id header) for support/tracing. Existing clients that ignore it are unaffected.

HeadersX-RateLimit-Limit / Remaining / Reset

Workspace and API-key rate limits are surfaced when straightforward.

RuleReview before deploy

API clients cannot bypass artifact review or project version approval.

WebhookBlossum-Event-Type / Blossum-Delivery-Id / Blossum-Timestamp / Blossum-Signature

Outbound webhooks are signed using HMAC(timestamp + payload).

Common Error Codes

401UNAUTHORIZED

Missing or invalid API key.

403INSUFFICIENT_SCOPE

The API key lacks the scope required for this action.

403API_ACCESS_REQUIRED

The workspace/plan does not have external API access enabled.

403ENTITLEMENT_REQUIRED

An active entitlement is required to create, provision, or deploy.

429RATE_LIMIT_EXCEEDED

Workspace/API-key rate limit exceeded; see X-RateLimit-* and retryAfterSeconds.

403BETA_ACCESS_REQUIRED

Private beta access is required; an accepted beta invite is needed.

403REQUEST_BLOCKED

The action is blocked by a policy/entitlement decision; see details.requiredAction.

503RUNTIME_NOT_READY

The runtime is not ready (e.g. database mode without a reachable database).

503DATABASE_NOT_READY

Database mode is configured but the database is unreachable.

503PROVIDER_NOT_CONFIGURED

A required provider (GitHub/Stripe/AI) real mode is enabled but not fully configured.

500INTERNAL_ERROR

Unexpected server error; quote error.details.requestId when reporting it.

Feedback & Private Beta

AccessPrivate beta

Blossum is in a controlled private beta. Operators create invites in /app/admin/beta-invites; invitees accept via /beta/invite/<token> (email delivery is manual for now).

GET/api/feedback

List feedback for the current workspace (app session / demo).

POST/api/feedback

Submit feedback (category, severity, title, description). Captures the request id for tracing.

UI/app/feedback

In-app feedback form for beta users; blocked states link here.

NoteProvider modes

GitHub/billing/AI may run in demo mode; real modes require external configuration. billingOrdersSubscriptions remains documented_partial in database mode.

Beta Deployment Checklist

1Provision PostgreSQL & set DATABASE_URL

Set BLOSSUM_DATA_MODE=database and run db:migrate before startup.

2Configure URLs & CORS

Set BLOSSUM_API_URL / web PUBLIC_API_URL and CORS_ORIGINS to your web origin(s).

3Set hosted secrets

SESSION_SECRET and API_KEY_SECRET are required in hosted mode.

4Verify probes

Confirm /api/health, /api/ready, and /api/live before sending traffic.

5Create an API key

Create a workspace API key in /app/api-keys; it is shown once and stored hashed.

Authentication example:

curl -H "Authorization: Bearer blsm_test_xxx" \
  http://localhost:3000/v1/design-products

Create API keys in /app/api-keys; a key is shown once and stored only as a hash. Rate limits are per workspace/API key and surfaced via X-RateLimit-* headers. Register outbound webhook endpoints with POST /v1/webhook-endpoints.

Demo AI mode returns deterministic artifacts and never calls external AI APIs.

Memory mode remains available for local-safe development. Database mode requires DATABASE_URL and exposes safe runtime health through /api/health, readiness through /api/ready, and liveness through /api/live.

AI generation still requires review and approval before provisioning or deployment. Reseller payouts, non-GitHub deployment providers, enterprise SSO, distributed rate limiting, and advanced multi-agent orchestration remain out of scope.