---
title: "Create custom attribute bulk"
method: POST
path: "/api/cdp/settings/v1/app/{app_id}/attribute/bulk"
tags: ["Data Activation"]
---

# Create custom attribute bulk

`POST /api/cdp/settings/v1/app/{app_id}/attribute/bulk`

Creates multiple new custom attributes. Requires manage permission.

## Path parameters

- `app_id` string, uuid, required — ID of the app.

## Request body

- object[]
  - `name` string, required — Name of the attribute.
  - `event_data_key` string, required — Determines from which key in an event the attribute will be populated. The value can be either: * known analytics event data key (e.g. `analytics.source_medium`) * custom event data key (`^[a-z0-9_]{1,255}$`, e.g. `user_score`) - can be used to update attributes via API If an attribute with the given `event_data_key` already exists, its type must match; otherwise, an appropriate error will be returned.
  - `data_type` 'number' | 'bool' | 'ip' | 'datetime' | 'string', required — Type of the data.
  - `aggregation` 'first' | 'last' | 'first_last' | 'list' | 'list_unique' | 'min' | 'max' | 'sum', required — Aggregation type for attribute values.

## Response `201`

Created

- object[]
  - `column_id` string, required — Unique ID of column.
  - `data_type` 'number' | 'bool' | 'ip' | 'datetime' | 'string', required — Type of the data.
  - `aggregation` 'first' | 'last' | 'first_last' | 'list' | 'list_unique' | 'min' | 'max' | 'sum', required — Aggregation type for attribute values.
  - `event_data_key` string, required — Key of the imported data value or name of Tracker event dimension to populate attribute.
  - `immutable` boolean, required — A flag indicating whether the attribute is immutable. If `immutable` is set to `true`, the attribute is considered read-only and cannot be modified. If set to `false`, the attribute can be modified.
  - `publicly_accessible` boolean, required — A flag indicating whether the attribute is accessible via the public API. If `publicly_accessible` is set to `true`, the attribute can be retrieved through the public profile attributes endpoint without authentication. If set to `false`, the attribute is only available through authenticated endpoints.
  - `column_meta` object, required — Column metadata (readonly).
    - `column_name` string — Name of the column.
    - `column_type` 'number' | 'string' | 'ipv4' | 'ipv6' | 'bool' | 'int' | 'uuid' | 'hex' | 'datetime' — Type of the column.
    - `column_unit` 'currency' | 'url' | 'days' | 'pixels' | 'none' | 'millisecond' | '' — Unit of the column.
    - `column_category` string[] — Categories of the column.
    - `analytics_column_id` string — Name of the column in Analytics module. Used to calculate audience count.
    - `analytics_transformation_id` 'sum' — Transformation name used in Analytics module to calculate audience count. Currently one option available.
    - `value_selectors` string[] — List of value selectors possible for given column.
    - `extractions` string[] — List of extractions possible for given column.
    - `aggregation` 'first' | 'last' | 'first_last' | 'list' | 'list_unique' | 'min' | 'max' | 'sum' — Aggregation for attribute values.
    - `scope` 'event' | 'profile' — Defines the scope of dimension.

## Other responses

- `400` — Bad request response (e.g. missing GET parameter, parameter value out of bounds)
- `401` — Access token is missing or invalid
- `402` — Data Activation module is disabled
- `404` — Resource not found (bad ID or resource deleted)
- `422` — Data in body does not meet requirements (e.g. missing field)
- `500` — Internal application error response (some service encountered unexpected error)

---

[API](https://skmtc.dev/piwik/apis/web-api.md) · [All operations](https://skmtc.dev/piwik/apis/web-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/piwik/web-api/revisions/f63416a36168/schema)
