---
title: "Get User Usage"
method: GET
path: "/me/usage"
---

# Get User Usage

`GET /me/usage`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/me/usage`
- Auth: none declared

Per-account database storage and current-month egress.

Composes account-wide DB storage and current-month egress
(``access_summary_daily``) alongside the plan's storage limit,
resolved server-side from ``plans.py``. Storage comes from the same
:func:`_user_storage_rollup` that answers ``/me/postgres/storage`` —
the account page renders both into ONE sentence, so the two numbers
must never disagree.

Storage is a SOFT cap: over-limit is surfaced as a warning on the
account page and never blocks. Egress is a measurement only: the
payload states the month's bytes and no allowance beside them,
because no plan carries an egress figure. Returns 503 when the
admin pool / config is unavailable (degraded mode) or when the
storage rollup fails.

The route only reads the control DB, so it runs on
``run_read_in_thread``. One statement reads the plan,
``_user_storage_targets`` adds one more, and the Postgres core reads
the channels' rows in a third.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- UserUsage: Per-account database storage and egress. Storage is display / soft-cap only: over-limit warns on the account page, it never blocks. Its limit is resolved server-side from ``plans.py`` so the web layer never imports the plan table. Egress carries NO limit field, because no plan states an egress figure: the platform reports the month's measured bytes and nothing else.
  - `plan` string, required
  - `storage_bytes` integer, required
  - `storage_limit_mb` integer, required
  - `bandwidth_month_bytes` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
