---
title: "Get workspace daily usage summary"
description: "PubNio API billing.usage.get: get workspace daily usage summary. 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 daily usage summary

Get workspace daily usage summary with [`GET /api/v1/workspaces/{workspaceId}/billing/usage`](https://pubnio.com/api/v1/docs#tag/billing/GET/api/v1/workspaces/{workspaceId}/billing/usage). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

| Parameter     | In    | Type              | Required |
| ------------- | ----- | ----------------- | -------- |
| `workspaceId` | path  | UUID              | Yes      |
| `from`        | query | string            | No       |
| `to`          | query | string            | No       |
| `meter`       | query | one of 6 strings  | No       |
| `provider`    | query | one of 12 strings | No       |

## Response

- HTTP 200: `BillingUsage` with `from`, `to`, `totals`, `data`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

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

### Python

```python
usage = workspace.billing.get_usage()
```

### cURL

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

### CLI

```sh
pnio billing usage
```

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}/billing/usage`,
  });
  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-usage-get/index.mdx
