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

# Contacts

> Learn how to manage your email contacts

## Managing Contacts

Contacts are the email addresses you send emails to. It provides three ways to manage your contacts.

### 1. Console Management

Add, view, and manage contacts directly through the web interface:

<video autoPlay muted loop playsInline className="w-full rounded-xl" src="https://mintcdn.com/nosubs/aWstFxNRErjI28p7/assets/contacts.mp4?fit=max&auto=format&n=aWstFxNRErjI28p7&q=85&s=cd885ac59b12c835a5c41d038dc9d350" data-path="assets/contacts.mp4" />

### 2. Bulk File Upload

Import or delete contacts in bulk by uploading a CSV or JSON file:

1. Click **Import Contacts** in the contacts page
2. Select your file (CSV or JSON format)
3. Choose action: **Add contacts** or **Delete contacts**

```csv CSV format theme={null}
emailAddress,unsubscribeAll,attributesData
john.doe@example.com,false,"{""Name"": ""John"", ""Company"": ""ACM Inc""}"
jane.smith@example.com,true,"{""Name"": ""Jane"", ""Company"": null}"
```

```json JSON format expandable theme={null}
{
     "emailAddress": "john.deo@example.com",
     "unsubscribeAll": false,
     "attributesData": "{\"Name\":\"John\"}"
}
{
     "emailAddress": "jane.smith@example.com",
     "unsubscribeAll": true,
}
```

### 3. AWS SES API

Access contacts programmatically using AWS SES APIs. You can use your prefered language to manage your contacts.

Click **AWS API** in the contacts page to get your specific region and contact list name.

#### List Contacts

<CodeGroup>
  ```bash AWS CLI theme={null}
  aws sesv2 list-contacts \
    --region "<your-region>" \
    --contact-list-name "<your-contact-list-name>"
  ```

  ```javascript JavaScript SDK theme={null}
  import * as AWS from "@aws-sdk/client-sesv2";

  const client = new AWS.SESv2({
    region: "<your-region>",
  });

  const { Contacts } = await client.listContacts({
    ContactListName: "<your-contact-list-name>",
    PageSize: 100,
  });
  ```
</CodeGroup>

#### Get Contact

<CodeGroup>
  ```bash AWS CLI theme={null}
  aws sesv2 get-contact \
    --region "<your-region>" \
    --contact-list-name "<your-contact-list-name>" \
    --email-address "<email-address>"
  ```

  ```javascript JavaScript SDK theme={null}
  import * as AWS from "@aws-sdk/client-sesv2";

  const client = new AWS.SESv2({
    region: "<your-region>",
  });

  const contact = await client.getContact({
    ContactListName: "<your-contact-list-name>",
    EmailAddress: "<email-address>",
  });
  ```
</CodeGroup>

#### Add Contact

<CodeGroup>
  ```bash AWS CLI theme={null}
  aws sesv2 create-contact \
    --region "<your-region>" \
    --contact-list-name "<your-contact-list-name>" \
    --email-address "<email-address>" \
    --attributes-data '{"<key>": "<value>"}'
  ```

  ```javascript JavaScript SDK theme={null}
  import * as AWS from "@aws-sdk/client-sesv2";

  const client = new AWS.SESv2({
    region: "<your-region>",
  });

  await client.createContact({
    ContactListName: "<your-contact-list-name>",
    EmailAddress: "<email-address>",
    AttributesData: {
      "<key>": "<value>",
    },
  });
  ```
</CodeGroup>

#### Update Contact

<CodeGroup>
  ```bash AWS CLI theme={null}
  aws sesv2 update-contact \
    --region "<your-region>" \
    --contact-list-name "<your-contact-list-name>" \
    --email-address "<email-address>" \
    --attributes-data '{"<key>": "<value>"}'
  ```

  ```javascript JavaScript SDK theme={null}
  import * as AWS from "@aws-sdk/client-sesv2";

  const client = new AWS.SESv2({
    region: "<your-region>",
  });

  await client.updateContact({
    ContactListName: "<your-contact-list-name>",
    EmailAddress: "<email-address>",
    AttributesData: {
      "<key>": "<value>",
    },
  });
  ```
</CodeGroup>

#### Delete Contact

<CodeGroup>
  ```bash AWS CLI theme={null}
  aws sesv2 delete-contact \
    --region "<your-region>" \
    --contact-list-name "<your-contact-list-name>" \
    --email-address "<email-address>"
  ```

  ```javascript JavaScript SDK theme={null}
  import * as AWS from "@aws-sdk/client-sesv2";

  const client = new AWS.SESv2({
    region: "<your-region>",
  });

  await client.deleteContact({
    ContactListName: "<your-contact-list-name>",
    EmailAddress: "<email-address>",
  });
  ```
</CodeGroup>

## Attribute Data

Attribute data is custom key-value pairs that you can attach to each contact. This allows you to store additional information about your contacts, such as their name, company, or any other relevant data.

<Note>Attribute data must be a JSON object.</Note>

## Where Contacts Are Stored

**Contacts are stored in AWS SES Contact Lists, not in our database.** This means:

* Your contact data never leaves your AWS account
* You have full ownership and control of your contacts
* Direct access to your contacts through AWS SES APIs

## Additional resources

* [Using list management](https://docs.aws.amazon.com/ses/latest/dg/sending-email-list-management.html)
* [SES API](https://docs.aws.amazon.com/ses/latest/APIReference-V2/Welcome.html)
