---
title: "Update contact"
method: PUT
path: "/api/v1/contact/{id}"
tags: ["Contacts"]
---

# Update contact

`PUT /api/v1/contact/{id}`

The method is used to update the contact's data, except for the contact ID field.<br>In case of updating a deleted contact, this contact is restored.

## Path parameters

- `id` integer, required

## Request body

- ContactUpdate
  - `firstName` string — Contact's first name
  - `lastName` string — Contact's last name
  - `channels` Channel[] — You can add maximum two channels of the same type. It is necessary to specify at least one channel.
    - `type` 'email' | 'sms' | 'viber' | 'mobilepush' | 'webpush' | 'appinbox' | 'widget' | 'inapp, telegrambot' — Channel type
    - `value` string — Email address, phone number or push token
    - `device` Device — The data about the contact's device. Used together with the &quot;mobilepush&quot; channel type.
      - `appId` string — Application ID
      - `deviceModel` string — Device model
      - `os` string — Device OS
      - `locale` string — Locale (en_UK, ru_UA, ua_UA).
      - `clientVersion` 'native' | 'esputnik-1' — SDK version
      - `appVersion` string — Mobile app version
      - `active` boolean — Token activity flag
    - `webPushSubscription` WebPushSubscription — The data about the web push subscription. Used together with the &quot;webpush&quot; channel type.
      - `appId` integer
      - `userAgent` string
      - `userAgentVersion` string
      - `userAgentLanguage` string
      - `os` string
      - `ip` string
      - `subscriptionPage` string
      - `swActiveVersion` string
    - `appUuid` string — App UUID for telegram bot channel
  - `address` Address — Contact's full address. <a href="https://docs.esputnik.com/docs/contact-fields#address">Read more...</a>
    - `region` string — Region
    - `town` string — City
    - `address` string — Address
    - `postcode` string — Postal/ZIP code
    - `countryCode` string, nullable — Country code (ISO-3166-1 alpha-2, UK and ZZ allowed). Case-insensitive. Stored as UPPERCASE. Invalid → null.
  - `fields` ContactField[] — Values of the additional fields of a contact.
    - `id` integer — Additional field ID.<br/>You can get the value using the <i>/v1/addressbooks GET</i> method.
    - `value` string — The value of an additional field.
  - `addressBookId` integer — Catalog ID.<br/> You can get the value using the <i>/v1/addressbooks GET</i> method.<br/> Optional parameter.
  - `id` integer — Contact ID
  - `contactKey` string
  - `externalCustomerId` string
  - `languageCode` string — Language code. Optional parameter.
  - `timeZone` string — Time zone. Optional parameter. See <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>TZ database name</a>
  - `marketId` string — Market ID. Optional parameter. Up to 64 characters. Allowed: [a–zA-Z0–9-_]

## Response `200`

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `405` — Method not allowed
- `409` — Conflict:<br><ul><li>Repeated request within 1 minute.</li></ul>
- `415` — Unsupported media type
- `429` — Too many requests:<br><ul><li>More than 200 requests per 1 second.</li></ul>

---

[API](https://skmtc.net/esputnik/apis/esputnik-com.md) · [All operations](https://skmtc.net/esputnik/apis/esputnik-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esputnik/esputnik-com/versions/1c4afd7ba72a/schema)
