# Create attrribute

Warning

Deprecated endpoint. This endpoint will be removed in the future. Please, stop using this one and use update {specific model} instead.

You can create custom attributes for any model. Possible attribute types: boolean, fixed, string, date, datetime, integer, float to json.

POST /attributes/

Attributes Type Required Description
content_type string yes The type of content you want create attribute for. Possible content types are: clientuser, company, deal, product, ticket.
name string yes A name of an attribute you want to create. Has to be at least 1 character, and cannot be longer than 32 characters.
value_type string yes A one of various types described in the "API Miescellaneous" section.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
    curl -X POST -H "Authorization: Token <your_64_char_api_key>" -H "Content-Type: application/json" -d '{
      "value_type": "boolean",
      "name": "My Attribute",
      "content_type": "clientuser"
    }' "https://<your_app_subdomain>.user.com/api/public/attributes/"

# Response

{
  "content_type": "user",
  "name_std": "my_attribute",
  "value_type": "boolean",
  "id": 2511,
  "name": "My Attribute"
}