Advocate limits the number of REST API requests that you can make within a specific amount of time. This limit helps prevent abuse and denial-of-service attacks, and ensures that the API remains available for all customers. All requests currently count towards the service account token limit of 200 requests per minute and is subject to change at any time.

Exceeding the rate limit

If you exceed your rate limit, you will receive a 429 response, and the x-ratelimit-remaining header will be 0. You should not retry your request until after the time specified by the x-ratelimit-reset header has passed — the number represents the number of seconds after which the quota resets. We recommend that you wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries have failed. You can accomplish this by using a backoff algorithm — for example by doubling the wait time after each failed retry. If you’re using Node.js, you can use the backoff or async-retry packages to implement this.