Skip to main content
The Plans module allows you to create and manage usage plans that define rate limits and features for your users.

List Plans

Get all plans for your account:

Create Plan

Create a new usage plan:

Create Plan Parameters

name
string
required
The name of the plan
description
string
A description of the plan
max_requests
number
required
Maximum number of requests allowed per period
request_period
string
required
The period for the request limit (day, week, month, year)
features
array
Array of features included in this plan
metadata
object
Additional metadata for the plan

Get Plan

Retrieve a specific plan by ID:

Update Plan

Update an existing plan:

Update Plan Parameters

name
string
New name for the plan
description
string
Updated description for the plan
max_requests
number
Updated maximum number of requests
request_period
string
Updated request period
features
array
Updated array of features
metadata
object
Updated metadata for the plan

Delete Plan

Delete a plan (soft delete):

Get Plan Usage

Get usage statistics for a specific plan:

Plan Usage Response

total_users
number
Total number of users on this plan
total_requests
number
Total requests made by users on this plan
average_usage
number
Average usage per user on this plan
period
string
The current period

Get Plan Users

Get all users on a specific plan:

Complete Example

Plan Object

The plan object contains the following properties:
id
string
Unique identifier for the plan
name
string
The name of the plan
description
string
The description of the plan
max_requests
number
Maximum number of requests allowed per period
request_period
string
The period for the request limit
features
array
Array of features included in this plan
created_at
string
When the plan was created (ISO 8601 format)
updated_at
string
When the plan was last updated (ISO 8601 format)
metadata
object
Additional metadata for the plan

Common Plan Features

Here are some common features you might include in your plans:
  • api_access - Basic API access
  • basic_analytics - Basic usage analytics
  • advanced_analytics - Advanced analytics and reporting
  • priority_support - Priority customer support
  • webhooks - Webhook notifications
  • email_support - Email support
  • phone_support - Phone support
  • custom_domains - Custom domain support
  • team_management - Team and user management features

Next Steps