Resource Limits
Resource limits provide fine-grained control over account usage by setting maximum values for various platform resources and operations. These limits help manage resource allocation, prevent abuse, and implement tiered service offerings for different customer segments.
Understanding the Limits Object
The limits object is a flexible structure that allows you to control various aspects of account resource usage. All limit values are optional, and when not specified, accounts inherit default limits from their plan or parent user.
The limits object has the following structure:
Setting Limits for Users
When creating or updating users, you can optionally specify a limits object to control their resource usage. If no limits are provided, the user inherits the default limits from the parent user.
Important: All limit values must be non-negative integers. Set a value to 0 to completely restrict access to that resource type. Omit a field to use default limits.
Common Use Cases
Tiered Service Plans: Define different limit profiles for free, basic, and premium tiers, controlling access to resources based on subscription level.
Enterprise Quotas: Allocate specific resource quotas to enterprise customers based on contractual agreements and usage requirements.
Resource Isolation: Prevent a single user from consuming excessive resources that could impact other accounts on the platform.
Gradual Access: Start users with conservative limits and expand their quotas as they demonstrate responsible usage patterns.
Note: Limits are enforced at the API level. When a limit is reached, API operations that would exceed the limit will return an error. Monitor usage through analytics to proactively manage limits before users encounter restrictions.