> ## Documentation Index
> Fetch the complete documentation index at: https://loops.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Contacts

> Create, update, find, and delete contacts, and manage suppression.

The `contacts` command lets you manage contacts in your Loops audience.

## `create`

Create a new contact.

```bash theme={"dark"}
loops contacts create \
  --email test@example.com \
  --first-name Alice \
  --list "cm06f5v0e45nf0ml5754o9cix=true"
```

### Flags

| Flag              | Short | Description                                                                                                                                                                                                                      |
| ----------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--email`         | `-e`  | Contact email address <Badge color="red" size="sm">Required</Badge>                                                                                                                                                              |
| `--user-id`       | `-u`  | User ID                                                                                                                                                                                                                          |
| `--first-name`    |       | First name                                                                                                                                                                                                                       |
| `--last-name`     |       | Last name                                                                                                                                                                                                                        |
| `--subscribed`    | `-s`  | [Subscribed status](/contacts/properties#subscribed) (`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](/contacts/properties)                                                                                                                                                                |

### Contact properties

Use `--prop` to set [contact properties](/contacts/properties) inline:

```bash theme={"dark"}
loops contacts create \
  --email test@example.com \
  --first-name Alice \
  --prop "planName=Pro" \
  --prop "signupDate=2025-01-15"
```

Alternatively, use `--contact-props` to set properties from a JSON file:

```json props.json theme={"dark"}
{
  "firstName": "Alice",
  "planName": "Pro",
  "signupDate": "2025-01-15"
}
```

```bash theme={"dark"}
loops contacts create \
  --email test@example.com \
  --contact-props ./props.json
```

<Note>
  The flags for default properties (i.e. `--first-name` or `--subscribed`) take precedence over the `--prop` flag.
</Note>

## `update`

Update an existing contact. Identify the contact by email or user ID.

```bash theme={"dark"}
loops contacts update \
  --email test@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](/contacts/properties#subscribed) (`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                                |

### Contact properties

Use `--prop` to set [contact properties](/contacts/properties) inline:

```bash theme={"dark"}
loops contacts update \
  --email test@example.com \
  --last-name Smith \
  --prop "planName=Unlimited"
```

Alternatively, use `--contact-props` to set properties from a JSON file:

```json props.json theme={"dark"}
{
  "lastName": "Smith",
  "planName": "Unlimited",
}
```

```bash theme={"dark"}
loops contacts update \
  --email test@example.com \
  --contact-props ./props.json
```

<Note>
  The flags for default properties (i.e. `--first-name` or `--subscribed`) take precedence over the `--prop` flag.
</Note>

## `find`

Find a contact by email or user ID.

```bash theme={"dark"}
loops contacts find --email test@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.

```bash theme={"dark"}
loops contacts delete --email test@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.

```bash theme={"dark"}
loops contacts suppression check --email test@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.

```bash theme={"dark"}
loops contacts suppression remove --email test@example.com
```

### Flags

| Flag        | Short | Description           |
| ----------- | ----- | --------------------- |
| `--email`   | `-e`  | Contact email address |
| `--user-id` | `-u`  | Contact user ID       |
