---
title: "Mass Update"
method: POST
path: "/profiles/mass-update"
tags: ["Profiles"]
---

# Mass Update

`POST /profiles/mass-update`

Update one or multiple profile's data and track events

## Headers

- `X-Batch-Project` string, required

## Request body

- EditProfile[] — Edit multiple profiles at once. You can specify at most 10 000 operations or the API call will be rejected.
  - `identifiers` union, required — Specifies which profile to target. Exactly one of custom_id or installation must be provided.
    - CustomID
      - `custom_id` string, required — Custom user ID of the profile to perform the operation on.
    - Installation
      - `installation` ProfileInstallationIdentifier, required — Batch installation identifier.
        - `apikey` string, required — API key of the installation.
        - `installation_id` string, required — Installation identifier generated by the SDK.
  - `attributes` EditProfileAttributes — Attributes to write on the profile. Keys are the attributes names. You can set up to 50 attributes on a profile per operation: requests exceeding this limit will be ignored. Some keys are documented as they're reserved, but extra data is supported: See [the attributes documentation](https://doc.batch.com/developer/api/cep/profiles/update#the-attributes-object). This object cannot weigh more than 25kB or the entire Profile API request will be rejected.
    - `$email_address` string, nullable — Email address to write on the profile. Null to erase, omit to leave the email unmodified. Addresses must be valid, not longer than 256 characters.
    - `$email_marketing` 'subscribed' | 'unsubscribed', nullable — Set whether the profile should receive marketing emails or not. Set to null to reset, omit to leave unmodified.
    - `$phone_number` string, nullable — Phone number to write on the profile. Null to erase, omit to leave the phone number unmodified. The number must conform to the [E.164 international standard](https://en.wikipedia.org/wiki/E.164).
    - `$sms_marketing` 'subscribed' | 'unsubscribed', nullable — Set whether the profile should receive marketing SMS or not. Set to null to reset, omit to leave unmodified.
    - `$email_open_tracking_consent` 'granted' | 'denied', nullable — Set whether the profile has given consent to email open tracking. Set to null to reset, omit to leave unmodified.
    - `$timezone` string, nullable — Timezone to set on the profile. Set to null to erase, omit to leave unmodified. Value must be an IANA TZ Identifier. Example: `Europe/Paris`. You can find an non exhaustive list of available TZ identifiers [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
    - `$language` string, nullable — Custom language to set on the profile. Set to null to erase, omit to leave unmodified. Language codes must conform to a subset of BCP 47 language tags. See [our documentation](https://doc.batch.com/api/campaigns/advanced#language-and-country-codes) for a list of supported languages.
    - `$region` string, nullable — Custom country code to set on the profile. Set to null to erase, omit to leave unmodified. Country codes must conform to the ISO 3166-1 alpha-2 standard. See [our documentation](https://doc.batch.com/api/campaigns/advanced#language-and-country-codes) for a list of supported languages.
    - `$topic_preferences` union — Subscription topics associated with the profile. Set to an array of strings to replace all topics, `null` to erase all topics, or use `$add`/`$remove` for partial updates. Each topic must be lowercase and match the pattern `[a-z0-9_-]`, with a maximum length of 300 characters. A maximum of 25 topics can be sent per request. A profile can have at most 1500 topics.
      - string[] — Replace all topics with this list.
      - object — Partial update — add or remove topics without replacing the full list.
        - `$add` string[] — Topics to add to the profile. Elements already present will be moved to the end.
        - `$remove` string[] — Topics to remove from the profile.
  - `events` TrackProfileEvent[] — Events to track on the profile. This array cannot weigh more than 150kB or have more than 15 elements and individual events cannot weigh more than 25kB. If one of these limits are exceeded, the complete Profile API call will be rejected.
    - `name` string, required — Event name. Cannot be empty, must not be longer than 30 chars and not contain any special character ([a-z0-9_]).
    - `time` string — UTC date in a RFC 3339 format. The time date and time an event occurred. You can track events that happened in the last 24 hours, and no events in the future. If this parameter is not included in your request, Batch will use the time the event arrives at the server.
    - `attributes` TrackEventAttributes — Event attributes. Keys are the attribute names. Some keys are documented as they're reserved, but extra data is supported. See [the event attributes documentation](https://doc.batch.com/developer/api/cep/profiles/update#the-events-object) for more info.
      - `$label` string — Event label. Must be a string, will automatically be bridged as label for application event compatiblity.
      - `$tags` string[] — Event tags. Must be an array of string, will automatically be bridged as tags for application event compatiblity. Tags must not be longer than 64 characters.

## Response `202`

Request accepted, will be processed asynchronously

- SuccessResponse — Success response. The API call was entirely valid and will be processed as requested.
  - `code` 'SUCCESS' | 'SUCCESS_WITH_PARTIAL_ERRORS', required — Success status code
  - `errors` PartialSuccessResponseErrors[] — Array of errors that occurred while validating the request. Only present if code is `SUCCESS_WITH_PARTIAL_ERRORS`.
    - `category` 'attribute' | 'event' | 'event_name' | 'event_attribute' | 'identifier' | 'attribute_limit', required — What part of the operation the error applies to. For example, `attribute` means that the error came from one of the profile attributes. Depending on the error category, other keys might be available to help you pinpoint where the error occurred.
    - `bulk_index` number, required — Index of what bulk operation (requests' top level array) the error occurred in.
    - `reason` string, required — Human readable reason explaining what caused the error.
    - `attribute` string — Only applicable when `category` is `attribute`, `attribute_limit` or `event_attribute`. Name of the profile attribute that caused the error.
    - `event_index` number — Only applicable when `category` is `event`, `event_name` or `event_attribute`. Index of the event that caused the error.

## Other responses

- `400` — The request is malformed
- `401` — The Rest API Key is not valid for this project
- `429` — Too Many Requests
- `500` — Unexpected error
- `503` — Batch's services are under maintenance. Please try again later

---

[API](https://skmtc.net/batch/apis/batch-rest-api.md) · [All operations](https://skmtc.net/batch/apis/batch-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/batch/batch-rest-api/revisions/ec696334ff35/schema)
