Skip to main content
Rename a user attribute, change its key, options, default or export flag, and return it as it now stands. Pass at least one argument; an omitted one is left as it is. Sending the values the attribute already has changes nothing, so the same call can be sent twice. options is the attribute’s whole list, not an addition to it: read the attribute’s current options with list_user_attributes first. An option left out is removed and its value cleared from every user who held it, as when an option is removed in the Qobra web app. An option cannot be renamed: a new label is a new option, and the users holding the old one lose that value. Removing the option the default names also clears the default. A new key changes how Qobra’s public API names the attribute. The scopes and statements reading the attribute follow a rename. An attribute’s type, description and uniqueness cannot be changed after it is created. To change a user’s value, use update_user_attribute_values. The call is refused when:
  • key, options or default is passed for an attribute synced from an integration, which takes them from the source.
  • default is passed for a unique attribute: everyone created afterwards would start with the same value.
  • options is passed for an attribute that is not a picklist or a multipicklist.
  • the new key is already carried by another attribute, is one of the keys the public API serves every user under, or normalizes to nothing.
  • default does not match the attribute’s type or is not one of its options, or is an empty string on a bool attribute, whose default is always true or false.
Requires write permission on company settings > user attributes. Every write is recorded in the audit trail as the Qobra MCP agent.
Example arguments

Parameters

Body

string
required
Id from list_user_attributes or create_user_attribute. Never a name or a key.
string
New display name.
string
New key, in the format and with the reserved words of create_user_attribute’s key.
string[]
For a picklist or multipicklist, the complete list of labels: one already offered is kept, a new one is added, one left out is removed and cleared from every user holding it.
any
The value users created from now on start with, typed as the attribute: text, number, true/false, ISO date, one label (picklist), a list of labels (multipicklist); none for a user attribute. Existing users keep their values. Pass an empty string to clear it, except on a bool, whose default is always true or false.
boolean
Whether it is a column of the statement exports (the users export always carries every attribute).

Response

Body

object
The attribute as it now stands, its active options included — the same row list_user_attributes returns.