---
title: "Set a user attribute for tenants"
method: POST
path: "/v2/user-attributes/{userAttributeId}/tenants"
tags: ["User attributes"]
---

# Set a user attribute for tenants

`POST /v2/user-attributes/{userAttributeId}/tenants`

## Request

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

Assign and set the value of a specific user attribute for one or more tenants.

  ### Usage notes
  - Retrieve the **userAttributeId** by calling the [/v2/user-attributes](https://help.sigmacomputing.com/reference/list-user-attributes) endpoint.
  - Specify one or more tenant by tenantOrganizationId. Retrieve the **tenantOrganizationId** by calling the [/v2/tenants](https://help.sigmacomputing.com/reference/list-tenants) endpoint and using the `tenantOrganizationId` included in the response.

## Path parameters

- `userAttributeId` string, required

## Request body

- object
  - `assignments` V2UserAttributesUserAttributeIdTenantsPostRequestBodyContentApplicationJsonSchemaAssignmentsItems[], required
    - `tenantOrganizationId` string, required: Unique identifier of the tenant.
    - `value` V2UserAttributesUserAttributeIdTenantsPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsValue, required: The 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.

- UserAttributesSetUserAttributeForTenantsResponse200

---

[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)
