ReferenceREST API

Tenant

Overview

Tenant endpoints expose the current administrative identity and Tenant-wide settings. Use them from the dashboard administration boundary to inspect identity or manage display name and quota configuration.

Endpoints

GET /v1/me

Returns the Tenant associated with an authenticated dashboard administrator. This endpoint requires a Supabase JWT and is not usable with a tenant API key.

Request

The bearer credential must be a valid dashboard Supabase Auth JWT. There are no path, query, or body parameters. The dashboard JWT selects the Tenant ownership boundary; the authenticated administrator and every referenced resource must belong to that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesDashboard Supabase JWT; Tenant API keys are rejected.

Response

Returns 200 OK.

Response schema: tenantResponseSchema.

{
  "id": "ten_1234567890ABCDEF",
  "authUserId": "11111111-2222-4333-8444-555555555555",
  "email": "dev@example.com",
  "name": "Acme",
  "createdAt": "2026-07-10T10:00:00Z",
  "updatedAt": "2026-07-10T10:00:00Z"
}

Errors

401 unauthorized when an API key is used or the JWT is invalid. Standard service errors also apply; see REST errors.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/me" \
  --header "Authorization: Bearer $SUPABASE_ACCESS_TOKEN"

Tenant backends normally use Get tenant settings instead.

No SDK method: the backend SDK authenticates with an API key, while this operation requires a dashboard JWT. See Tenancy and attribution and Build a multi-tenant application.

GET /v1/tenant

Returns the tenant's display name and monthly quota configuration. quota: null means unlimited.

Request

Requires bearer authentication. There are no path, query, or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.

Response

Returns 200 OK.

Response schema: tenantSettingsResponseSchema.

{
  "name": "Acme",
  "quota": {
    "monthlyTokenLimit": 5000000,
    "monthlyRequestLimit": 10000,
    "resetDay": 1
  }
}

Either monthly limit may be null. resetDay is an integer from 1 through 28.

Errors

Only standard authentication and service errors apply; see REST errors.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/tenant" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: get. See Tenancy and attribution and Build a multi-tenant application.

PATCH /v1/tenant

Updates one or both tenant settings. Omitting quota preserves it; setting quota to null removes the quota and makes usage unlimited.

Request

Requires bearer authentication and JSON. There are no path or query parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
Body fieldTypeRequiredDescription
namestringnoDisplay name, 1–80 characters
quotaobject | nullnoMonthly limits, or null to clear
quota.monthlyTokenLimitpositive integer | nullwith quotaToken ceiling
quota.monthlyRequestLimitpositive integer | nullwith quotaTurn ceiling
quota.resetDayintegerwith quotaReset day, 1–28

At least one top-level field is required.

Response

Returns 200 OK with the complete settings object.

Response schema: tenantSettingsResponseSchema.

{
  "name": "Acme",
  "quota": {
    "monthlyTokenLimit": 5000000,
    "monthlyRequestLimit": null,
    "resetDay": 1
  }
}

Errors

400 invalid_request for an empty or invalid body. Standard errors also apply; see REST errors.

cURL

curl --request PATCH "$BLAZING_AGENTS_BASE_URL/v1/tenant" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"quota":{"monthlyTokenLimit":5000000,"monthlyRequestLimit":null,"resetDay":1}}'

SDK: patch. See Tenancy and attribution and Build a multi-tenant application.

On this page