# Update a Contact

Updates a contact as specified by the contact ID.

Endpoint: PATCH /v1/projects/{project_id}/contacts/{contact_id}
Version: 1.0
Security: Basic, oAuth2

## Security:

  - `Basic` (unknown)
    http basic

  - `oAuth2` (unknown)
    oauth2

## Path parameters:

  - `project_id` (string, required)
    The unique ID of the project. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).

  - `contact_id` (string, required)
    The unique ID of the contact.

## Query parameters:

  - `update_mask` (array)
    The set of field mask paths.

## Request body:

  - `application/json` (unknown)
    The contact to be updated

## Request fields (application/json):

  - `channel_identities` (array)
    List of channel identities.

  - `channel_identities.app_id` (string)
    Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call.

  - `channel_identities.channel` (string, required)
    The identifier of the channel you want to include. Must be one of the enum values.
    Enum: "SMS", "RCS", "WHATSAPP", "MMS", "KAKAOTALK", "KAKAOTALKCHAT", "VIBERBM", "LINE", "INSTAGRAM", "MESSENGER", "WECHAT", "TELEGRAM", "APPLEBC"

  - `channel_identities.identity` (string, required)
    The channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.

  - `channel_priority` (array)
    List of channels defining the channel priority.

  - `display_name` (string)
    The display name. A default 'Unknown' will be assigned if left empty.

  - `email` (string)
    Email of the contact.

  - `external_id` (string)
    Contact identifier in an external system.

  - `id` (string)
    The ID of the contact.
    Example: {CONTACT_ID}

  - `language` (string)
    Enum: "AF", "SQ", "AR", "AZ", "BN", "BG", "CA", "ZH", "ZH_CN", "ZH_HK", "ZH_TW", "HR", "CS", "DA", "NL", "EN", "EN_GB", "EN_US", "ET", "FIL", "FI", "FR", "DE", "EL", "GU", "HA", "HE", "HI", "HU", "ID", "GA", "IT", "JA", "KN", "KK", "KO", "LO", "LV", "LT", "MK", "MS", "ML", "MR", "NB", "FA", "PL", "PT", "PT_BR", "PT_PT", "PA", "RO", "RU", "SR", "SK", "SL", "ES", "ES_AR", "ES_ES", "ES_MX", "SW", "SV", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZU"

  - `metadata` (string)
    Metadata associated with the contact. Up to 1024 characters long.

## Request examples:

  - `Update contact` (unknown)

## Response 200:

  - `200` (unknown)
    A successful response.

## Response 200 fields (application/json):

  - `channel_identities` (array)
    List of channel identities.

  - `channel_identities.app_id` (string)
    Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call.

  - `channel_identities.channel` (string, required)
    The identifier of the channel you want to include. Must be one of the enum values.
    Enum: "SMS", "RCS", "WHATSAPP", "MMS", "KAKAOTALK", "KAKAOTALKCHAT", "VIBERBM", "LINE", "INSTAGRAM", "MESSENGER", "WECHAT", "TELEGRAM", "APPLEBC"

  - `channel_identities.identity` (string, required)
    The channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.

  - `channel_priority` (array)
    List of channels defining the channel priority.

  - `display_name` (string)
    The display name. A default 'Unknown' will be assigned if left empty.

  - `email` (string)
    Email of the contact.

  - `external_id` (string)
    Contact identifier in an external system.

  - `id` (string)
    The ID of the contact.
    Example: {CONTACT_ID}

  - `language` (string)
    Enum: "AF", "SQ", "AR", "AZ", "BN", "BG", "CA", "ZH", "ZH_CN", "ZH_HK", "ZH_TW", "HR", "CS", "DA", "NL", "EN", "EN_GB", "EN_US", "ET", "FIL", "FI", "FR", "DE", "EL", "GU", "HA", "HE", "HI", "HU", "ID", "GA", "IT", "JA", "KN", "KK", "KO", "LO", "LV", "LT", "MK", "MS", "ML", "MR", "NB", "FA", "PL", "PT", "PT_BR", "PT_PT", "PA", "RO", "RU", "SR", "SK", "SL", "ES", "ES_AR", "ES_ES", "ES_MX", "SW", "SV", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZU"

  - `metadata` (string)
    Metadata associated with the contact. Up to 1024 characters long.

## Response 400:

  - `400` (unknown)
    Malformed request. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 400 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 401:

  - `401` (unknown)
    Incorrect credentials. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 403:

  - `403` (unknown)
    Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 403 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 500:

  - `500` (unknown)
    Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 500 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 501:

  - `501` (unknown)
    Something went wrong on our end, try again with exponential back-off. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 501 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 200 examples:

  - `Updated contact` (unknown)

