Prerequisites
Before using the Automation API, you must obtain an access token. For instructions, see the Authentication guide.
Authorization header of every request:
Handle rate limits
The Automation API enforces two rate-limiting windows to control request traffic:
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.
Example: Deleting 230 accounts
To delete 230 accounts, divide your requests into the following batches:Delete accounts using Python
Use the following Python script to send delete requests sequentially and manage rate limits automatically:delete_accounts.py
- Sending requests sequentially.
- Processing accounts in batches of 50.
- Waiting between batches to enforce the 10-second limit.
- Pausing if the process reaches the hourly limit of 1,000 requests.