v2
admin
copilot
admin

Get User Rate Limit

Get a user's current usage and effective rate limits. Admin-only.

Accepts either user_id or email as a query parameter. When email is provided the user is looked up by email first.

get/api/copilot/admin/rate_limit

Query parameters

user_idstring nullable
emailstring nullable

Response

Successful Response

user_idstring required
user_emailstring nullable
daily_cost_limit_microdollarsinteger required
weekly_cost_limit_microdollarsinteger required
daily_cost_used_microdollarsinteger required
weekly_cost_used_microdollarsinteger required
tier'NO_TIER' | 'TRIAL' | 'BASIC' | 'PRO' | 'MAX' | 'BUSINESS' | 'ENTERPRISE' required

Subscription tiers with increasing cost allowances.

Mirrors the SubscriptionTier enum in schema.prisma. Once prisma generate is run, this can be replaced with::

from prisma.enums import SubscriptionTier
tier_multipliersobject

Changes

Changed in 3 of the 165 revisions of this API.21

    • ●

      added the new TRIAL enum value to the response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ●

      removed the optional property from the response with the status

      response-optional-property-removed

    This revision also has 96 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog