# GET /users/{name}/bandwidth

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

Get a customer's monthly bandwidth usage

- Who may call it: administrator, reseller, customer
- Token scope, any of: users, read, all
- Answers: 200 OK

The response gives the selected month, the customer's package, and usage in bytes for web, mail, mailbox access, and FTP traffic. It includes the monthly total, totals by traffic type, and a breakdown for each day with recorded traffic, ordered by date. The month defaults to the current month on the server.

limit_bytes gives the package limit in bytes, with 0 meaning unlimited. percent is usage as a percentage of the limit, rounded down to a whole number, or null when the limit is unlimited. over is 1 when usage meets or exceeds a nonzero limit and 0 otherwise.

cut reports whether the customer's sites currently serve the HTTP 509 page, and cut_at gives the time the restriction began. UrbeStack updates the restriction based on its hourly traffic reading. read_at gives the last journal reading time or null if none is recorded. first_month gives the earliest month with recorded traffic for the customer or null if none is recorded. The response also includes timezone and server_time, with a UTC offset such as 2026-10-05T14:36:12+02:00.

Customers can request their own usage, resellers can request usage for their customers, and administrators can request usage for any customer. Returns 400 for an invalid month or if the requested account is an administrator.

## Parameters

- `name` (path, Username, required)
- `month` (query, string, matching ^\d{4}-(0[1-9]|1[0-2])$): Month in YYYY-MM format, based on the server's local dates.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/users/alice/bandwidth?month=text" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "bandwidth": {
    "bytes": 1,
    "cut": 1,
    "cut_at": "text",
    "days": [
      {}
    ],
    "first_month": "text",
    "kinds": {
      "ftp": 1,
      "mail": 1,
      "mailbox": 1,
      "web": 1
    },
    "limit_bytes": 1,
    "month": "text",
    "name": "alice",
    "over": 1,
    "package": "basic",
    "percent": 1,
    "read_at": "text",
    "server_time": "text",
    "timezone": "text"
  }
}
```

## Errors

- 400: <name> is an administrator: administrators have no traffic of their own
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
