Skip to main content
This guide explains how to automatically create multiple accounts using the Automation API while complying with API rate limits. It uses the /accounts endpoint.

Prerequisites

Before you use the Automation API, ensure that you have an access token. To obtain a token, see the Authentication guide. Include the token in your request’s Authorization header:

Handle rate limits

The Automation API enforces two rate-limiting windows to control request traffic: If you send requests too quickly when you create many accounts, the API returns an HTTP 429 (Too Many Requests) response. To avoid these limits, process your requests in controlled batches:
  • Send a maximum of 50 requests every 10 seconds.
  • Send a maximum of 1,000 requests per hour.
For example, to create 230 accounts, divide your requests as follows:

Format the input data

Define your accounts in a JSON file. Each object in the array represents the request body for a single account.

Create accounts using Python

The following Python script reads the accounts from your JSON file, sends the requests sequentially, and manages the rate limits automatically:

The provided script safely creates large numbers of accounts while complying with Automation API rate limits. It performs the following actions:
  • Reads accounts from a JSON file.
  • Sends requests sequentially.
  • Processes accounts in batches of 50.
  • Waits between batches to enforce the 10-second limit.
  • Pauses if the process reaches the hourly limit of 1,000 requests.
This approach prevents rate-limit errors and ensures reliable account creation during large migrations or bulk onboarding operations.