Skip to main content
POST
Create user attribute

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Body

application/json
label
string
required

Display name shown in the Omni UI. Unique among the custom attributes in the organization, and may match the label of a system attribute.

Must not start with Omni and must not be one of the reserved connection labels: Host, Password, Database, Port, Schema, Connection Name.

Minimum string length: 1
Example:

"Region"

name
string
required

Reference name used in model SQL and in embed SSO URL parameters. Unique within the organization. Must start with a letter, contain only letters, numbers and underscores, and must not start with omni_.

Minimum string length: 1
Example:

"region"

type
enum<string>
required

Data type that determines valid values. String attributes accept text, Number attributes accept numeric values stored as strings for precision. Immutable after creation.

Available options:
String,
Number
Example:

"String"

default_value

Default value applied when no user-specific value is set. A single value when multiple_values is false, an array when it is true.

Strings are trimmed. Number attributes accept numbers or numeric strings and store them as strings. Numbers are converted to strings on receipt; send anything beyond the JSON safe integer range (2^53 - 1) as a string or it loses precision before Omni sees it. Null or a string that trims to empty means no default.

An empty array clears the default of a multi-valued attribute and is rejected for a single-valued attribute. A list member that trims to empty is rejected.

Example:

"us-east"

description
string | null

Human-readable description of the attribute and its purpose. An empty string is stored as null.

Example:

"User region for row-level security filtering"

multiple_values
boolean
default:false

Whether the attribute accepts an array of values.

Example:

false

Response

User attribute definition created

default_value

Default value applied when no user-specific value is set. A single value when multiple_values is false, an array when it is true.

Strings are trimmed. Number attributes accept numbers or numeric strings and store them as strings. Numbers are converted to strings on receipt; send anything beyond the JSON safe integer range (2^53 - 1) as a string or it loses precision before Omni sees it. Null or a string that trims to empty means no default.

An empty array clears the default of a multi-valued attribute and is rejected for a single-valued attribute. A list member that trims to empty is rejected.

Example:

"us-east"

description
string | null

Human-readable description of the attribute and its purpose. An empty string is stored as null.

Example:

"User region for row-level security filtering"

id
string

Unique identifier for custom attributes. Empty string for system-defined attributes.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

label
string

Display name shown in the Omni UI. Unique among the custom attributes in the organization, and may match the label of a system attribute.

Must not start with Omni and must not be one of the reserved connection labels: Host, Password, Database, Port, Schema, Connection Name.

Minimum string length: 1
Example:

"Region"

multiple_values
boolean
default:false

Whether the attribute accepts an array of values.

Example:

false

name
string

Reference name used in model SQL and in embed SSO URL parameters. Unique within the organization. Must start with a letter, contain only letters, numbers and underscores, and must not start with omni_.

Minimum string length: 1
Example:

"region"

system
boolean

System-defined attributes (e.g. omni_user_id, omni_user_email) are built-in and read-only. Custom attributes have a false value.

Example:

false

type
enum<string>

Data type that determines valid values. String attributes accept text, Number attributes accept numeric values stored as strings for precision. Immutable after creation.

Available options:
String,
Number
Example:

"String"