Skip to content

Get workspace billing status

PubNio API billing.get: get workspace billing status. Request fields, examples in five clients, errors, and idempotency.

Get workspace billing status with GET /api/v1/workspaces/{workspaceId}/billing. Requires an API key with the read scope or a signed-in workspace member.

Request

Parameter In Type Required
workspaceId path UUID Yes

Response

  • HTTP 200: WorkspaceBilling with workspaceId, plan, status, paymentStatus, interval, gateway, periodStart, periodEnd, cancelAtPeriodEnd, creditBalanceMicros, creditBalance, spendControls, currentPeriod.
    • plan: payg, pro, platform, enterprise
    • status: active, trialing, past_due, canceled, incomplete, unpaid
    • paymentStatus: ok, payment_required, insufficient_credit, spend_cap_reached
    • gateway: fake, stripe

The OpenAPI document has each field’s type.

Examples

const billing = await workspace.billing.get();
billing = workspace.billing.get()
curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/billing" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio billing status
async () => {
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}/billing`,
  });
  return response.data;
};

Errors

It also declares the problems most operations declare.

Idempotency

None needed: a read is safe to retry.

Limits

Type to search…

↑↓ navigate↵ selectEsc close