API reference
6 endpoints. All paths are relative to your installation, for example https://app.example.com.
/api/v1/w/{workspaceId}/billingPlan, status, usage and (for owners/billing managers) invoices of this workspace's organization/api/v1/orgs/{organizationId}/billingPlan, subscription, usage, invoices and available plans/api/v1/orgs/{organizationId}/billing/checkoutStart hosted checkout for a plan (Stripe or Razorpay); activation only via verified webhook/api/v1/orgs/{organizationId}/billing/portalOpen the Stripe customer portal (payment method, invoices)/api/v1/orgs/{organizationId}/billing/cancelCancel the subscription (default: at the end of the period)/api/v1/orgs/{organizationId}/billing/resumeUndo a scheduled cancellation (Stripe)/api/v1/w/{workspaceId}/billingPlan, status, usage and (for owners/billing managers) invoices of this workspace's organization
Path parameters
workspaceIdrequired | string |
curl -X GET "https://app.example.com/api/v1/w/$WORKSPACE_ID/billing" \
-H "Authorization: Bearer $EMN_API_KEY"/api/v1/orgs/{organizationId}/billingPlan, subscription, usage, invoices and available plans
Path parameters
organizationIdrequired | string |
curl -X GET "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing" \
-b cookies.txt -H "X-CSRF-Token: $CSRF"/api/v1/orgs/{organizationId}/billing/checkoutStart hosted checkout for a plan (Stripe or Razorpay); activation only via verified webhook
Path parameters
organizationIdrequired | string |
Request body (JSON)
planCoderequired | stringLength 1–40 |
interval | enumOne of: month, year · Default "month" |
providerrequired | enumOne of: stripe, razorpay |
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/checkout" \
-b cookies.txt -H "X-CSRF-Token: $CSRF" \
-H "Content-Type: application/json" \
-d '{
"planCode": "string",
"interval": "month",
"provider": "stripe"
}'/api/v1/orgs/{organizationId}/billing/portalOpen the Stripe customer portal (payment method, invoices)
Path parameters
organizationIdrequired | string |
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/portal" \
-b cookies.txt -H "X-CSRF-Token: $CSRF"/api/v1/orgs/{organizationId}/billing/cancelCancel the subscription (default: at the end of the period)
Path parameters
organizationIdrequired | string |
Request body (JSON)
atPeriodEnd | booleanDefault true |
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/cancel" \
-b cookies.txt -H "X-CSRF-Token: $CSRF" \
-H "Content-Type: application/json" \
-d '{
"atPeriodEnd": true
}'/api/v1/orgs/{organizationId}/billing/resumeUndo a scheduled cancellation (Stripe)
Path parameters
organizationIdrequired | string |
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/resume" \
-b cookies.txt -H "X-CSRF-Token: $CSRF"