---
title: "Create or update a single custom attribute"
method: PUT
path: "/v1/objects/{object-id}/custom-attributes/{name}"
tags: ["Objects"]
---

# Create or update a single custom attribute

`PUT /v1/objects/{object-id}/custom-attributes/{name}`

Upsert a single custom attribute identified by name. The name is taken from the
URL path (URL-encoded). It must be 1-127 characters, must not contain a slash or
any control character; spaces, dots, dashes, colons and unicode are allowed.

## Path parameters

- `object-id` integer, required
- `name` string, required

## Request body

- object
  - `value` string, nullable — Attribute value. Null or absent is treated as an empty string.
  - `inheritable` boolean — Whether the attribute is inherited by child objects. Defaults to false.

## Response `200`

Attribute created or updated.

- object
  - `name` string
  - `value` string
  - `inheritable` boolean

## Other responses

- `400` — Invalid attribute name or request body.
- `401` — Unauthorized
- `403` — User does not have modify access to the object
- `404` — Object with given ID does not exist

---

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