---
title: "Get workspace billing status"
description: "PubNio API billing.get: get workspace billing status. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get workspace billing status

Get workspace billing status with [`GET /api/v1/workspaces/{workspaceId}/billing`](https://pubnio.com/api/v1/docs#tag/billing/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](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const billing = await workspace.billing.get();
```

### Python

```python
billing = workspace.billing.get()
```

### cURL

```sh
curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/billing" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio billing status
```

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}/billing`,
  });
  return response.data;
};
```

## Errors

- [`invalid-billing-date-range`](https://pubnio.com/docs/problems/invalid-billing-date-range/): HTTP 400, Invalid billing date range

It also declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Billing operations](https://pubnio.com/docs/reference/#billing)

Source: https://pubnio.com/docs/reference/billing-get/index.mdx
