# Describe an attribute key

Source: https://kirora.io/docs/api/reference/describeAttribute

`PUT /v1/attributes/{key}`

Requires an API key with the `attributes:write` scope. [About keys and scopes](https://kirora.io/docs/api/reference/authentication)

Works with integration, agent and partner keys.

Safe to retry: a repeat sets the same values again. [About idempotency](https://kirora.io/docs/api/reference/idempotency)

Sets what an attribute key means, in the workspace's words, or removes it with `null`. A key no contact carries yet may be described too; it shows in the key list once contacts carry it. An agent key may describe keys: nothing is sent or changed on a contact.

## Path parameters

- `key` (string, required, pattern `^[\p{L}\p{N}\p{M}_.-]{1,64}$`) — The attribute key, as `listAttributes` returns it, URL-encoded (a key in any language is percent-encoded as UTF-8). Matched in Unicode NFC, as keys are stored, so a composed and a decomposed "é" are the same key.

## Header parameters

- `Kirora-Workspace` (string, optional, pattern `^[A-Za-z0-9._:-]{1,128}$`) — Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

## Request body

- `description` (string | null, required, 1–255 characters) — What the key means, at most 255 characters: shown in the Data index's attribute list, and read by Kiro. `null` removes it.

## Returns

Returns `200 OK` with an `AttributeDescription` in `data`. It can also return `409 Conflict`, `413 Payload Too Large` or `415 Unsupported Media Type`; see the statuses below. Otherwise returns an error; [Errors](https://kirora.io/docs/api/reference/errors) lists every code and which to retry.

- `key` (string, required)
- `description` (string | null, required)

Statuses:

- `200 OK`: The key's description.
- `409 Conflict`: The request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.
- `413 Payload Too Large`: The body is larger than this operation accepts (`PAYLOAD_TOO_LARGE`).
- `415 Unsupported Media Type`: The body is not JSON, or not the upload the operation takes (`UNSUPPORTED_MEDIA_TYPE`).

## Example: Say what an attribute key means

```bash
curl -X PUT https://api.kirora.io/v1/attributes/plan \
  -H "Authorization: Bearer $KIRORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "The billing plan the contact pays for."
  }'
```

Response `200`:

```json
{
  "data": {
    "key": "plan",
    "description": "The billing plan the contact pays for."
  }
}
```
