Skip to main content

API Integration

API Integration

The Komashi API lets you query and manage platform data programmatically. Use it to connect Komashi to your own systems, dashboards, or workflows.

The complete, always-current reference (OpenAPI 3.0) is published on your own instance. Open Settings → API / MCP in the Control Center and follow the Documentation link to the interactive API docs.


Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate and manage API keys in Settings → API / MCP in the Control Center — there is no separate developer dashboard. Each key is a provider token scoped to your provider, with the Create / Read / Update / Delete permissions you assign when creating it. See API Tokens for details.


Base URL

The API is served from your own Komashi instance under the /v1 prefix:

https://<your-instance>/v1

There is no shared api.komashi.com domain — replace <your-instance> with the host of your Control Center.


Key Endpoints

MethodEndpointDescription
GET/v1/servicesList your services.
GET/v1/services/{service_id}/subscriptionsList subscriptions for a service.
GET/v1/customersRetrieve customer records.
POST/v1/customersCreate a new customer.
GET/v1/invoicesRetrieve invoice history.

The API also covers Plans, Periods, Prices, Add-ons and Add-on Options, Customer Contacts, Discounts, Payment methods, Invoice methods, subscription checkout / payment-link / change-plan / usage / quota, and magic-URL generation. See the Documentation link in Settings → API / MCP for the full endpoint list and request/response schemas.


Response Format

All responses are returned as JSON.

  • Successful responses include a data field.
  • Error responses include an error field with a message and status code.

Rate Limits

The API is rate-limited per API key. If you exceed the limit, you will receive a 429 response — implement exponential backoff in your client.


What You Do NOT Need to Handle

  • Subscription lifecycle — handled server-side.
  • Pricing logic — configured by providers, readable via API.

For full endpoint documentation, request/response schemas, and code examples, use the Documentation link in Settings → API / MCP.