---
title: "Update Contacts"
method: POST
path: "/contact/update"
tags: ["Contacts"]
---

# Update Contacts

`POST /contact/update`

The Update Contact (Async) API lets you update existing contacts asynchronously. It supports updating attributes and modifying contact subscription preferences.

## Headers

- `api-key` string, required
- `Content-Type` string, required

## Request body

- object
  - `data` object, required — Defines the primary payload for the update operation. It includes the contact_type and a list of contacts to be updated. Each contact must contain at least one valid identifier and can include updated attributes, subscription preferences, and audience mapping details.
    - `contact_type` 'identified' | 'anonymous', required — Type of contact to be updated. Allowed values are `identified` and `anonymous`.
    - `contacts` object[], required — An array of contacts to update. Each object corresponds to one contact. Any details passed will update the existing contact.
      - `identity` string — - **Required** when `contact_type = "identified"` (identity serves as the primary key and can be `email`, `mobile`, or a custom parameter). - **Not required** when `contact_type = "anonymous"`. **Validation:** Identity must match the format of the selected primary key: #### If identity = email - **Minimum length:** 1 character - **Maximum length:** 255 characters - **Pattern:** `^([a-z0-9_Xx])([a-z0-9+-Xx]+)(.[a-z0-9+-Xx]+)@([a-z0-9-]+.)+[a-z]{2,25}$` #### If identity = mobile - **Minimum length:** 7 characters - **Maximum length:** 15 characters - **Pattern:** `^[0-9]{7,15}$`
      - `contact_id` integer — Numeric identifier for the contact. Can be provided for both identified and anonymous contacts. Takes highest priority for identification when present.
      - `guid` string — Globally unique identifier of the contact. Used primarily for anonymous contact types. At least one identifier (`contact_id`, `guid`, `email`, or `mobile`) must be provided for anonymous contacts.
      - `attributes` object — Define the key-value pairs of contact attributes to be updated. The keys represent attribute names (system-defined or custom), and the values represent the updated data for those attributes.
      - `email` string — - Required when `contact_type = "identified"` and primary key is `email`. - Optional when `contact_type = "identified"` and primary key is `mobile` or custom parameter. - Not applicable when `contact_type = "anonymous"` and primary key is `email`. - Required when `contact_type = "anonymous"` and primary key is `mobile` or custom parameter.
      - `mobile` string — - Required when `contact_type = "identified"` and primary key is `mobile`. - Optional when `contact_type = "identified"` and primary key is `email` or custom parameter. - Required when `contact_type = "anonymous"` and primary key is `email` or custom parameter. - Not applicable when `contact_type = "anonymous"` and primary key is `mobile`.
      - `sms_subscription` boolean — SMS subscription status of the contact. - `true` → whitelisted (can receive SMS) - `false` → blacklisted (will not receive SMS)
      - `email_subscription` boolean — Email subscription status of the contact. - `true` → whitelisted (can receive email) - `false` → blacklisted (will not receive email)
      - `sms_subscription_reason` string, nullable — Reason for SMS subscription status change. - **Required when** `sms_subscription = false` (contact is blacklisted) - **Optional when** `sms_subscription = true` (contact is whitelisted)
      - `email_subscription_reason` string, nullable — Reason for email subscription status change. - **Required when** `email_subscription = false` (contact is blacklisted) - **Optional when** `email_subscription = true` (contact is whitelisted)
      - `audience_details` object[] — Used to assign audience groups to a specific contact. Each contact can have its own audience mapping.
        - `audience_id` integer[] — Unique numeric identifiers for audiences. Required when `audience_name` is not provided. If both `audience_id` and `audience_name` are provided, only `audience_id` is used. - **Minimum value:** 1 - **Maximum value:** 2,147,483,647
        - `audience_name` string[] — Names of audiences. Required when `audience_id` is not provided. If both are provided, only `audience_id` is used. - **Minimum length:** 1 - **Maximum length:** 255 - **Pattern:** `^[a-zA-Z0-9 _&-]+$`
        - `audience_type` 'list' | 'ccg', required — Type of audience. Allowed values: `list`, `ccg`. - For `contact_type = "anonymous"`, only `list` is allowed.
      - `subscription_details` object[] — Subscription preferences for different communication channels. Each entry represents the subscription status for a specific channel (e.g., `rcs`, `whatsapp`).
        - `subscription_channel` 'rcs' | 'whatsapp', required — Communication channel for which the subscription status applies.
        - `subscription` boolean, required — Whether the user is allowed to receive messages on the specified channel. - `true` → whitelisted (can receive messages) - `false` → blacklisted (will not receive messages)
        - `subscription_reason` string — Reason for subscription status change. - **Required when** `subscription = false` (user is blacklisted) - **Optional when** `subscription = true` (user is whitelisted)

## Response `200`

Success Response: The request was successfully submitted and will be processed asynchronously.

- object
  - `request_id` string, required — Unique identifier for the submitted request.
  - `code` integer, required — HTTP status code of the API response.
  - `status` 'success' | 'failed', required — Status of the API request.
  - `message` string — Human-readable response message.

## Other responses

- `400` — Validation Failure: The request contains invalid data — such as missing required fields, incorrect attribute names, or conflicting audience identifiers.
- `401` — Unauthorized Access: The API key is missing, invalid, or not authorized.
- `500` — Internal Server Error: An unexpected error occurred while processing the request.

---

[API](https://skmtc.net/netcorecloud/apis/contacts-api.md) · [All operations](https://skmtc.net/netcorecloud/apis/contacts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netcorecloud/contacts-api/versions/2878cfd0ee01/schema)
