---
updatedAt: 2026-06-25T09:31:02.000Z
agentTools:
  projectIndex: https://marketing.developer.dotdigital.com/llms.txt
---

# Import a single contact

Imports a single contact; if it is an existing contact it updates the contact with just the fields passed in the request with a choice of how to handle the merging of data, otherwise it creates a new contact.<br><br>
**Note:** To create a new contact, the request body must contain **identifiers.email** or **identifiers.mobileNumber**, even if you use the same identifier in the path. If it does not, the call returns **400 Bad request** with the error code **contacts:identifierMissing**.

> 📘 Request behavior
>
> The `identifier` specified in the URL path is used to uniquely identify a contact. This can be a custom identifier or a system contact identifier; **contactId**, email, or **mobileNumber**.
>
> #### Existing contacts
>
> When we find a contact in the account with the specified identifier, the contact record is updated with any data supplied in the object in the request body.
>
> #### Deleted contacts
>
> When we find a contact in the recycled bin with the same identifier that you pass in, we will undelete the contact and update with the passed details.
>
> #### New contacts
>
> If no contact is found with the provided identifier, the contact is created using the identifiers supplied in the object in the request body. The object must contain either an email address or mobile number in the `identifiers` field.

<span class="callRateMedium" />

> 🚧 Specifying `null` for a field's value clears the field
>
> Only pass the fields **you require updating** for a contact.
>
> We interpret a field passed with a `null` value (in other words, an empty field) as an instruction to clear the value for that field.
>
> *Note: This only works with data fields in this call,**not identifiers**.*

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Contacts",
    "description": "Create, Get, update, and delete contacts. Use this API to look up contacts\nby identifier, perform full or partial updates on a single contact, bulk-import\ncollections of contacts asynchronously, and bulk-delete contacts. When listing\ncontacts you can filter by contact status, list subscription status, list\nmembership, segment, or creation and modification date. Each contact can carry\ndata fields, channel properties (email, SMS, WhatsApp), list memberships,\nmarketing preferences, and consent records.",
    "version": "3.5.0"
  },
  "externalDocs": {
    "description": "Learn more about Dotdigital APIs",
    "url": "https://developer.dotdigital.com"
  },
  "servers": [
    {
      "url": "https://{region}-api.dotdigital.com",
      "variables": {
        "region": {
          "description": "The Dotdigital region id your account belongs to",
          "enum": [
            "r1",
            "r2",
            "r3"
          ],
          "default": "r1"
        }
      }
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/contacts/v3/{identifier}/{value}": {
      "patch": {
        "summary": "Import a single contact",
        "description": "Imports a single contact; if it is an existing contact it updates the contact with just the fields passed in the request with a choice of how to handle the merging of data, otherwise it creates a new contact.<br><br>\n**Note:** To create a new contact, the request body must contain **identifiers.email** or **identifiers.mobileNumber**, even if you use the same identifier in the path. If it does not, the call returns **400 Bad request** with the error code **contacts:identifierMissing**.",
        "operationId": "importContact",
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "description": "The field to use to uniquely identify the contact. This can be a custom identifier or a contact identifer of **contactId**, **email** or **mobileNumber**",
            "required": true,
            "schema": {
              "maxLength": 50,
              "minLength": 1,
              "pattern": "(^[-A-Za-z0-9_]{1,50}$)",
              "type": "string"
            },
            "examples": {
              "email": {
                "summary": "Email address",
                "value": "email"
              },
              "mobileNumber": {
                "summary": "Mobile number",
                "value": "mobileNumber"
              },
              "contactId": {
                "summary": "Contact ID",
                "value": "contactId"
              },
              "customIdentifier": {
                "summary": "Custom identifier",
                "value": "loyaltyId"
              }
            }
          },
          {
            "name": "value",
            "in": "path",
            "description": "The unique value to identify the contact.<br>***Note:** Must be the same type as the **identifier***",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "examples": {
              "email": {
                "summary": "Email address (use with the email identifier)",
                "value": "amelia.thornbury@emailsim.io"
              },
              "mobileNumber": {
                "summary": "Mobile number (use with the mobileNumber identifier)",
                "value": "447700900184"
              },
              "contactId": {
                "summary": "Contact ID (use with the contactId identifier)",
                "value": "35212311"
              },
              "customIdentifier": {
                "summary": "Custom identifier value (use with the loyaltyId identifier)",
                "value": "LOY-000184"
              }
            }
          },
          {
            "name": "x-ddg-integration-token",
            "in": "header",
            "description": "If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.com/docs/verified-integration-tracking) here.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "5a96bc79-19a7-4544-973b-e2da0c9136f9"
            }
          },
          {
            "name": "merge-option",
            "in": "query",
            "description": "Set the behavior of how the new data should be merged into existing contacts.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "overwrite",
              "enum": [
                "overwrite",
                "overwrite-if-not-empty",
                "overwrite-if-empty"
              ],
              "default": "overwrite"
            }
          }
        ],
        "requestBody": {
          "description": "The contact fields to update. **Note:** It is not possible to modify the **contactId** field",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateContactRequest"
              },
              "examples": {
                "updateDataAndIdentifiers": {
                  "summary": "Update a contact's data fields and identifiers",
                  "description": "Updates the data fields of the contact and adds a mobile number and a custom identifier.<br>\n**Request:** `PATCH /contacts/v3/email/amelia.thornbury@emailsim.io`<br><br>\n**Note:** The custom identifier (`loyaltyId` in this example) must already exist in your account.",
                  "value": {
                    "identifiers": {
                      "mobileNumber": "447700900184",
                      "loyaltyId": "LOY-000184"
                    },
                    "dataFields": {
                      "FIRSTNAME": "Amelia",
                      "LASTNAME": "Thornbury",
                      "GENDER": "female",
                      "POSTCODE": "ZZ1 4AB"
                    }
                  }
                },
                "unsubscribeFromEmail": {
                  "summary": "Unsubscribe a contact from the email channel",
                  "description": "Sets the email channel status of the contact to **unsubscribed**. The data fields, identifiers and other channels of the contact do not change.<br>\n**Request:** `PATCH /contacts/v3/email/marcus.oldacre@emailsim.io`",
                  "value": {
                    "channelProperties": {
                      "email": {
                        "status": "unsubscribed"
                      }
                    }
                  }
                },
                "setEmailOpenTracking": {
                  "summary": "Set email open tracking for a contact",
                  "description": "Sets only the **openTracking** property of the email channel, so that you are allowed to track email opens for the contact. The email subscription status does not change.<br>\n**Request:** `PATCH /contacts/v3/mobileNumber/447700900362`",
                  "value": {
                    "channelProperties": {
                      "email": {
                        "openTracking": "subscribed"
                      }
                    }
                  }
                },
                "addConsentRecord": {
                  "summary": "Add a consent record to a contact",
                  "description": "Adds a marketing consent record that was captured on a sign-up form.<br>\n**Request:** `PATCH /contacts/v3/email/elodie.marchetti@emailsim.io`<br><br>\n**Note:** Each consent record must include **text**, **dateTimeConsented**, **url**, **ipAddress** and **userAgent**. You can send a maximum of 5 consent records.",
                  "value": {
                    "consentRecords": [
                      {
                        "text": "Yes, I would like to receive the monthly newsletter and special offers by email",
                        "dateTimeConsented": "2026-09-14T10:42:17Z",
                        "url": "https://www.example.com/newsletter/signup",
                        "ipAddress": "203.0.113.48",
                        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
                      }
                    ]
                  }
                },
                "updateDataIdentifiersAndLists": {
                  "summary": "Update a contact's data fields, identifiers and list membership",
                  "description": "Finds the contact by the custom identifier **loyaltyId**, updates the data fields and identifiers, and adds the contact to two lists. If the contact does not exist, it is created.<br>\n**Request:** `PATCH /contacts/v3/loyaltyId/LOY-000912?merge-option=overwrite`<br><br>\n**Note:** The custom identifier and the list IDs must already exist in your account. The contact is added to the lists you specify; it is not removed from other lists.",
                  "value": {
                    "identifiers": {
                      "email": "hana.velloway@emailsim.io",
                      "mobileNumber": "447700900912"
                    },
                    "dataFields": {
                      "FIRSTNAME": "Hana",
                      "LASTNAME": "Velloway",
                      "GENDER": "female",
                      "LOYALTYTIER": "Gold"
                    },
                    "lists": [
                      345579,
                      345612
                    ]
                  }
                },
                "resubscribeEmail": {
                  "summary": "Resubscribe a contact to email with a confirmation email",
                  "description": "Sets the email channel status to **subscribed** and sends the contact a resubscription confirmation email in English. After the contact confirms, they are sent to the URL in **redirectUrlAfterChallenge**. The data fields, identifiers, lists and preferences of the contact do not change.<br>\n**Request:** `PATCH /contacts/v3/email/priya.halvorsen@emailsim.io`<br><br>\n**Note:** To resubscribe the contact without a confirmation email, set **resubscribeWithNoChallenge** to **true**.",
                  "value": {
                    "channelProperties": {
                      "email": {
                        "status": "subscribed",
                        "resubscribeOptions": {
                          "resubscribeWithNoChallenge": false,
                          "preferredLocale": "en-EN",
                          "redirectUrlAfterChallenge": "https://www.example.com/newsletter/resubscribed"
                        }
                      }
                    }
                  }
                },
                "createNewContact": {
                  "summary": "Create a contact if it does not exist",
                  "description": "No contact has this email address, so a new contact is created and the call returns **201 Created**.<br>\n**Request:** `PATCH /contacts/v3/email/tobias.wrenfield@emailsim.io`<br><br>\n**Note:** To create a contact, the request body must contain **identifiers.email** or **identifiers.mobileNumber**, even if you use the same identifier in the path.",
                  "value": {
                    "identifiers": {
                      "email": "tobias.wrenfield@emailsim.io"
                    },
                    "dataFields": {
                      "FIRSTNAME": "Tobias",
                      "LASTNAME": "Wrenfield"
                    },
                    "channelProperties": {
                      "email": {
                        "optInType": "single"
                      }
                    }
                  }
                },
                "updateExistingContact": {
                  "summary": "Update a contact that exists",
                  "description": "The contact created by the **createNewContact** example exists, so it is updated and the call returns **200 OK**. Only the **LASTNAME** data field and the **openTracking** email property change.<br>\n**Request:** `PATCH /contacts/v3/email/tobias.wrenfield@emailsim.io?merge-option=overwrite`",
                  "value": {
                    "dataFields": {
                      "LASTNAME": "Wrenfield-Hale"
                    },
                    "channelProperties": {
                      "email": {
                        "openTracking": "subscribed"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Contact updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contact"
                },
                "examples": {
                  "updateExistingContact": {
                    "summary": "Contact updated",
                    "description": "The response to the **updateExistingContact** request example. The response contains the full contact. Lists, preferences and consent records are only included if the contact has them.<br><br>\n**Note:**\n* Every data field in your account is returned. Data fields that have no value are **null**. This example shows only some of them.\n* Every identifier in your account is returned. Identifiers that have no value are empty.",
                    "value": {
                      "contactId": 35214388,
                      "status": "subscribed",
                      "created": "2026-10-16T14:30:07.377",
                      "updated": "2026-10-16T14:30:41.267",
                      "identifiers": {
                        "email": "tobias.wrenfield@emailsim.io",
                        "mobileNumber": "",
                        "loyaltyId": ""
                      },
                      "dataFields": {
                        "FIRSTNAME": "Tobias",
                        "LASTNAME": "Wrenfield-Hale"
                      },
                      "channelProperties": {
                        "email": {
                          "status": "subscribed",
                          "emailType": "html",
                          "optInType": "single",
                          "openTracking": "subscribed"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Contact created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contact"
                },
                "examples": {
                  "createNewContact": {
                    "summary": "Contact created",
                    "description": "The response to the **createNewContact** request example. The response contains the full contact. The email channel gets the default values for the properties that were not sent.<br><br>\n**Note:**\n* Every data field in your account is returned. Data fields that have no value are **null**. This example shows only some of them.\n* Every identifier in your account is returned. Identifiers that have no value are empty.",
                    "value": {
                      "contactId": 35214388,
                      "status": "subscribed",
                      "created": "2026-10-16T14:30:07.3760173Z",
                      "updated": "2026-10-16T14:30:07.3760173Z",
                      "identifiers": {
                        "email": "tobias.wrenfield@emailsim.io",
                        "mobileNumber": "",
                        "loyaltyId": ""
                      },
                      "dataFields": {
                        "FIRSTNAME": "Tobias",
                        "LASTNAME": "Wrenfield"
                      },
                      "channelProperties": {
                        "email": {
                          "status": "subscribed",
                          "emailType": "html",
                          "optInType": "single",
                          "openTracking": "unknown"
                        }
                      },
                      "consentRecords": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponse"
                },
                "examples": {
                  "invalidIdentifier": {
                    "summary": "Identifier value is not valid",
                    "value": {
                      "errorCode": "contacts:invalidId",
                      "description": "The id value '123646' is invalid for the identifier 'email'"
                    }
                  },
                  "identifierMissing": {
                    "summary": "New contact without an email address or mobile number",
                    "description": "The contact does not exist, and the request body does not contain **identifiers.email** or **identifiers.mobileNumber**, so the contact cannot be created.",
                    "value": {
                      "errorCode": "contacts:identifierMissing",
                      "description": "You must provide at least one identifier for email (email) or mobile number (mobileNumber)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Identifier conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponse"
                },
                "example": {
                  "errorCode": "contacts:idAlreadyExists",
                  "description": "The id value 'jane.doe@emailsim.io' for the identifier 'email' already exists. All identifiers must be unique!"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "optInType": {
        "type": "string",
        "description": "Channel opt-in type for the contact",
        "example": "double",
        "enum": [
          "unknown",
          "single",
          "double",
          "verifiedDouble"
        ]
      },
      "status": {
        "type": "string",
        "description": "The opt in status for the contact. Only **getContacts** returns contacts with the status **deleted**.",
        "example": "subscribed",
        "enum": [
          "subscribed",
          "unsubscribed",
          "pendingOptIn",
          "deleted",
          "suppressed",
          "binned",
          "noSubscription"
        ]
      },
      "preference": {
        "required": [
          "id",
          "isOptedIn"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the preference",
            "format": "int32",
            "example": 1
          },
          "isOptedIn": {
            "type": "boolean",
            "description": "Specify whether the contact is opted into this preference"
          }
        }
      },
      "preferenceFull": {
        "required": [
          "id",
          "isOptedIn",
          "privateName",
          "publicName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the preference",
            "format": "int32",
            "example": 1
          },
          "isOptedIn": {
            "type": "boolean",
            "description": "Indicates whether the contact is opted into this preference"
          },
          "publicName": {
            "type": "string",
            "description": "Public name of the marketing preference",
            "example": "Mens fashion"
          },
          "privateName": {
            "type": "string",
            "description": "Private name of the marketing preference",
            "example": "mensFashion01"
          }
        }
      },
      "consentRecord": {
        "required": [
          "dateTimeConsented",
          "ipAddress",
          "text",
          "url",
          "userAgent"
        ],
        "type": "object",
        "properties": {
          "text": {
            "minLength": 1,
            "type": "string",
            "description": "Consent text displayed to the contact",
            "example": "Yes, I would like to receive a monthly newsletter"
          },
          "dateTimeConsented": {
            "type": "string",
            "description": "ISO 8601 UTC timestamp for when the consent was obtained",
            "format": "date-time",
            "example": "2023-01-26T21:29:00Z"
          },
          "url": {
            "type": "string",
            "description": "URL the consent was obtained with",
            "format": "uri",
            "example": "http://www.example.com/signup"
          },
          "ipAddress": {
            "oneOf": [
              {
                "type": "string",
                "description": "IPv4 address of the contact the consent was obtained for",
                "format": "ipv4",
                "example": "129.168.0.2"
              },
              {
                "type": "string",
                "description": "IPv6 address of the contact the consent was obtained for",
                "format": "ipv6",
                "example": "2b01:1234:136:0:116f:3244:a476:d6b7"
              }
            ]
          },
          "userAgent": {
            "minLength": 1,
            "type": "string",
            "description": "User agent header of the browser used by the contact the consent was obtained for",
            "example": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
          }
        },
        "description": "Marketing consent records to be associated with the contact"
      },
      "consentRecordsToBeInserted": {
        "maxItems": 5,
        "minItems": 1,
        "type": "array",
        "description": "The marketing consent records to be associated with the contact",
        "items": {
          "$ref": "#/components/schemas/consentRecord"
        }
      },
      "consentRecords": {
        "type": "array",
        "description": "Marketing consent records associated with the contact. If the contact has no consent records, this property is an empty array or is not included, depending on the call.",
        "items": {
          "example": {
            "text": "Yes, I would like to receive a monthly newsletter",
            "dateTimeConsented": "2023-01-26T21:29:00",
            "url": "http://www.example.com/signup",
            "ipAddress": "129.168.0.2",
            "userAgent": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36",
            "dateTimeCreated": "2023-01-26T22:55:00"
          },
          "allOf": [
            {
              "$ref": "#/components/schemas/consentRecord"
            },
            {
              "required": [
                "dateTimeCreated"
              ],
              "type": "object",
              "properties": {
                "dateTimeCreated": {
                  "type": "string",
                  "description": "UTC timestamp for when the consent record was created, in ISO 8601 format. Depending on the call, it is returned with or without the **Z** time zone designator and fractional seconds. For example, **getContact** returns **2023-07-11T11:19:06.2514793Z** and **createContact** returns **2026-10-16T13:17:36**.",
                  "format": "date-time",
                  "example": "2023-01-26T22:55:00Z"
                }
              }
            }
          ]
        }
      },
      "contactBasicDetails": {
        "required": [
          "contactId",
          "created",
          "identifiers",
          "status",
          "updated"
        ],
        "type": "object",
        "properties": {
          "contactId": {
            "$ref": "#/components/schemas/contactId"
          },
          "status": {
            "$ref": "#/components/schemas/status"
          },
          "created": {
            "type": "string",
            "description": "UTC timestamp for when the contact was created, in ISO 8601 format. Depending on the call, it is returned with or without the **Z** time zone designator, and with up to 7 fractional-second digits. For example, **getContacts** returns **2025-03-04T09:15:22.483** and **createContact** returns **2026-10-16T13:17:36.4759674Z**.",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "description": "UTC timestamp for when the contact was last updated, in ISO 8601 format. Depending on the call, it is returned with or without the **Z** time zone designator, and with up to 7 fractional-second digits. For example, **getContacts** returns **2026-10-12T14:03:51.27** and **createContact** returns **2026-10-16T13:17:36.4759674Z**.",
            "format": "date-time"
          },
          "identifiers": {
            "$ref": "#/components/schemas/identifiers"
          }
        }
      },
      "contact": {
        "allOf": [
          {
            "$ref": "#/components/schemas/contactBasicDetails"
          },
          {
            "type": "object",
            "properties": {
              "dataFields": {
                "type": "object",
                "additionalProperties": true,
                "description": "Addtional data fields for the contact specified for the contact",
                "example": {
                  "FIRSTNAME": "John",
                  "LASTNAME": "Doe",
                  "GENDER": "male"
                }
              },
              "channelProperties": {
                "type": "object",
                "properties": {
                  "email": {
                    "required": [
                      "emailType",
                      "openTracking",
                      "optInType",
                      "status"
                    ],
                    "type": "object",
                    "properties": {
                      "emailType": {
                        "type": "string",
                        "description": "The format the contact expects emails in.",
                        "example": "html",
                        "enum": [
                          "plainText",
                          "html"
                        ]
                      },
                      "optInType": {
                        "$ref": "#/components/schemas/optInType"
                      },
                      "status": {
                        "$ref": "#/components/schemas/emailChannelStatus"
                      },
                      "openTracking": {
                        "type": "string",
                        "description": "Specifies if you are allowed to track email opens for the contact. **unknown** means that no explicit opt-in or opt-out record exists.",
                        "example": "subscribed",
                        "enum": [
                          "unknown",
                          "subscribed",
                          "unsubscribed"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "sms": {
                    "required": [
                      "countryCode",
                      "status"
                    ],
                    "type": "object",
                    "properties": {
                      "countryCode": {
                        "type": "string",
                        "description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code the contacts **mobileNumber**",
                        "example": "GB"
                      },
                      "status": {
                        "$ref": "#/components/schemas/smsChannelStatus"
                      }
                    },
                    "additionalProperties": false
                  },
                  "whatsApp": {
                    "required": [
                      "status"
                    ],
                    "type": "object",
                    "properties": {
                      "status": {
                        "$ref": "#/components/schemas/whatsAppChannelStatus"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "description": "Properties associated with each channel for a contact, for example message format or subscription status. A channel the contact does not have, or a channel that was deleted, is not included."
              },
              "lists": {
                "type": "array",
                "description": "Lists the contact belongs to",
                "items": {
                  "required": [
                    "id",
                    "name",
                    "status"
                  ],
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Immutable unique list ID",
                      "format": "int32",
                      "example": 12345
                    },
                    "name": {
                      "maxLength": 128,
                      "type": "string",
                      "description": "Name of the list",
                      "example": "Top customers"
                    },
                    "status": {
                      "type": "string",
                      "description": "The list status for the contact",
                      "example": "subscribed",
                      "enum": [
                        "subscribed",
                        "suppressed",
                        "pending"
                      ]
                    }
                  }
                }
              },
              "preferences": {
                "type": "array",
                "description": "Marketing preferences of the contact. If the contact has no preferences, this property is an empty array or is not included, depending on the call.",
                "items": {
                  "$ref": "#/components/schemas/preferenceFull"
                }
              },
              "consentRecords": {
                "$ref": "#/components/schemas/consentRecords"
              }
            },
            "description": "A contact"
          }
        ]
      },
      "baseContact": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "dataFields": {
                "type": "object",
                "additionalProperties": true,
                "description": "Addtional data fields for the contact",
                "example": {
                  "FIRSTNAME": "John",
                  "LASTNAME": "Doe",
                  "GENDER": "male"
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/channelProperties"
          },
          {
            "type": "object",
            "properties": {
              "lists": {
                "maxItems": 100,
                "minItems": 1,
                "type": "array",
                "description": "List IDs for the lists the contact should be added to",
                "items": {
                  "type": "integer",
                  "description": "Unique list id",
                  "format": "int32",
                  "example": 345579
                }
              },
              "preferences": {
                "minItems": 1,
                "type": "array",
                "description": "Preferences you want to opt the contact into. ***Note:** Only required for preferences and not preference categories*",
                "items": {
                  "$ref": "#/components/schemas/preference"
                }
              }
            }
          }
        ]
      },
      "baseContactRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseContact"
          },
          {
            "type": "object",
            "properties": {
              "consentRecords": {
                "$ref": "#/components/schemas/consentRecordsToBeInserted"
              }
            }
          }
        ]
      },
      "updateContactRequest": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "identifiers": {
                "allOf": [
                  {
                    "description": "Identifiers this contact can be referenced by"
                  },
                  {
                    "$ref": "#/components/schemas/identifiers"
                  }
                ]
              }
            }
          },
          {
            "$ref": "#/components/schemas/baseContactRequest"
          },
          {
            "$ref": "#/components/schemas/channelPropertiesWithResubscribe"
          }
        ]
      },
      "channelStatusUpdate": {
        "type": "string",
        "description": "The subscription status for the channel; if not specified it remains unaltered for existing contacts, and for new contacts this defaults to values defined in _Settings > Contacts > Mobile subscription_",
        "example": "subscribed",
        "enum": [
          "noSubscription",
          "subscribed",
          "unsubscribed",
          "suppressed"
        ]
      },
      "emailChannelStatus": {
        "type": "string",
        "description": "Current status of the email channel for the contact",
        "example": "subscribed",
        "enum": [
          "subscribed",
          "unsubscribed",
          "suppressed",
          "binned",
          "pendingOptIn",
          "softBounced",
          "hardBounced",
          "ispComplained",
          "mailBlocked",
          "directComplaint",
          "spamTrap",
          "blockedLocalPart",
          "sharedSuppression",
          "sharedDomainSuppression",
          "purchased",
          "knownComplainer",
          "knownLitigator",
          "domainSuppression",
          "noMXRecord"
        ]
      },
      "whatsAppChannelStatus": {
        "type": "string",
        "description": "The current status for the WhatsApp channel for this contact",
        "example": "subscribed",
        "enum": [
          "noSubscription",
          "subscribed",
          "unsubscribed",
          "suppressed",
          "binned"
        ]
      },
      "smsChannelStatus": {
        "type": "string",
        "description": "The current status for the SMS channel for this contact",
        "example": "subscribed",
        "enum": [
          "noSubscription",
          "subscribed",
          "unsubscribed",
          "suppressed",
          "binned",
          "bounced"
        ]
      },
      "channelProperties": {
        "type": "object",
        "properties": {
          "channelProperties": {
            "type": "object",
            "properties": {
              "email": {
                "type": "object",
                "properties": {
                  "emailType": {
                    "type": "string",
                    "description": "Format the contact receives emails in.<br>\n* **New contacts, or contacts that do not have an email channel yet:** If not specified, this is set to **html**.\n* **Contacts that already have an email channel:** If not specified, the existing value remains unaltered.<br>\n***Note:** When you import a collection of contacts and one or more contacts in the collection specify **emailType**, then the contacts in the same collection that do not specify it are set to **html**. To keep the existing value, specify **emailType** for each contact, or do not specify it for any contact in the collection.*",
                    "example": "html",
                    "enum": [
                      "plainText",
                      "html"
                    ]
                  },
                  "optInType": {
                    "type": "string",
                    "description": "Email opt-in type for the contact.<br>\n* **New contacts, or contacts that do not have an email channel yet:** If not specified, this is set to **unknown**.\n* **Contacts that already have an email channel:** If not specified, the existing value remains unaltered.<br>\n***Note:** If you set this to **verifiedDouble**, or the account setting *Enforce double opt-in for all signups, including bulk uploads* is on, the contact is sent an email to confirm their subscription. Until the contact confirms, the email channel status is **pendingOptIn** and **optInType** remains **unknown**.*",
                    "example": "double",
                    "enum": [
                      "unknown",
                      "single",
                      "double",
                      "verifiedDouble"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "description": "The subscription status for the email channel.<br>\n* **New contacts, or contacts that do not have an email channel yet:** If not specified, this is set to **subscribed**.\n* **Contacts that already have an email channel:** If not specified, the existing value remains unaltered.<br>\n***Note:** If you change the email address of an existing contact and the current email channel status is **subscribed**, **binned** or **deleted**, the status is set to **subscribed**. If the current status is **subscribed** and the account setting *Enforce double opt-in for all signups, including bulk uploads* is on, the status is set to **pendingOptIn** until the contact confirms.*",
                    "enum": [
                      "subscribed",
                      "unsubscribed",
                      "suppressed"
                    ]
                  },
                  "openTracking": {
                    "type": "string",
                    "description": "Specifies if you are allowed to track email opens for the contact.<br>\n* **New contacts, or contacts that do not have an email channel yet:** If not specified, this is set to **unknown** and no explicit opt-in or opt-out record is written.\n* **Contacts that already have an email channel:** If not specified, the existing value remains unaltered.",
                    "enum": [
                      "unknown",
                      "subscribed",
                      "unsubscribed"
                    ],
                    "default": "unknown"
                  }
                },
                "description": "The channel properties for email. All properties are optional. Specify only the properties you want to set. For contacts that already have an email channel, properties you do not specify remain unaltered."
              },
              "sms": {
                "type": "object",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/channelStatusUpdate"
                  }
                },
                "additionalProperties": false,
                "description": "The channel properties for SMS/MMS"
              },
              "whatsApp": {
                "type": "object",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/channelStatusUpdate"
                  }
                },
                "additionalProperties": false,
                "description": "The channel properties for WhatsApp"
              }
            },
            "additionalProperties": false,
            "description": "Properties associated with each channel for a contact. For example, message format or subscription status"
          }
        }
      },
      "channelPropertiesWithResubscribe": {
        "type": "object",
        "properties": {
          "channelProperties": {
            "type": "object",
            "properties": {
              "email": {
                "type": "object",
                "properties": {
                  "resubscribeOptions": {
                    "type": "object",
                    "properties": {
                      "resubscribeWithNoChallenge": {
                        "type": "boolean",
                        "description": "Set to **true** to resubscribe the contact without sending a resubscription confirmation email. If not specified, this is set to **false**, so the contact is sent a resubscription confirmation email.",
                        "default": false
                      },
                      "preferredLocale": {
                        "type": "string",
                        "description": "The language code for the language of the resubscription confirmation email. If not specified, the default locale of the account is used.<br><br>\n**Note:** Use the values exactly as listed. Some of them are not standard locale codes, for example **en-EN** for English and **se-SE** for Swedish.\n\n| Value | Language |\n|---|---|\n| `cs-CS` | Czech |\n| `da-DA` | Danish |\n| `de-DE` | German |\n| `el-EL` | Greek |\n| `en-EN` | English |\n| `es-ES` | Spanish (Spain) |\n| `es` | Spanish |\n| `fi-FI` | Finnish |\n| `fr-FR` | French |\n| `hu-HU` | Hungarian |\n| `it-IT` | Italian |\n| `nl-NL` | Dutch |\n| `nb-NO` | Norwegian Bokmål |\n| `pl-PL` | Polish |\n| `pt-PT` | Portuguese |\n| `ru-RU` | Russian |\n| `se-SE` | Swedish |\n| `sk-SK` | Slovak |\n| `tr-TR` | Turkish |\n| `zh-CN` | Chinese (Simplified) |",
                        "enum": [
                          "cs-CS",
                          "da-DA",
                          "de-DE",
                          "el-EL",
                          "en-EN",
                          "es-ES",
                          "es",
                          "fi-FI",
                          "fr-FR",
                          "hu-HU",
                          "it-IT",
                          "nl-NL",
                          "nb-NO",
                          "pl-PL",
                          "pt-PT",
                          "ru-RU",
                          "se-SE",
                          "sk-SK",
                          "tr-TR",
                          "zh-CN"
                        ]
                      },
                      "redirectUrlAfterChallenge": {
                        "type": "string",
                        "description": "The URL to send the contact to after they confirm their resubscription. If not specified, the standard default redirect page is used.",
                        "format": "uri",
                        "example": "https://somedomain.io/some/page"
                      }
                    },
                    "description": "Options for resubscribing the email channel of a contact. A resubscription is only triggered when you specify **resubscribeOptions**; if you do not specify it, no resubscription occurs."
                  }
                }
              }
            }
          }
        }
      },
      "errorResponse": {
        "required": [
          "description",
          "errorCode"
        ],
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "Unique error code"
          },
          "description": {
            "type": "string",
            "description": "Description of the issue"
          },
          "details": {
            "type": "array",
            "items": {
              "required": [
                "description",
                "item"
              ],
              "type": "object",
              "properties": {
                "item": {
                  "type": "string",
                  "description": "Item the error is associated with, for example, field name, unique identifier for an entity or item in batch"
                },
                "description": {
                  "type": "string",
                  "description": "Description of the error"
                }
              }
            }
          }
        }
      },
      "contactId": {
        "minimum": 0,
        "type": "integer",
        "description": "Immutable unique identifier for the contact",
        "example": 35212311
      },
      "identifiers": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Contact email address",
            "nullable": true,
            "example": "someone@emailsim.io"
          },
          "mobileNumber": {
            "type": "string",
            "description": "Contact phone number in [E.164 format](https://en.wikipedia.org/wiki/E.164)",
            "nullable": true,
            "example": "447123123123"
          }
        },
        "additionalProperties": {
          "type": "string",
          "description": "Any additional custom identifiers. Property names must match one of the custom identifiers that exists in the account.",
          "nullable": true
        },
        "description": "Identifiers this contact can be referenced by",
        "example": {
          "email": "someone@emailsim.io",
          "mobileNumber": "447123123123",
          "myCustomId": "MYID_12345"
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-ddg-notes": "This version corrects the schema and documentation for importing contacts and for email channel properties. The changes are additive; the API behaviour does not change.\n* **importContacts:** Added request examples for these use cases: update data fields and identifiers, unsubscribe from email, set email open tracking, add a consent record, and update data fields, identifiers and list membership.\n* **getContacts:** Added response examples: key details only, selected data fields with lists and preferences, a page with a next link, contacts modified since the last poll, and modified contacts in a list or a segment.\n* **importContact:** Added request examples for the same use cases, and an example to resubscribe a contact to email. Added request examples that create and then update a contact, with their 201 and 200 response examples. The description now states that a new contact needs **identifiers.email** or **identifiers.mobileNumber** in the request body, and a 400 example shows the error.\n* **deleteContacts:** Each item must now contain exactly one identifier. Items that use **email** or **mobileNumber** are now valid against the schema. Added a request example and corrected the 400 error example.\n* **getImportStatus:** Added response examples, including a contact that has only a custom identifier. **matchIdentifier** is no longer required in **failures**, because the API does not return it. Replaced the failures example.\n* **Contact responses:** The email, SMS and WhatsApp channel status values now match the values the API returns. A deleted channel is not included in **channelProperties**.\n* **getContact:** Added examples for each identifier type in the path, and response examples for a full contact and for a contact whose mobile number was deleted.\n* **replaceContact:** Added examples for each identifier type in the path, request examples to replace data and lists and to remove a mobile number, and a response example.\n* **deleteContact:** Added examples for each identifier type in the path, and a response example.\n* **getContact, replaceContact and deleteContact:** Corrected the 404 error examples to match the API.\n* **getDeleteStatus:** Added response examples. Corrected the 404 response, which described an import request in place of a delete job.\n* **createContact:** Added request examples: email address only, a full profile with channels, lists, preferences and consent, verified double opt-in, and mobile number only. Added a 201 response example. Corrected the 409 error example. The description now states that the request must contain **email** or **mobileNumber**, and a 400 example shows the error.\n* **importContacts:** The description now states that a new contact needs **email** or **mobileNumber** in its identifiers, and the failure the import reports if it does not.\n* **importContacts:** Contacts that match on **contactId** are now valid against the schema. The request uses the new **contactRequestIdentifiers** schema, where **contactId** is an integer.\n* **Email channel properties:** **emailType**, **optInType**, **status** and **openTracking** are no longer required. The descriptions now give the default for contacts that do not have an email channel yet, and the behaviour for contacts that already have one.\n* **Email channel properties:** **resubscribeOptions** can now be sent together with the other email channel properties.\n* **resubscribeWithNoChallenge:** The default is now **false**, which agrees with the API behaviour.\n* **Contact responses:** Email channel properties now pass validation. **emailType** and **optInType** values are now camelCase (for example **html** and **single**), which agrees with the API. **openTracking** is now included and is always returned. The request channel properties schema is no longer applied to responses, so all email and SMS statuses and the SMS **countryCode** are now valid.\n* **Contact responses:** Consent records and preferences now pass validation. Preferences require **publicName** and **privateName**, which the API returns, in place of the undefined **name** property.\n* **x-ddg-integration-token:** The header now uses **format: uuid** in place of a pattern that rejected every value. Send the token as a UUID without braces.\n* **Contact responses:** The **created**, **updated** and consent record **dateTimeCreated** descriptions now state the formats the API returns. The **preferences** and **consentRecords** arrays can now be empty or not included.\n* **Deleted contacts:** The descriptions now explain when **email** and **mobileNumber** have the value **deleted**.\n* **replaceContact:** The description now states that email channel properties you do not specify remain unaltered.",
  "x-samples-languages": [
    "curl",
    "csharp",
    "java",
    "javascript",
    "node",
    "python",
    "php",
    "ruby"
  ]
}
```

# Sibling pages

* [Get contacts based on your criteria](https://marketing.developer.dotdigital.com/reference/getcontacts-1.md)
* [Import contact collection](https://marketing.developer.dotdigital.com/reference/importcontacts-1.md)
* [Get the status of a contacts import request](https://marketing.developer.dotdigital.com/reference/getimportstatus.md)
* [Get a contact by an identifier](https://marketing.developer.dotdigital.com/reference/getcontact.md)
* [Get the status of a delete contacts job](https://marketing.developer.dotdigital.com/reference/getdeletestatus.md)
* [Delete multiple contacts](https://marketing.developer.dotdigital.com/reference/deletecontacts.md)
* [Create a contact](https://marketing.developer.dotdigital.com/reference/createcontact-1.md)
* [Replace a contact](https://marketing.developer.dotdigital.com/reference/replacecontact.md)
* [Deletes a contact using a specific identifier](https://marketing.developer.dotdigital.com/reference/deletecontact-1.md)