Configure Rate Limits in the CLI

View as Markdown
Intermediate4 min readLast updated December 3, 2026

Overview

Rate Limit defines the maximum number of requests you can make using Contentstack's API within a specific time frame.

This guide provides step-by-step instructions on how to configure and manage rate limits in the Contentstack Command Line Interface (CLI).

By following these instructions, you can effectively control the number of requests made to the Contentstack API within a specified timeframe, ensuring optimal performance and preventing any disruptions due to exceeding rate limits.

Warning CLI 2.x saves the rate limits that you set with config:set:rate-limit, but no command applies them. The bulk commands (cm:stacks:bulk-entries, cm:stacks:bulk-assets, and cm:stacks:bulk-taxonomies) use a fixed default of 10 requests per second, with up to 5 requests at a time.

Prerequisites

Commands

Set Custom Rate Limit

The config:set:rate-limit command lets you set a Custom rate limit for your organization in the CLI.

  1. Open the terminal.
  2. Enter the following command:
    csdx config:set:rate-limit
  3. Then, enter the organization UID.

With these steps, you have successfully set a rate limit in the CLI.

To set a Custom rate limit, you can pass the --limit-name and --utilize flags along with the --org flag in the command as given below:

csdx config:set:rate-limit --org blt***********1b --utilize 60,80 --limit-name bulkLimit

Usage

csdx config:set:rate-limit

Options

FlagShort FlagTypeRequiredDefaultDescription
--org-stringNo. Prompted if omitted-Provide the organization UID.
--utilize-stringNo50 Provide the utilization percentages for the rate limit, separated by commas.

Default: 50

--limit-name-string[]No- [Optional] Provide the limit names separated by commas.

Supported values: limit, getLimit, bulkLimit

--default-booleanNofalseReset to default rate limit.

Examples

  • To set a default rate limit for your organization:
    csdx config:set:rate-limit  --org blt***********1b  --default
  • To set a Custom rate limit for your organization:
    csdx config:set:rate-limit  --org blt***********1b  --utilize 60 --limit-name bulkLimit
Note
  • CLI applies a utilization percentage of your organization’s actual rate limit, based on your subscription plan.
  • By default, this is set to 50%, which means the CLI internally enforces a limit at half of the available rate. For example, if your getLimit is 10, the CLI will apply a limit of 5 at 50% utilization, or 6 at 60% utilization.
  • This utilization is managed internally and is not shown in the CLI output.

Get the Rate Limit of an Organization

The config:get:rate-limit command fetches the rate limit that you have set in an organization in the CLI.

  1. Open the terminal.
  2. Enter the following command:
    csdx config:get:rate-limit

With these steps, you have successfully retrieved the rate limit you have set in the CLI.

Usage

csdx config:get:rate-limit

Remove the Rate Limit of an Organization

The config:remove:rate-limit command lets you remove an existing rate limit configuration from the CLI.

  1. Open the terminal.
  2. Enter the following command:
    csdx config:remove:rate-limit
  3. Then, enter the organization UID.

With these steps, you have successfully removed the rate limit configuration of an organization.

Usage

csdx config:remove:rate-limit

Options

FlagShort FlagTypeRequiredDefaultDescription
--org-stringNo. Prompted if omitted-Provide the organization UID.

Examples

  • To remove the configuration of the rate limit from the CLI by providing the organization UID:
    csdx config:remove:rate-limit --org <ORG_UID>

Using Rate Limits for Enhanced Bulk Publishing Control

By default, the rate limit is set to 1, letting you publish one asset or entry per second. To enable the bulk publish feature, you must configure the rate limit for your specific organization.

The config:set:rate-limit command lets you set the rate limit to utilize the bulk publish feature according to your plan.

Usage

csdx config:set:rate-limit  --org blt***********1b  --utilize 10 --limit-name bulkLimit

Examples

Set the utilization percentage for an organization, which governs how much of the available rate limit the CLI will consume.

csdx config:set:rate-limit --org <ORG_UID> --utilize 70

Set utilization for named limits only, passing the limit names separated by commas.

csdx config:set:rate-limit --org <ORG_UID> --limit-name getLimit,bulkLimit --utilize 60,80

Reset an organization back to the default rate limit.

csdx config:set:rate-limit --org <ORG_UID> --default

Limitations

  • --limit-name accepts only getLimit, limit, and bulkLimit. No other API operation can be rate-limited individually through this command.
  • --utilize must be a number between 0 and 100.