---
title: "Adds a new item to the registry or updates the existing item."
method: PUT
path: "/items/{itemname}"
tags: ["items"]
---

# Adds a new item to the registry or updates the existing item.

`PUT /items/{itemname}`

## Path parameters

- `itemname` string, required

## Headers

- `Accept-Language` string

## Request body

- GroupItemDTO
  - `type` string
  - `name` string
  - `label` string
  - `category` string
  - `tags` string[]
  - `groupNames` string[]
  - `groupType` string
  - `function` GroupFunctionDTO
    - `name` string
    - `params` string[]

## Response `200`

OK

## Other responses

- `201` — Item created.
- `400` — Payload invalid.
- `404` — Item not found or name in path invalid.
- `405` — Item not editable.

---

[API](https://skmtc.net/openhab/apis/openhab-rest-api.md) · [All operations](https://skmtc.net/openhab/apis/openhab-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openhab/openhab-rest-api/versions/0f2ce17cab3e/schema)
