# Create a tag assignment for an entity

Launch stage: GA

`POST /api/2.0/entity-tag-assignments`

Create a tag assignment

API scopes: tags

## Request body

- `entity_type` (string, required, Immutable)
  The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
  Example: `dashboards`
- `entity_id` (string, required, Immutable)
  The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
  Example: `2807324866692453`
- `tag_key` (string, required, Immutable)
  The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
  Example: `sensitivity_level`
  Constraints: `[ 1 .. 256 ] characters`
- `tag_value` (string, optional)
  The value of the tag
  Example: `high`
  Constraints: `<= 1000 characters`

## Returns

Returns the TagAssignment object.

## Request

```json
{
  "entity_id": "2807324866692453",
  "entity_type": "dashboards",
  "tag_key": "sensitivity_level",
  "tag_value": "high"
}
```

## Response

```json
{
  "entity_id": "2807324866692453",
  "entity_type": "dashboards",
  "tag_key": "sensitivity_level",
  "tag_value": "high"
}
```

