The contacts command lets you manage contacts in your Loops audience.
create
Create a new contact.
loops contacts create \
--email alice@example.com \
--first-name Alice \
--list "cm06f5v0e45nf0ml5754o9cix=true"
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address Required |
--user-id | -u | User ID |
--first-name | | First name |
--last-name | | Last name |
--subscribed | -s | Subscribed status (true or false). We recommend leaving this field out unless you specifically want to unsubscribe or re-subscribe a contact. All new contacts are subscribed by default. |
--user-group | | User group |
--source | | Source (“API” by default) |
--list | | Mailing list subscription as id=true|false (repeatable) |
--prop | | Contact property as KEY=value (repeatable) |
--contact-props | | Path to a JSON file of contact properties |
Use --prop to set contact properties inline:
loops contacts create \
--email alice@example.com \
--first-name Alice \
--prop "planName=Pro" \
--prop "signupDate=2025-01-15"
Alternatively, use --contact-props to set properties from a JSON file:
{
"firstName": "Alice",
"planName": "Pro",
"signupDate": "2025-01-15"
}
loops contacts create \
--email alice@example.com \
--contact-props ./props.json
The flags for default properties (i.e. --first-name or --subscribed) take precedence over the --prop flag.
update
Update an existing contact. Identify the contact by email or user ID.
loops contacts update \
--email alice@example.com \
--last-name Smith \
--list "cm06f5v0e45nf0ml5754o9cix=true"
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address |
--user-id | -u | User ID |
--first-name | | First name |
--last-name | | Last name |
--subscribed | -s | Subscribed status (true or false) |
--user-group | | User group |
--list | | Mailing list subscription as id=true|false (repeatable) |
--prop | | Contact property as KEY=value (repeatable) |
--contact-props | | Path to a JSON file of contact properties |
Use --prop to set contact properties inline:
loops contacts update \
--email alice@example.com \
--last-name Smith \
--prop "planName=Unlimited"
Alternatively, use --contact-props to set properties from a JSON file:
{
"lastName": "Smith",
"planName": "Unlimited",
}
loops contacts update \
--email alice@example.com \
--contact-props ./props.json
The flags for default properties (i.e. --first-name or --subscribed) take precedence over the --prop flag.
find
Find a contact by email or user ID.
loops contacts find --email alice@example.com
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address |
--user-id | -u | Contact user ID |
delete
Delete a contact by email or user ID.
loops contacts delete --email alice@example.com
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address |
--user-id | -u | Contact user ID |
suppression check
Check whether a contact is on the suppression list. Identify the contact by email or user ID.
loops contacts suppression check --email alice@example.com
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address |
--user-id | -u | Contact user ID |
suppression remove
Remove a contact from the suppression list. Identify the contact by email or user ID.
loops contacts suppression remove --email alice@example.com
Flags
| Flag | Short | Description |
|---|
--email | -e | Contact email address |
--user-id | -u | Contact user ID |