Loops

App · Email Marketing · 5 actions

Automate Loops: create, find, update, and delete contacts, and trigger lifecycle automations with events.

Actions

ActionWhat it does
Create contactAdd a new contact to your Loops audience, with optional properties and mailing-list subscriptions.
Delete contactRemove a contact from your Loops audience by email, for offboarding or a data-deletion request.
Find contactLook up a contact by email and return their properties and mailing-list subscriptions.
Send eventSend a lifecycle event for a contact to trigger a Loops automation (a 'loop').
Update contactUpdate a contact's properties or mailing-list subscriptions by email.

Create contact

Add a new contact to your Loops audience, with optional properties and mailing-list subscriptions.

Inputs

EmailemailtextRequired
The contact's email address (Loops' unique identifier for a contact).
First namefirst_nametext
The contact's first name.
Last namelast_nametext
The contact's last name.
User IDuser_idtext
Your app's own unique identifier for this user. Lets you find and update the contact later by user id.
User groupuser_grouptext
A group to segment the contact into, e.g. 'Founders' or 'Trial'. Used to target automations and lists.
Subscribedsubscribedtrue/false
Whether the contact is subscribed to marketing email. New contacts default to subscribed in Loops.
Mailing listsmailing_listsobject
Mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false, e.g. {"cmXXXXt0": true}. Find list ids in Loops under Settings > Mailing lists (or via the API).
Propertiespropertiesobject
Any custom contact properties to set, as an object, e.g. {"plan": "pro", "signupSource": "web"}. Loops creates a custom property automatically the first time it sees one.

Outputs

idtext
successtrue/false
Example output
{
  "id": "clkq1w2xy0000ju0f3z9abcde",
  "success": true
}

Delete contact

Remove a contact from your Loops audience by email, for offboarding or a data-deletion request.

Inputs

EmailemailtextRequired
The email address of the contact to delete.

Outputs

successtrue/false
Example output
{
  "success": true
}

Find contact

Look up a contact by email and return their properties and mailing-list subscriptions.

Inputs

EmailemailtextRequired
The email address of the contact to find.

Outputs

contactslist
Example output
{
  "contacts": [
    {
      "email": "contact@example.com",
      "firstName": "Ada",
      "id": "clkq1w2xy0000ju0f3z9abcde",
      "lastName": "Lovelace",
      "mailingLists": {},
      "source": "API",
      "subscribed": true,
      "userGroup": "Founders",
      "userId": "user_123"
    }
  ]
}

Send event

Send a lifecycle event for a contact to trigger a Loops automation (a 'loop'). Creates the contact if it doesn't exist.

Inputs

EmailemailtextRequired
The email address of the contact the event is for.
Event nameevent_nametextRequired
The name of the event, e.g. 'signup' or 'trialStarted'. This is what your Loops automations listen for.
Event propertiesevent_propertiesobject
Optional data to attach to the event, as an object, e.g. {"plan": "pro"}. Available in the automation and email templates.
Contact propertiescontact_propertiesobject
Optional contact properties to set on the contact at the same time, as an object.
Mailing listsmailing_listsobject
Optional mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false.

Outputs

successtrue/false
Example output
{
  "success": true
}

Update contact

Update a contact's properties or mailing-list subscriptions by email. Creates the contact if it doesn't exist yet.

Inputs

EmailemailtextRequired
The contact's email address (Loops' unique identifier for a contact).
First namefirst_nametext
The contact's first name.
Last namelast_nametext
The contact's last name.
User IDuser_idtext
Your app's own unique identifier for this user. Lets you find and update the contact later by user id.
User groupuser_grouptext
A group to segment the contact into, e.g. 'Founders' or 'Trial'. Used to target automations and lists.
Subscribedsubscribedtrue/false
Whether the contact is subscribed to marketing email. New contacts default to subscribed in Loops.
Mailing listsmailing_listsobject
Mailing lists to subscribe or unsubscribe the contact from, as a map of mailing-list id to true/false, e.g. {"cmXXXXt0": true}. Find list ids in Loops under Settings > Mailing lists (or via the API).
Propertiespropertiesobject
Any custom contact properties to set, as an object, e.g. {"plan": "pro", "signupSource": "web"}. Loops creates a custom property automatically the first time it sees one.

Outputs

idtext
successtrue/false
Example output
{
  "id": "clkq1w2xy0000ju0f3z9abcde",
  "success": true
}

On this page