---
title: "Attach / Update an Attribute"
method: PUT
path: "/v1/attributes"
tags: ["Attributes"]
---

# Attach / Update an Attribute

`PUT /v1/attributes`

## Request

- Base URL: `` (relative, and it does not resolve against the document’s source URL)
- URL: `/v1/attributes`
- Auth: one of:
  - API key in header `sessionKey`
  - API key in header `clientCode`
  - API key in header `jwt`
- TypeScript: <https://skmtc.dev/erply/apis/crm-api/docs/v1/attributes/put.ts> (a function with typed inputs; its response is checked against the schema)

To Create an attribute you must leave the id field empty. To Update you must specify the ID field. RecordID refers to the object that the attribute will be attached to.
Supported entities: 'customer', 'customer group', 'address'.
Name cannot have spaces and is limited to 50 characters. One database record must not have multiple attributes with the same name.
3 `types` are available - int, double, text. Based on the type the `value` should be number of text.

## Request body

- CustomersApiInternalModelsAttributeRequest
  - `entity` string: Entity name of the record
  - `id` integer: ID of the attribute
  - `name` string: name of the attribute
  - `record_id` integer: ID of the record
  - `type` string: 3 types are available - int, double, text
  - `value` unknown

## Response `201`

Created

- ResponsesResponse
  - `id` integer

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/erply/apis/crm-api.md) - [All operations](https://skmtc.dev/erply/apis/crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/erply/apis/crm-api/revisions/36dd4cc370b2?raw)
