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
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/services | List your services. |
GET | /v1/services/{service_id}/subscriptions | List subscriptions for a service. |
GET | /v1/customers | Retrieve customer records. |
POST | /v1/customers | Create a new customer. |
GET | /v1/invoices | Retrieve 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
datafield. - Error responses include an
errorfield 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.