Integrate with Loops via a form endpoint, which will work with any type of custom form solution you have set up.
Our form endpoint lets you add new contacts to your audience from an HTML form or using JavaScript.
To submit data to Loops you will need to retreive the form endpoint URL that’s linked to your Loops account.
In a form, add input
elements for each of the contact properties you want to collect.
The following contact properties can be added to a new contact via a Loops form endpoint:
email
firstName
lastName
userGroup
source
(default value is “Form”)notes
createdAt
The only contact property that can be updated on an existing contact via a form endpoint is userGroup
.
Existing contacts can be added to new mailing lists via a form, but not unsubscribed.
For each form field use the “API Name” value found from your API settings page as the name
attribute.
Here’s a simple example form that collects name, email address and assigns a custom user group:
To add subscribers to mailing lists via a form endpoint, include a hidden field called mailingLists
. You can use a single mailing list ID or to add subscribers to multiple lists, use a comma-separated list of mailing list IDs.
Make sure that any mailing list you add to a form is Public. You cannot subscribe contacts to private mailing lists from the form endpoint.
If you need a hand integrating with your custom form, just shoot adam@loops.so an email and we’ll help you integrate with anything your specific setup ✌️
We recommend submitting forms using JavaScript because the endpoint responds with JSON.
To do this, make a POST
request to your form endpoint. Make sure to set the Content-Type
header to application/x-www-form-urlencoded
and to submit the form body with encoded values.
Responses from this form endpoint will be one of the following:
This endpoint is rate limited. If you go over the limit, will see a HTTP 429
error just like with the API. Read more about how to handle 429 responses
I'm receiving an error from the form endpoint.
We rate limit requests from the same IP to once per minute and also do not allow duplicates of the same email address. It’s likely the error is related to one of these cases.