# Update Contact Email Address

Replaces one email address of a contact while keeping its subscription status; no confirmation email is sent; the old address is gone, the change is recorded in the contact history and the mobile number stays. Without currentEmail the primary address is replaced; a contact merged from duplicates can have more, and the answer lists all of them. May start automations and counts toward the daily import limit. Refuses unsubscribed addresses, a currentEmail the contact does not have, addresses already used, invalid or blacklisted, accounts without the feature and calls once the daily import limit is reached.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "integer",
      "description": "Numeric contact ID returned by search-contacts",
      "minimum": 1
    },
    "email": {
      "type": "string",
      "description": "The new email address",
      "minLength": 3,
      "maxLength": 254
    },
    "currentEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "The contact's address to replace; omit for its primary address",
      "default": null,
      "minLength": 3,
      "maxLength": 254
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "contactId",
    "email"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "contactId",
    "previousEmail",
    "email",
    "changed",
    "subscriptionStatus",
    "emailAddresses",
    "historyUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "contactId": {
      "type": "integer"
    },
    "previousEmail": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "changed": {
      "type": "boolean"
    },
    "subscriptionStatus": {
      "type": "string",
      "enum": [
        "pending",
        "optin",
        "subscribed",
        "unsubscribed"
      ]
    },
    "emailAddresses": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "historyUrl": {
      "type": "string"
    }
  }
}
```

