Creating Plans
Create new usage plans for your application:Listing Plans
Retrieve all available plans:Getting Plan Details
Get detailed information about a specific plan:Updating Plans
Update plan properties:Deleting Plans
Delete plans when they’re no longer needed:Plan Usage
Get usage statistics for a plan:Plan Users
Get all users associated with a plan:Plan API Keys
Get all API keys associated with a plan:API Route Example
Here’s a complete example of plan management in a Next.js API route:Plan Properties
The SDK supports the following plan properties:- id: Unique identifier for the plan
- owner_id: ID of the plan owner
- name: Human-readable name for the plan
- description: Optional description of the plan
- max_requests: Maximum number of requests allowed
- request_period: Period for the limit (‘day’, ‘week’, ‘month’, ‘year’)
- is_active: Whether the plan is active
- created_at: Timestamp when the plan was created
- updated_at: Timestamp when the plan was last updated
Plan Periods
The SDK supports the following request periods:- day: Daily limits
- week: Weekly limits
- month: Monthly limits
- year: Yearly limits
Error Handling
Handle plan management errors:Next Steps
- Users - Manage user accounts
- API Key Management - Create API keys for plans
- Request Validation - Validate requests against plans