Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get team usage

Returns the team’s current usage counters: spaces, domains, members, storage, and monthly publishes.

GET/v1/teams/{teamId}/usage
Authorization
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

Path parameters
teamIdstringrequired
min length 1
Responses
200

Response for status 200

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

dataobjectrequired
Show properties
teamIdstringrequired

The team id the usage was metered for.

usageobjectrequired

Usage counters against the named plan limits.

Show properties
spacesintegerrequired

Live spaces readable by the caller.

min -9007199254740991 · max 9007199254740991
liveSpacesintegerrequired

Team-wide live Space count used for the plan quota.

min 0 · max 9007199254740991
domainsintegerrequired

Custom domains the team has in inventory.

min -9007199254740991 · max 9007199254740991
membersintegerrequired

Team members.

min -9007199254740991 · max 9007199254740991
storageBytesnumberrequired

Disk occupied across the team's spaces, as measured by the serving infrastructure. Nothing is deduplicated: a file present in two spaces sits on two disks and counts twice.

storageQuotaBytesnumber | stringrequired

Plan storage quota; "unlimited" when unbounded.

Show properties
Any of:
number
number
string
string
storageOverageBytesnumberrequired

Bytes over the plan storage quota.

storageCalculatedAtstring | nullrequired

How far back the weakest measurement behind this total reaches. Null when the team's storage has not been measured yet. The meter lags the present by about an hour.

buildsDeploysTodayintegerrequired

Publishes (user pushes and CI builds pooled) in the current UTC day.

min -9007199254740991 · max 9007199254740991
buildsDeploysDailyinteger | stringrequired

Daily publish allowance for the plan. Passing it warns; it never blocks.

Show properties
Any of:
integer
integer
string
string
buildsDeploysThisMonthinteger
min 0 · max 9007199254740991
buildsDeploysMonthlyinteger | string

Plan limit value; "unlimited" when the plan does not limit this axis.

Show properties
Any of:
integer
integer
string
string
meterStartedAtstring | nullrequired

Instant when the current metering day started.

spaceStorageobject[]required

Per-space storage breakdown for spaces the caller can read.

Show properties
Array of object
spaceIdstringrequired

Space id.

slugstringrequired

Space slug.

titlestringrequired

Space display title.

storageBytesnumberrequired

Disk this space occupies, as measured by the infrastructure serving it. Zero until the space has been measured.

default

Problem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One sentence on what to do about this error code, the same text as the type page. Read it before retrying.

suggestionsstring[]

Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.

nextstring[]

Copy-pasteable commands or API requests an agent can run next.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.spacefast.com/v1/teams/string/usage' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": {
    "teamId": "string",
    "usage": {
      "spaces": -9007199254740991,
      "liveSpaces": 0,
      "domains": -9007199254740991,
      "members": -9007199254740991,
      "storageBytes": 0,
      "storageQuotaBytes": 0,
      "storageOverageBytes": 0,
      "storageCalculatedAt": "string",
      "buildsDeploysToday": -9007199254740991,
      "buildsDeploysDaily": 0,
      "buildsDeploysThisMonth": 0,
      "buildsDeploysMonthly": 0,
      "meterStartedAt": "string"
    },
    "spaceStorage": [
      {
        "spaceId": "string",
        "slug": "string",
        "title": "string",
        "storageBytes": 0
      }
    ]
  }
}

Was this page helpful?