---
title: "Create User Attribute"
method: POST
path: "/v2/schema/{proj_id}/{env_id}/users/attributes"
tags: ["User Attributes"]
---

# Create User Attribute

`POST /v2/schema/{proj_id}/{env_id}/users/attributes`

Creates a new attribute for the User resource.

## Path parameters

- `proj_id` string, required — Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
- `env_id` string, required — Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

## Query parameters

- `resource_id` string

## Request body

- ResourceAttributeCreate
  - `key` string, required — A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute.
  - `type` 'bool' | 'number' | 'string' | 'time' | 'array' | 'json' | 'object' | 'object_array', required — supported attribute primitives
  - `description` string — An optional longer description of what this attribute respresents in your system

## Response `200`

Successful Response

- ResourceAttributeRead
  - `type` 'bool' | 'number' | 'string' | 'time' | 'array' | 'json' | 'object' | 'object_array', required — supported attribute primitives
  - `description` string — An optional longer description of what this attribute respresents in your system
  - `key` string, required — A URL-friendly name of the attribute (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the attribute.
  - `id` string, uuid, required — Unique id of the attribute
  - `resource_id` string, uuid, required — Unique id of the resource that the attribute belongs to.
  - `resource_key` string, required — A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.
  - `organization_id` string, uuid, required — Unique id of the organization that the attribute belongs to.
  - `project_id` string, uuid, required — Unique id of the project that the attribute belongs to.
  - `environment_id` string, uuid, required — Unique id of the environment that the attribute belongs to.
  - `created_at` string, date-time, required — Date and time when the attribute was created (ISO_8601 format).
  - `updated_at` string, date-time, required — Date and time when the attribute was last updated/modified (ISO_8601 format).
  - `built_in` boolean, required — Whether the attribute is built-in, and managed by the Permit system.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/permit/apis/permit-io-api.md) · [All operations](https://skmtc.dev/permit/apis/permit-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/permit/permit-io-api/revisions/0235743bf8a2/schema)
