curl https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status \
-H "Authorization: Bearer $MACROSCOPE_API_KEY"
import os, requests
r = requests.get(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
)
print(r.json())
const res = await fetch(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
{ headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
console.log(await res.json());
{
"status": "active",
"periodEnd": "2026-10-01T00:00:00Z",
"access": "ok",
"subscriptionType": "credit"
}
{ "code": 16, "message": "unauthenticated" }
API
Get billing status
Subscription standing, billing access, and billing model for a workspace.
curl https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status \
-H "Authorization: Bearer $MACROSCOPE_API_KEY"
import os, requests
r = requests.get(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
)
print(r.json())
const res = await fetch(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
{ headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
console.log(await res.json());
{
"status": "active",
"periodEnd": "2026-10-01T00:00:00Z",
"access": "ok",
"subscriptionType": "credit"
}
{ "code": 16, "message": "unauthenticated" }
Returns the workspace’s subscription standing and billing-access state. Does not include balances or usage. Values can lag recent changes.
Authorization
Requires workspace Read; Admin and Productivity are not required. No query parameters or pagination are supported. This status-only read does not expose balances, spending or detailed usage.string
required
Bearer <key>. See Authentication.Path parameters
string
required
GITHUB_ORGANIZATION or GITHUB_USER.string
required
Numeric GitHub ID of the organization or user.
Response
string
Subscription standing:
active, canceled, incomplete, incomplete_expired, past_due, paused, trialing, unpaid, or pending. Tolerate new values.string
Billing-access state:
ok, exceeded, blocked, waived, overuse, spend_limit, or pending. Omitted when unknown. Separate from status; do not infer one from the other.string
Billing model:
monthly (seat-based), annual (annual prepaid), or credit (credit-based). Not the invoice schedule. Omitted when unknown.string
End of the current billing period (RFC 3339, UTC).
1970-01-01T00:00:00Z when no period end exists. Does not imply cancellation or renewal.boolean
true when the workspace is invoiced at period end without credit balance enforcement. Omitted when false.curl https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status \
-H "Authorization: Bearer $MACROSCOPE_API_KEY"
import os, requests
r = requests.get(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
)
print(r.json())
const res = await fetch(
"https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/billing/status",
{ headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
console.log(await res.json());
{
"status": "active",
"periodEnd": "2026-10-01T00:00:00Z",
"access": "ok",
"subscriptionType": "credit"
}
{ "code": 16, "message": "unauthenticated" }