---
title: "List usage by workspace"
description: "Usage and spend for each of the organization's workspaces, one row per workspace, newest first and cursor-paginated by workspace (limit 1 to 25, default 10; after and before take a ws_… id). `GET /api/v1/organizations/{id}/usage`"
url: https://www.unitpost.com/docs/platform/get-organizations-id-usage
section: "Platform API reference"
updated: 2026-11-17
---
# List usage by workspace

`GET /api/v1/organizations/{id}/usage`

Usage and spend for each of the organization's workspaces, one row per workspace, newest first and cursor-paginated by workspace (`limit` 1 to 25, default 10; `after` and `before` take a `ws_…` id). A `limit` above 25 is a 422, not a shorter page; read more with `after`. Each workspace renews on its own date, so a row covers that workspace's own billing period: `period=current` (the default) is its open period, and an ISO 8601 instant is its period that contains that instant. A workspace with no recorded period at that instant (it did not exist yet, or nothing was used in that period) has `period_start` and `period_end` null and every number 0. `spend`, `sms`, `emails.sent`, `plan` and the period are built as `GET /usage` builds them, so for the open period a row equals that workspace's `GET /usage`; amounts are integer USD cents rounded per workspace, and the organization's total is the sum of the rows. Closed workspaces are listed, with `closed_at`, until they are deleted. `external_id` narrows to the workspace you gave that id. Takes an organization key (`ok_live_…`) with `organizations:read`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The organization's id (`org_…`), from `GET /whoami` or Organization → API. |
| `period` | query | string | no | `current` (default), or an ISO 8601 instant with `Z` or an offset (`2026-10-15T00:00:00Z`); a date alone is UTC midnight. |
| `limit` | query | integer | no | Workspaces a page (default 10, max 25). |
| `after` | query | string | no | The next page: the last row's `workspace_id` (`ws_…`). |
| `before` | query | string | no | The previous page: the first row's `workspace_id` (`ws_…`). Not with `after`. |
| `external_id` | query | string | no | Only the workspace you gave this id. |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `workspace_id` | string | yes | — |
| `external_id` | string \| null | yes | — |
| `name` | string | yes | — |
| `closed_at` | string \| null | yes | — |
| `plan` | string | yes | — |
| `period_start` | string \| null | yes | — |
| `period_end` | string \| null | yes | — |
| `emails` | object | yes | — |
| `spend` | object | yes | — |
| `sms` | object | yes | — |
| `on_shared_plan` | boolean | no | — |

## Responses

| Status | Description |
| --- | --- |
| 200 | A page of workspace usage rows. |
| 401 | Missing or invalid organization key (a workspace key is refused). |
| 403 | API access not approved for the organization, the key lacks the capability, or no User-Agent. |
| 404 | Not this key's organization, or not one of its workspaces. |
| 422 | A `period` that is not `current` or an ISO 8601 instant, a `limit` outside 1 to 25, or both `after` and `before`. |
| 429 | The organization's rate limit. |

## Example request

```bash
curl -X GET 'https://www.unitpost.com/api/v1/organizations/org_123/usage' \
  -H 'Authorization: Bearer YOUR_ORG_KEY' \
  -H 'User-Agent: my-app/1.0'
```

## Example response (200)

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "workspace_usage",
      "workspace_id": "workspace_123",
      "external_id": "external_123",
      "name": "Example",
      "closed_at": "2026-01-01T00:00:00.000Z",
      "plan": "string",
      "period_start": "string",
      "period_end": "string",
      "emails": {
        "sent": 0
      },
      "spend": {
        "total_cents": 1,
        "email_cents": 0,
        "sms_cents": 0,
        "sms_carrier_fees_cents": 0,
        "other_cents": 0,
        "refunds_cents": 0,
        "included_cents": 0,
        "purchased_credit_cents": 0,
        "overage_cents": 0,
        "credits_added_cents": 0
      },
      "sms": {
        "messages": 0,
        "segments": 0,
        "send_cents": 0,
        "received": 0,
        "received_cents": 0,
        "monthly_fees_cents": 0,
        "one_time_fees_cents": 0,
        "refunds_cents": 0,
        "countries": [
          {
            "country": "string",
            "messages": 0,
            "segments": 0,
            "price_per_segment_cents": 0,
            "price_per_segment_cents_decimal": "string",
            "cost_cents": 0
          }
        ],
        "received_countries": [
          {
            "country": "string",
            "received": 0,
            "segments": 0,
            "cost_cents": 0
          }
        ]
      },
      "on_shared_plan": false
    }
  ]
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/get-organizations-id-usage
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
