REST API
Stats and billing
Team usage stats, plan summary, and Stripe checkout and portal links.
User tokens only.
GET /stats/{team_id}
Any member. Counts for the current billing period, with a daily series:
{
"data": {
"projects_count": 3,
"jobs_count": 12,
"members_count": 4,
"webhook_endpoints_count": 2,
"job_successes_count": { "total": 120, "series": [{ "date": "2026-11-01", "value": 4 }] },
"job_failures_count": { "total": 3, "series": [] },
"job_cancelled_count": { "total": 1, "series": [] },
"webhook_delivery_successes_count": { "total": 240, "series": [] },
"webhook_delivery_failures_count": { "total": 2, "series": [] },
"billing_summary": { "plan": "pro", "…": "…" }
}
}Series have one entry per day of the period, including zeros.
GET /teams/{team_id}/billing
Any member. The team's plan and usage:
{
"data": {
"plan": "free",
"status": "active",
"billing_exempt": false,
"can_manage_billing": true,
"current_period_end": "2026-12-01T00:00:00Z",
"usage": [
{ "metric": "job_execution_minutes", "used": 42, "limit": 100, "percent": 42.0 },
{ "metric": "webhook_deliveries", "used": 310, "limit": 1000, "percent": 31.0 }
]
}
}On premium, limit is null and each metric adds included, overage,
estimated_overage_usd and percent_of_included, with
estimated_overage_total_usd and base_price_usd at the top level.
POST /teams/{team_id}/billing/checkout
Owner or admin. Returns a Stripe Checkout URL to upgrade:
{ "plan": "pro" }{ "data": { "url": "https://checkout.stripe.com/…" } }plan is pro or premium.
POST /teams/{team_id}/billing/portal
Owner or admin. Returns a Stripe customer portal URL to manage the subscription.
Teams with complimentary billing get 403 from checkout and portal.