> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# create_user_attribute

> Create one user attribute — a column on your company's people. The attribute is opened empty on every existing user, so creating it touches the whole user table.

Create one user attribute — a column on your company's people.

The schema of what the company records about a person (Segment, Hiring
date…), which is what scopes filter on and what a report breaks down by. The
attribute is company-wide: it is not scoped to a sandbox, and it shows up in
[`list_user_attributes`](/mcp_documentation/tools/list_user_attributes) last
in the display order.

**This writes to every existing user.** The attribute is opened on each one
of them at creation — empty, except a `bool`, which starts at false for
everyone — and an `amount` attribute also records the company currency there.
So creating an attribute touches the whole user table, not just the
definition. Load the values by Excel import from the Qobra web app, which is
also where a default value is set.

Creating the *people* is not done here: they come in by Excel import from the
Qobra web app, which is also where an attribute synced from an HRIS or a CRM
is set up.

Available only where the Qobra write tools beta is enabled. Every write is
recorded in the audit trail as the `Qobra MCP` agent.

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="name" type="string" required>
    Display name of the attribute, as people will read it in Qobra —
    'Segment', 'Hiring date', 'Region'.
  </ParamField>

  <ParamField body="key" type="string" required>
    The attribute's stable key: the identifier the public API and an Excel
    import address it by, distinct from the display name. Lowercase and
    underscore-separated, and unique across the company's attributes
    ('Hiring date' gives 'hiring\_date'). The public API already serves every
    user an `id`, `email`, `status`, `name`, `role`, `currency` and
    `calculation_currency`, so those seven are taken.
  </ParamField>

  <ParamField body="attribute_type" type="string" required>
    What the attribute holds. `amount` is monetary and `percentage` a ratio,
    where 0.15 reads as 15%; `float` is a plain number, for a count or a
    quantity. `user` holds a Qobra user, matched on their email when people
    are imported. `picklist` is one choice out of a fixed list and
    `multipicklist` several — both need `options`. One of: `float`,
    `amount`, `percentage`, `string`, `picklist`, `multipicklist`, `bool`,
    `date`, `user`.
  </ParamField>

  <ParamField body="options" type="string[]">
    The labels people choose from, for a picklist or a multipicklist
    attribute — required there, and refused on every other type. These
    exact labels are what a user's value is matched on when people are
    imported.
  </ParamField>

  <ParamField body="exported" type="boolean">
    Include this attribute in the company's user exports. Off by default, as
    it is in Qobra.
  </ParamField>

  <ParamField body="unique" type="boolean">
    Refuse two users the same value — for an employee number or a payroll
    id, not for a segment everyone shares. Applies to a `string` or a
    `float` attribute only.
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="attribute" type="object">
    The attribute as it now exists — the same row list\_user\_attributes
    returns, so the id can be reused straight away.

    <Expandable title="object properties">
      <ResponseField name="id" type="string" />

      <ResponseField name="name" type="string" />

      <ResponseField name="description" type="string">
        What the company says this attribute means, in their own words. Null
        when they wrote none.
      </ResponseField>

      <ResponseField name="type" type="string">
        One of: `float`, `amount`, `percentage`, `string`, `picklist`,
        `multipicklist`, `bool`, `date`, `user`.
      </ResponseField>

      <ResponseField name="options" type="string[]">
        Selectable option labels for a picklist or multipicklist attribute;
        null for every other type.
      </ResponseField>

      <ResponseField name="readonly" type="boolean">
        True when the value cannot be edited in Qobra — it is owned by the
        source system that syncs it.
      </ResponseField>

      <ResponseField name="integration" type="object">
        The company connection this attribute is synced from; null for a
        just-created attribute maintained in Qobra itself.

        <Expandable title="object properties">
          <ResponseField name="id" type="string" />

          <ResponseField name="name" type="string" />
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>
