Loops
Manage contacts and send emails with Loops
Integrate Loops into the workflow. Create and manage contacts, send transactional emails, and trigger event-based automations.
Create a new contact in your Loops audience with an email address and optional properties like name, user group, and mailing list subscriptions.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | Yes | No description |
firstName | string | No | No description |
lastName | string | No | No description |
source | string | No | Custom source value replacing the default "API" |
subscribed | boolean | No | No description |
userGroup | string | No | No description |
userId | string | No | No description |
mailingLists | json | No | Mailing list IDs mapped to boolean values (true to subscribe, false to unsubscribe) |
customProperties | json | No | Custom contact properties as key-value pairs (string, number, boolean, or date values) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the contact was created successfully |
id | string | The Loops-assigned ID of the created contact |
Update an existing contact in Loops by email or userId. Creates a new contact if no match is found (upsert). Can update name, subscription status, user group, mailing lists, and custom properties.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | No | No description |
userId | string | No | No description |
firstName | string | No | No description |
lastName | string | No | No description |
source | string | No | Custom source value replacing the default "API" |
subscribed | boolean | No | Whether the contact receives campaign emails (sending true re-subscribes unsubscribed contacts) |
userGroup | string | No | No description |
mailingLists | json | No | Mailing list IDs mapped to boolean values (true to subscribe, false to unsubscribe) |
customProperties | json | No | No description |
| Parameter | Type | Description |
|---|
success | boolean | Whether the contact was updated successfully |
id | string | The Loops-assigned ID of the updated or created contact |
Find a contact in Loops by email address or userId. Returns an array of matching contacts with all their properties including name, subscription status, user group, and mailing lists.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | No | The contact email address to search for (at least one of email or userId is required) |
userId | string | No | No description |
| Parameter | Type | Description |
|---|
contacts | array | Array of matching contact objects (empty array if no match found) |
↳ id | string | Loops-assigned contact ID |
↳ email | string | Contact email address |
↳ firstName | string | Contact first name |
↳ lastName | string | Contact last name |
↳ source | string | Source the contact was created from |
↳ subscribed | boolean | Whether the contact receives campaign emails |
↳ userGroup | string | Contact user group |
↳ userId | string | External user identifier |
↳ mailingLists | object | Mailing list IDs mapped to subscription status |
↳ optInStatus | string | Double opt-in status: pending, accepted, rejected, or null |
Delete a contact from Loops by email address or userId. At least one identifier must be provided.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | No | The email address of the contact to delete (at least one of email or userId is required) |
userId | string | No | The userId of the contact to delete (at least one of email or userId is required) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the contact was deleted successfully |
message | string | Status message from the API |
Send a transactional email to a recipient using a Loops template. Supports dynamic data variables for personalization and optionally adds the recipient to your audience.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | Yes | No description |
transactionalId | string | Yes | No description |
dataVariables | json | No | No description |
addToAudience | boolean | No | Whether to create the recipient as a contact if they do not already exist (default: false) |
attachments | json | No | Array of file attachments. Each object must have filename (string), contentType (MIME type string), and data (base64-encoded string). |
| Parameter | Type | Description |
|---|
success | boolean | Whether the transactional email was sent successfully |
Send an event to Loops to trigger automated email sequences for a contact. Identify the contact by email or userId and include optional event properties and mailing list changes.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
email | string | No | No description |
userId | string | No | No description |
eventName | string | Yes | No description |
eventProperties | json | No | No description |
mailingLists | json | No | Mailing list IDs mapped to boolean values (true to subscribe, false to unsubscribe) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the event was sent successfully |
Retrieve all mailing lists from your Loops account. Returns each list with its ID, name, description, and public/private status.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
| Parameter | Type | Description |
|---|
mailingLists | array | Array of mailing list objects |
↳ id | string | The mailing list ID |
↳ name | string | The mailing list name |
↳ description | string | The mailing list description (null if not set) |
↳ isPublic | boolean | Whether the list is public or private |
Retrieve a list of published transactional email templates from your Loops account. Returns each template with its ID, name, last updated timestamp, and data variables.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
perPage | string | No | No description |
cursor | string | No | No description |
| Parameter | Type | Description |
|---|
transactionalEmails | array | Array of published transactional email templates |
↳ id | string | The transactional email template ID |
↳ name | string | The template name |
↳ lastUpdated | string | Last updated timestamp |
↳ dataVariables | array | Template data variable names |
pagination | object | Pagination information |
↳ totalResults | number | Total number of results |
↳ returnedResults | number | Number of results returned |
↳ perPage | number | Results per page |
↳ totalPages | number | Total number of pages |
↳ nextCursor | string | Cursor for next page (null if no more pages) |
↳ nextPage | string | URL for next page (null if no more pages) |
Create a new custom contact property in your Loops account. The property name must be in camelCase format.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
name | string | Yes | The property name in camelCase format (e.g., "favoriteColor") |
type | string | Yes | The property data type (e.g., "string", "number", "boolean", "date") |
| Parameter | Type | Description |
|---|
success | boolean | Whether the contact property was created successfully |
Retrieve a list of contact properties from your Loops account. Returns each property with its key, label, and data type. Can filter to show all properties or only custom ones.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
list | string | No | Filter type: "all" for all properties (default) or "custom" for custom properties only |
| Parameter | Type | Description |
|---|
properties | array | Array of contact property objects |
↳ key | string | The property key (camelCase identifier) |
↳ label | string | The property display label |
↳ type | string | The property data type (string, number, boolean, date) |