Goatlab API Docs

Get file quotas of a control plane user

GET
/v1/quotas

Returns the file quotas and upload constraints of the user identified by the control plane JWT sent in x-control-plane-token.

Control plane token:

  • The token is decoded and its signature validated against the control plane public keys
  • The user and their tier are taken from the token's user_id and service_ids claims

Access restrictions:

  • Only non-scoped PRODUCT API keys are accepted
  • GEN_AI API keys are rejected with 403
  • Scoped API keys are rejected with 403
  • Users without an active Nuvio license are rejected with 402

Personal files:

  • Only persistent personal files count toward the limit; temporary files (uploaded with persist=false) and space files are excluded
  • available is limit - file_count, never below 0
  • Users on an unlimited tier get limit: null and available: null

Space files:

  • Reserved for future use; always an empty object

Enabled types:

  • enabled_types lists the MIME types accepted by the upload URL endpoints

Authorization

ApiTokenAuth PRODUCT
x-api-key<token>

API Key with role based permission

In: header

Scope: PRODUCT

Header Parameters

x-control-plane-token*string

Control plane JWT of the user whose quotas are requested

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/quotas" \  -H "x-control-plane-token: string"

{
  "personal_files": {
    "limit": 5,
    "file_count": 2,
    "available": 3
  },
  "space_files": {},
  "enabled_types": [
    "text/csv",
    "text/plain",
    "text/markdown",
    "text/html",
    "application/pdf",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "application/vnd.openxmlformats-officedocument.presentationml.presentation"
  ]
}

{
  "message": {
    "description": "Validation failed",
    "errors": [
      {
        "path": "headers.x-control-plane-token",
        "message": "x-control-plane-token is required"
      }
    ]
  }
}
{
  "message": "Token verification failed"
}
{
  "message": "User does not have a valid active license."
}
{
  "message": "API Key does not have permission to access this resource"
}
{
  "message": "Internal Server Error"
}