EmailElement Docs

Contact API Reference

Endpoint

POST https://api.emailelement.com/api/contactList/{listId}/Contacts?overwriteExisting={true|false}

Authentication

All requests require the x-api-key header with a valid API key that has Contact API permission enabled.

x-api-key: YOUR_API_KEY

URL Parameters

Parameter Type Required Description
listId integer Yes The Contact List ID

Query Parameters

Parameter Type Default Description
overwriteExisting boolean false When true, if a contact with the same email already exists in the list, their data will be updated. When false, existing contacts are skipped.

Request Body

{
  "data": [
    {
      "Email": "john@example.com",
      "First Name": "John",
      "Last Name": "Doe",
      "Age": 30,
      "Date Of Birth": "1995-06-15T00:00:00.000Z"
    }
  ],
  "requiredFields": ["First Name"]
}

Fields

Field Type Required Description
data array Yes Array of contact objects to add
requiredFields array No List of field names that must have a value. Contacts missing these fields will be rejected.

Contact Object Fields

The Email field is always required. All other fields are optional. Use the exact field names as they appear in your Contact List (including spaces).

Standard fields:

Field Type Example
Email string "john@example.com"
First Name string "John"
Last Name string "Doe"
Middle Name string "Michael"
Full Name string "John Michael Doe"
Age integer 30
Date Of Birth string (ISO 8601) "1995-06-15T00:00:00.000Z"
Gender string "Male"
Address1 string "123 Main St"
Address2 string "Apt 4B"
City string "Austin"
State string "TX"
Postal Code string "78701"
Country string "US"
Phone Number string "555-0100"
Mobile Number string "555-0101"
Job Title string "Engineer"
Company Name string "Acme Corp"

Custom fields: Any custom fields defined on the Contact List can be included using the exact field name as the key.

Example: Multiple Contacts with Required Fields

{
  "data": [
    {
      "Email": "jane@example.com",
      "First Name": "Jane",
      "Last Name": "Smith",
      "City": "New York"
    },
    {
      "Email": "bob@example.com",
      "First Name": "Bob",
      "Last Name": "Johnson"
    }
  ],
  "requiredFields": ["First Name", "Last Name"]
}

Responses

Success (200 OK)

All contacts were accepted:

{
  "succeeded": true,
  "data": [
    {
      "Email": "jane@example.com",
      "First Name": "Jane",
      "Last Name": "Smith",
      "City": "New York"
    },
    {
      "Email": "bob@example.com",
      "First Name": "Bob",
      "Last Name": "Johnson"
    }
  ],
  "messages": []
}
Field Description
succeeded true if all contacts were processed successfully
data Array of accepted contact objects
messages Empty array when no errors

Validation Error (200 with errors)

One or more contacts failed validation (e.g., missing required fields):

{
  "succeeded": false,
  "data": null,
  "messages": [
    {
      "emailAddress": "jane@example.com",
      "errorMessage": "The following required fields are missing: First Name. The contact with email jane@example.com will not be added."
    }
  ]
}
Field Description
succeeded false when any contact failed
data null when validation fails
messages Array of error objects with emailAddress and errorMessage

Unauthorized (401)

Invalid or missing API key:

{
  "Data": null,
  "Succeeded": false,
  "Message": "Invalid ApiKey"
}
Cause Fix
Missing x-api-key header Add the header with your API key
Invalid or expired API key Generate a new API key in EmailElement
API key lacks Contact API permission Edit the API key and enable Contact API Full Access

Batch Operations

  • Send multiple contacts in a single request via the data array
  • For large imports, split into batches
  • Use overwriteExisting=true to update existing contacts by email match
  • Use requiredFields to enforce data quality — contacts missing required fields are rejected with a descriptive error

Custom Fields

  • Custom fields are created in the EmailElement UI under Contact Lists > select list > Custom Fields, or via the API Documentation page using + Add New Custom Field
  • Use the exact field name (including spaces) as the JSON key in the contact object
  • Custom field values can be strings, numbers, or dates depending on the field type

Rate Limits

  • 100 requests per minute per API key
  • 429 status code returned when limit is exceeded
  • Include a retry-after delay when receiving 429 responses
Something went wrong. Reloading the page usually fixes it. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.