API reference

Discover Compify endpoints through its generated OpenAPI 3 document and read-only Swagger UI.

The API generates its contract directly from the NestJS controllers and DTOs. The document therefore stays aligned with each deployed API version. The project-operated https://api.compify.app public alpha currently publishes this contract, including POST /cli/publish-story; self-hosted operators publish the contract for their own deployed checkout. Alpha route availability is not a managed-service SLA.

When the documentation site and API use different origins, open these endpoints on your configured NEXT_PUBLIC_API_URL instead:

${NEXT_PUBLIC_API_URL}/openapi.json
${NEXT_PUBLIC_API_URL}/api/docs

Authentication schemes

SchemeTransportUsed by
Browser sessionHttpOnly compify_auth cookieBrowser-authenticated endpoints
Bearer JWTAuthorization: Bearer <token>Non-browser authenticated API clients
CLI Bearer tokenAuthorization: Bearer <cli_token>Storybook publish and private registry reads
Legacy CLI tokenx-cli-token: <cli_token>Existing CLI component operations
Internal API keyx-api-key: <token>Restricted server-to-server endpoints

The Swagger interface deliberately disables request submission. Use the JSON contract with your preferred OpenAPI client generator or testing tool.

Stability

The generated OpenAPI contract reports version 1.0; that document version is not a statement that the API, public-alpha service, or unpublished packages are stable or generally available. Treat undocumented fields as internal, handle standard HTTP errors, and pin generated clients to the OpenAPI document from the Compify checkout you deploy.