Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

Body

application/json
property
string
required

Attribute name exactly as your SDK passes it (e.g. userId). The API can't rename it, and renaming it in the UI doesn't update SDK code or targeting conditions.

datatype
enum<string>
required

The attribute datatype

Available options:
boolean,
string,
number,
secureString,
enum,
string[],
number[],
secureString[]
description
string

Markdown. Put context here, not in the name.

archived
boolean

The attribute is archived

hashAttribute
boolean

Shall the attribute be hashed

enum
string

Comma-separated list of allowed values. Required for the 'enum' datatype. For array datatypes (string[], number[], secureString[]) it optionally restricts the list to these values. Ignored for all other datatypes.

format
enum<string>

The attribute's format

Available options:
,
version,
date,
isoCountryCode
projects
string[]

Project IDs that can use this. An empty list means all Projects. Projects control access and availability, so don't use them as labels.

tags
string[]

Tags for filtering and grouping. Use these instead of encoding groups in names.

customFields
object

Values for the organization's attribute custom fields, keyed by field id

Response

Resource created

attribute
object
required