---
title: "Update attributes in bulk"
method: PATCH
path: "/attributes/{companyId}"
tags: ["Attributes"]
---

# Update attributes in bulk

`PATCH /attributes/{companyId}`

Updates several attributes in a single call, following the same rules as the single attribute update endpoint. Entries whose `customId` does not match any attribute are silently skipped — the call still returns `200` for the whole batch.

## Path parameters

- `companyId` string, required

## Request body

- BulkPatchAttributesRequestSchema
  - `data` AuxBulkPatchAttributesRequestSchema[], required — Attributes to update, identified by `customId`.
    - `name` string, nullable — Display name of the attribute.
    - `active` boolean — Whether the attribute is active. Omit to leave the current value unchanged.
    - `values` AttributesRequestValuesSchema[], nullable — Full list of values the attribute should have after this update. Sending `values` **replaces** the current list: any previously stored value whose `customId` is not included here is removed. Omit `values` entirely to leave the current values untouched. An attribute holds at most 5000 values; if the combined total would exceed the limit, the excess new values are silently discarded and existing ones already in the list are kept.
      - `customId` string, required — Your own unique ID for the value, unique within the attribute.
      - `name` string, required — Display name of the value.
      - `parentCustomId` string, nullable — Custom ID of the value of the parent attribute (see the attribute's `parentCustomId`) that this value is nested under. Ignored if the attribute has no `parentCustomId` or no value with this `customId` exists yet on the parent attribute.
    - `parentCustomId` string, nullable — Custom ID of the parent attribute, to nest this attribute under another one (e.g. a "City" attribute nested under "Country"). Must reference an existing attribute.
    - `customId` string, required — Custom ID of the attribute to update.

## Response `200`

Successful Response

- BulkUpsertAttributesResponseSchema
  - `data` UpsertAttributesResponseSchema[], required — Result of the bulk operation, one entry per attribute.
    - `id` string, required — Embat resource ID
    - `customId` string, required — Client-provided custom ID

## Other responses

- `401` — Unauthorized. The bearer token is missing, invalid or expired.
- `404` — Company not found, or a `parentCustomId` does not match an existing attribute.
- `422` — Validation Error
- `500` — Unexpected error. Contact support if it persists.

---

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