API Reference
This page documents the API families used by the current DartStream app. DartStream is microservice-based, so production uses separate service hosts instead of one monolithic API.
Service Hosts
| Service | Production | Development |
|---|---|---|
Frontend app |
||
Auth |
||
Billing |
||
Platform services |
||
Persistence |
||
Reactive dataflow |
Authentication Headers
Protected API calls use Firebase ID token bearer authentication.
Authorization: Bearer <Firebase ID token>
Content-Type: application/json
X-Tenant-ID: <active tenant ID>
X-Tenant-ID is required for tenant-scoped calls. Auth bootstrap endpoints may not require it because they establish tenant context.
Auth API
Base host:
-
Production:
https://apiauth.dartstream.io -
Development:
https://dev-apiauth.dartstream.io
POST /api/v1/auth/signup
Bootstrap a newly created Firebase account.
{
"idToken": "firebase_id_token",
"email": "user@example.com",
"password": "optional_password_context"
}
Billing API
Base host:
-
Production:
https://apibilling.dartstream.io -
Development:
https://dev-apibilling.dartstream.io
GET /api/v1/billing/subscription
Returns the active tenant billing snapshot and entitlement limits.
Example response shape:
{
"tenantId": "tenant-id",
"tenantName": "Workspace",
"subscription": {
"plan": "standard",
"status": "active",
"billingCycle": "annual",
"customerId": "cus_...",
"externalId": "sub_..."
},
"limits": {
"auth_providers": 1,
"database_connections": 1,
"storage_gb": 5,
"feature_flags": 25,
"projects": 1,
"environments": 2,
"team_members": 3,
"flutter_apps": 2,
"game_projects": 1,
"telemetry_events_monthly": 100000,
"ai_runtime": 0
},
"features": {
"auth_providers": true,
"database_connections": true,
"feature_flags": true,
"ai_runtime": false
}
}
GET /api/v1/billing/features/{feature}/check
Checks whether the active tenant can use a feature.
Example:
GET /api/v1/billing/features/auth_providers/check
Example response:
{
"isValid": true,
"failureReason": null,
"hasWarning": false,
"warningMessage": null,
"used": 0,
"limit": 1,
"percentUsed": 0.0
}
POST /api/v1/billing/checkout
Creates a Stripe Checkout session for a subscription or routes an existing Stripe subscription to a targeted portal flow when applicable.
{
"type": "subscription",
"planId": "standard",
"successUrl": "https://app.dartstream.io/membership/membership-paid?checkout=success&plan=standard",
"cancelUrl": "https://app.dartstream.io/membership"
}
Response:
{
"checkoutUrl": "https://checkout.stripe.com/c/pay/...",
"type": "subscription"
}
Enterprise API
Base host:
-
Production:
https://apiplatform.dartstream.io -
Development:
https://dev-apiplatform.dartstream.io
POST /api/v1/enterprise/enterprise-signup
Submits an Enterprise request from the membership flow.
The form captures use cases such as Flutter app runtime, Flame game backend, live-ops telemetry, Unity/native bridge planning, Dart FFI, AI runtime integration, private deployment, governance, security, compliance, and SLA needs.