Your Loops API key should never be used client side or exposed to your end
users.
Start here if you want to use the Loops API to add contacts to your Loops audience,
update their attributes, and send events to Loops.
To get started, you’ll need an API key. Go to Settings -> API in Loops and click Generate key.
This creates an API key. You can assign it a human-readable name:
We suggest using a different API key for different purposes. You can revoke an API key at any time with the trash icon.
When making an API call, add an Authorization header and set the API key as a Bearer token:
You can test your API key by making a GET request to
https://app.loops.so/api/v1/api-key
If successful, you will receive the following response:
{ "success": true}
Here’s an example Curl request (replace d2d561f5ff80136f69b4b5a31b9fb3c9 with your own API key):
To ensure the quality of service for all users, our API is rate limited. This means there’s a limit to the number of requests your application can make to our API in a certain time frame. The baseline rate limit is 10 requests per second per team.
To see your current usage, we provide the following response headers in every API response:
x-ratelimit-limit: The maximum number of requests you can make per second.
x-ratelimit-remaining: The number of requests remaining in the current rate limit window.
Here is an example of a successful response with rate limit headers:
If you exceed this limit, you’ll receive a response with HTTP status 429 Too Many Requests. Here is an example of a failed response with rate limit headers:
It’s important to handle these 429 responses in your application. We recommend implementing retries with an exponential backoff strategy.
If your use case requires a higher limit, please contact us and we’ll be happy to discuss your needs.
The Loops API does not support cross-origin requests made from client-side JavaScript. To avoid CORS errors, make sure to issue your requests from a server-side application.
The Loops API allows a maximum of 10 requests per second per team. If you receive a 429 Too Many Requests response, this means you have exceeded this limit.
The x-ratelimit-limit and x-ratelimit-remaining headers in the response can provide information about your current rate limit usage.
400-level responses typically indicate that there was a problem with the request. The response body will contain more information about what went wrong, so be sure to check it for details.
Check on your request type (GET, POST, PUT, DELETE) and ensure that you are using the correct one for the endpoint you are trying to access.
If you receive this error, it means that a value in the request body is too long. We support a maximum of 500 characters for each value, including the opening and closing quotes. Please reduce the length of the values in your request and try again.
If you have followed these steps and are still experiencing issues, don’t hesitate to reach out to the Loops team for further assistance.
Get started quickly with the Loops API using our OpenAPI documents.
You can import these documents into an API client like Postman or Insomnia to see and use all of our endpoints, with example requests and expected responses.
The following SDKs are community-submitted and have not been officially reviewed or endorsed by Loops. We recommend thoroughly testing and reviewing the code before integrating it into your project.