---
title: "Switch an attribute value for the current user"
method: PUT
path: "/v1/user-attribute-selections"
tags: ["User attributes"]
---

# Switch an attribute value for the current user

`PUT /v1/user-attribute-selections`

## Request

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

Switches a user attribute value for the calling user. The switch then drives dynamic shared extensions, access filters and connection environment routing exactly as an assigned value would.

To change what values a user can switch to, use the [Set switchable values](/api/user-attributes/set-switchable-values-for-a-user-or-group) endpoint instead.

## Request body

- object
  - `user_attribute_id` string, required: Unique identifier for custom attributes. Empty string for system-defined attributes.
  - `values` string[], required: Values this user or group can switch the attribute to, validated against the attribute type. Numbers are sent as strings to preserve precision beyond `2^53`. At most 300 values of up to 512 characters each.

## Response `200`

The caller's switchable attributes after the change

- UserAttributeSelectionsResponse
  - `records` object[], required: Attributes the calling user can switch. Empty when nothing is provisioned for them. An Organization Admin receives every attribute with `allow_any_value: true`.
    - `user_attribute_id` string, required: Unique identifier for custom attributes. Empty string for system-defined attributes.
    - `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_`.
    - `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, required: Whether the attribute accepts an array of values.
    - `allow_any_value` boolean, required: Whether the user or group can switch to a value that is not listed. When `true`, `selectable_values` are suggestions.
    - `selectable_values` string[], required: The provisioned values. When `allow_any_value` is `true`, up to 200 suggestions drawn from values assigned to users in the organization.
    - `selected_values` string[], required: The active switch, or `null` when the assigned value applies.

## Other responses

- `400`: Bad Request. Possible caues: - A value is not provisioned for the caller - More than one value was sent for a single-valued attribute - A value is not valid for the attribute's type or exceeds 512 characters under `allow_any_value` - No non-blank value was sent, or more than 300 values were sent
- `401`: Authentication required
- `404`: Not Found. The attribute is not switchable for the calling user because nothing is provisioned for them.
- `405`: Method Not Allowed - Invalid HTTP method for this endpoint
- `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-attribute-selections/put.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)
