v1

latestOpenAPI 3.1.02026-07-2419603.1 MB
Data Activation

Create custom attribute bulk

Creates multiple new custom attributes. Requires manage permission.

post/api/cdp/settings/v1/app/{app_id}/attribute/bulk

Path parameters

app_idstring uuid required

ID of the app.

Example:3929d56c-cd62-4001-a4fc-013f5f954691

Request body

namestring required

Name of the attribute.

event_data_keystring 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.

Example request

[
  {
    "name": "Age of the user",
    "data_type": "string",
    "aggregation": "first"
  }
]

Response

Created

column_idstring 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_keystring required

Key of the imported data value or name of Tracker event dimension to populate attribute.

immutableboolean 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_accessibleboolean 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.

Example response

[
  {
    "column_id": "custom_attribute_3",
    "data_type": "string",
    "aggregation": "first",
    "event_data_key": "user_age",
    "column_meta": {
      "column_name": "User's Age",
      "column_type": "number",
      "column_category": [
        "Custom attribute"
      ],
      "value_selectors": [
        "first"
      ],
      "extractions": [
        "first"
      ],
      "scope": "profile"
    }
  }
]