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

# Create a user attribute

`POST /v2/user-attributes`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/user-attributes`
- Auth: HTTP bearer

Create a new user attribute. An optional description and default value can be provided.

## Request body

- object
  - `name` string, required: Name of the user attribute.
  - `description` string: Description of the user attribute.
  - `defaultValue` V2UserAttributesPostRequestBodyContentApplicationJsonSchemaDefaultValue: Default value of the user attribute.
    - `type` 'string', required: Type of user attribute.
    - `val` string, required: Value of the user attribute.

## Response `200`

The response body.

- UserAttributesCreateUserAttributeResponse200
  - `userAttributeId` string, required: Unique identifier of the user attribute.
  - `name` string, required: Name of the user attribute.
  - `createdBy` string, required: The identifier of the user who created this object.
  - `updatedBy` string, required: The identifier of the user or process that last updated this object.
  - `createdAt` string, date-time, required: When the object was created.
  - `updatedAt` string, date-time, required: When the object was last updated.
  - `description` string, nullable: Description of the user attribute.
  - `defaultValue` V2UserAttributesPostResponsesContentApplicationJsonSchemaDefaultValue: Default value of the user attribute.
    - `type` 'string', required: Type of user attribute.
    - `val` string, required: Value of the user attribute.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
