Create a subscriber attribute
pushengage_create_attributeCreate a custom subscriber attribute to capture extra data, such as plan type or signup source, then use it to build audience segments.
Instructions
Creates a new subscriber attribute on the current site. Required: name (human-readable label, e.g. "Customer Plan") and key (machine identifier, e.g. "plan"). The key must start with a letter and contain only letters, numbers, hyphens, and underscores. The created key becomes a usable value for audience-group rules with field="attributes" (the rule's key property). PushEngage caps each site at 50 attributes; the API returns 422 if the limit is exceeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The machine identifier used in the JavaScript SDK and in audience-group rules. Must start with a letter and only contain letters, numbers, hyphens, and underscores. Max 64 chars. e.g. "plan", "signup_source", "lifetime-value". This is the same key you pass as `key` on an audience-group rule with field="attributes". | |
| name | Yes | Human-readable attribute name shown in the dashboard. 1–128 chars. e.g. "Customer Plan", "Sign-up Source". | |
| site_id | No | Override the currently selected site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| key | No | ||
| name | No | ||
| status | No | ||
| view_url | No | ||
| use_with_audience_group_rule | No |