To get started, you’ll need an API key. Visit the Loops settings page and click “Generate new 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 { "success": true }
As a Curl request (replace d2d561f5ff80136f69b4b5a31b9fb3c9
with your own API key):
curl <https://app.loops.so/api/v1/api-key> -H "Accept: application/json" -H "Authorization: Bearer d2d561f5ff80136f69b4b5a31b9fb3c9"
You can add contacts to your Loops audience by making a POST
to the https://app.loops.so/api/v1/contacts/create
endpoint. You can submit the following object for the body:
{
"email": "[email protected]",
"firstName": "Adam",
"lastName": "Kaczmarek",
"favoriteColor": "blue",
"userGroup": "Founders",
"source":"Signup form Service"
}
The only required field is “email”. If there is already a contact with this email, the request will fail. You can add additional fields as you need for the contact (favoriteColor
is not a standard field).
You can update contacts to your Loops audience by making a PUT
to the https://app.loops.so/api/v1/contacts/update
endpoint. You can submit the following object for the body:
{
"email": "[email protected]",
"firstName": "Adam",
"lastName": "Kaczmarek",
"favoriteColor": "blue",
"userGroup": "Founders",
"source":"Signup form Service"
}