Add custom field to contact list in elastic mail

To add a custom field to a contact list in Elastic Mail, you can follow these steps:

Method 1: Using the Elastic Mail Web Interface

  1. Log in to your Elastic Mail account and go to the "Contacts" tab.
  2. Click on the "Manage" button next to the contact list you want to add a custom field to.
  3. Click on the "Fields" tab.
  4. Click the "Add Field" button.
  5. Enter the name and type of the custom field (e.g., "Company", "Phone Number", etc.).
  6. Choose the data type for the field (e.g., text, number, date, etc.).
  7. Click "Save" to add the custom field.

Method 2: Using the Elastic Mail API

You can also add a custom field to a contact list using the Elastic Mail API. Here's an example of how to do it using the API:

  1. Make a GET request to https://api.elasticmail.com/v1/contacts/lists/{listId}/fields to retrieve the existing fields for the contact list.
  2. Identify the field you want to add and create a new field object with the desired name, type, and other properties.
  3. Make a POST request to https://api.elasticmail.com/v1/contacts/lists/{listId}/fields with the new field object in the request body.

Here's an example of what the request body might look like:

{
  "name": "Company",
  "type": "text",
  "required": false
}
  1. The API will return the newly created field object with its ID.

Method 3: Using a Third-Party Plugin

If you're using a third-party plugin to manage your Elastic Mail contact lists, you may be able to add custom fields through the plugin's interface. Check the plugin's documentation for more information.

Once you've added the custom field, you can use it to filter, sort, and search your contact list. You can also use it to populate custom fields in your email templates and automation workflows.