Skip to main content
Flexprice publishes its API as an OpenAPI 3.0 document. The API reference, the SDKs, the CLI, and the MCP server are all generated from it, so the spec is the most precise description of the API that exists.

Downloading the OpenAPI spec

The document declares both regional servers, so a generated client can pick us or in by server index:
Authentication is a single API-key scheme, ApiKeyAuth, sent as the x-api-key header.

What the OpenAPI spec contains

  • Every endpoint, grouped by tag (Customers, Subscriptions, Events, Invoices, and so on).
  • Request and response schemas, including enums such as billing periods and subscription statuses.
  • A Webhook Events tag whose operations describe the payload Flexprice sends for each webhook event. They are documentation of what you receive, not endpoints you call. See the event catalog.
  • Two vendor extensions: x-scope (on the MCP copy) marking an operation as read, write, or delete, and x-codegen-request-body-name used by generators.

Generating a client from the spec

For a language without an official SDK, generate one:
Generated clients need two settings: the server URL with /v1 and the x-api-key header. Both are declared in the spec, so generators expose them as configuration.

Validating requests and mocking the API

  • Contract tests. Load the spec into a validator such as openapi-core (Python) or express-openapi-validator (Node) to check your outgoing requests before they hit the network.
  • Mock server. Run npx @stoplight/prism-cli mock flexprice-openapi.json to get a local server that answers with example responses, useful for frontend work without a sandbox key.

Feeding the spec to an AI tool

The spec is the best single file for an agent that needs exact field names. The MCP server already loads it; for other tools, attach the JSON directly or point them at https://docs.flexprice.io/llms-full.txt for the prose documentation. See Agent Skills.

OpenAPI spec versioning

The spec has no separate version number from the API. Changes land in the changelog under API, and the SDKs are regenerated from the new document. Diff two downloads to see exactly what changed between releases.

Postman collection

Swagger UI