---
title: "Create user attribute"
method: POST
path: "/v1/user-attributes"
tags: ["User attributes"]
---

# Create user attribute

`POST /v1/user-attributes`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/user-attributes`
- Auth: HTTP bearer

<Note>
  **Organization Admin** permissions are required to use this endpoint.
</Note>

Create a custom [user attribute](/administration/users/attributes) definition in your organization.

## Request body

- object
  - `default_value` union: 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.
    - string
    - number
    - union[]
      - union
        - string
        - number
  - `description` string: Human-readable description of the attribute and its purpose. An empty string is stored as null.
  - `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`.
  - `multiple_values` boolean: Whether the attribute accepts an array of values.
  - `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_`.
  - `type` 'String' | 'Number', required: Data type that determines valid values. `String` attributes accept text, `Number` attributes accept numeric values stored as strings for precision. Immutable after creation.

## Response `201`

User attribute definition created

- UserAttributeObject
  - `default_value` union: 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.
    - string
    - number
    - union[]
      - union
        - string
        - number
  - `description` string: Human-readable description of the attribute and its purpose. An empty string is stored as null.
  - `id` string: Unique identifier for custom attributes. Empty string for system-defined attributes.
  - `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`.
  - `multiple_values` boolean: Whether the attribute accepts an array of values.
  - `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_`.
  - `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.
  - `type` 'String' | 'Number': Data type that determines valid values. `String` attributes accept text, `Number` attributes accept numeric values stored as strings for precision. Immutable after creation.

## Other responses

- `400`: Bad Request. The body does not parse or fails schema validation. `detail` names the invalid field or carries the value validation message, for example: - `name: Required` - `name: Must start with a letter and contain only letters, numbers, and underscores` - `label: Required` - `type: Invalid option: expected one of "String"|"Number"`
- `401`: Authentication required
- `403`: Forbidden. Requires Manage User Attributes permissions.
- `405`: Method Not Allowed - Invalid HTTP method for this endpoint
- `409`: Conflict. A user attribute definition with this name or label already exists.
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500`: Internal Server Error

## Changes

- **2026-11-03** `43290040f88f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/user-attributes/post.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
