# Update Contact

Updates specified contact-field values without changing subscription or channel state. Accepts displayed or ISO 8601 dates and times. An empty value clears a field.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "integer",
      "description": "Numeric contact ID returned by search-contacts",
      "minimum": 1
    },
    "fields": {
      "type": "array",
      "description": "Contact field updates; fieldId must be a global field key or an account-owned numeric custom-field ID, a date, time or datetime value takes the form get-contact answers with, and referenceId defaults to 0",
      "items": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 15
          },
          "value": {
            "type": "string",
            "maxLength": 65535
          },
          "referenceId": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          }
        },
        "required": [
          "fieldId",
          "value"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 50
    },
    "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",
    "fields"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "updatedFieldIds",
    "contact"
  ],
  "properties": {
    "updatedFieldIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "contact": {
      "type": "object",
      "required": [
        "accountId",
        "contactId",
        "email",
        "subscriptionStatus",
        "referenceId",
        "fields",
        "manualTagIds",
        "editUrl"
      ],
      "properties": {
        "accountId": {
          "type": "integer"
        },
        "contactId": {
          "type": "integer"
        },
        "email": {
          "type": "string"
        },
        "subscriptionStatus": {
          "type": "string"
        },
        "referenceId": {
          "type": "integer"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "fieldId",
              "value",
              "type",
              "referenceId"
            ],
            "properties": {
              "fieldId": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "referenceId": {
                "type": "integer"
              }
            }
          }
        },
        "manualTagIds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "editUrl": {
          "type": "string"
        }
      }
    }
  }
}
```

