Create new Attribute

POST/attributes

Create new Attribute.

Privileges:

  • bp-settings-custom-fields.manage

Audit event:

  • biz.core.v2.attribute.add

Validation errors:

  • BIZ_CORE:ATTRIBUTE_CODE_NAME_REQUIRED - Code name of the Attribute must be provided.
  • BIZ_CORE:ATTRIBUTE_CODE_NAME_NOT_VALID - Code name of the Attribute can only contain alphanumeric characters.
  • BIZ_CORE:ATTRIBUTE_CODE_NAME_OUT_OF_LIMIT - Code name of the Attribute cannot be longer than 30 characters.
  • BIZ_CORE:ATTRIBUTE_NAME_REQUIRED - Name of the Attribute must be provided.
  • BIZ_CORE:ATTRIBUTE_NAME_OUT_OF_LIMIT - Name of the Attribute cannot be longer than 50 characters.
  • BIZ_CORE:ATTRIBUTE_NAME_RESERVED - Name of the Attribute is reserved.
  • BIZ_CORE:ATTRIBUTE_NAME_NOT_UNIQUE - Name of the Attribute must be unique.
  • BIZ_CORE:ATTRIBUTE_TYPE_NOT_SUPPORTED - Attribute type of the Attribute is not supported.
  • BIZ_CORE:ATTRIBUTE_TYPE_NOT_ACTIVE - Attribute type of the Attribute is not active.
  • BIZ_CORE:ATTRIBUTE_CODE_NAME_NOT_UNIQUE - Code name of the Attribute must be unique.
Base URL
https://api-cpaas.sms.es/biz-core/v2
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Body

application/json
attributeTypeIdintegerrequired
codeNamestringrequired
max length: 30
namestringrequired
max length: 50

Request example

cURL · cURL
curl -L -X POST "https://api-cpaas.sms.es/biz-core/v2/attributes" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>" \
  --data-raw '{
  "attributeTypeId": 0,
  "codeName": "string",
  "name": "string"
}'

Responses

Attribute created successfully

application/json
attributeKindstring
Possible values: predefined, registered
attributeSectionsobject[]
Show child attributes
attributeIdinteger
attributeSectionTagsobject[]
Show child attributes
attributeIdinteger
attributeTagCategoryIdinteger
attributeTagCodeNamestring
attributeTagNamestring
attributeTagRowTypestring
attributeTagStatusstring
attributeTagStatusDtstring
insertTsstring (date-time)
sectionIdinteger
tagIdinteger
attributeStatusstring
Possible values: active, inactive, deleted
dbCodeNamestring
sectionCodeNamestring
sectionIdinteger
sectionNamestring
sectionStatusstring
Possible values: active, inactive, deleted
statusstring
Possible values: active, inactive, deleted
statusDtstring (date-time)
attributeTypeCodeNamestring
attributeTypeIdinteger
attributeTypeNamestring
canBeDeletedboolean
canCodeNameChangeboolean
codeNamestring
idinteger
namestring
statusstring
Possible values: active, inactive, deleted, misc
statusDtstring (date-time)
Example response
{
  "attributeKind": "predefined",
  "attributeSections": [
    {
      "attributeId": 0,
      "attributeSectionTags": [
        {
          "attributeId": 0,
          "attributeTagCategoryId": 0,
          "attributeTagCodeName": "string",
          "attributeTagName": "string",
          "attributeTagRowType": "string",
          "attributeTagStatus": "string",
          "attributeTagStatusDt": "string",
          "insertTs": "2026-01-01T12:00:00Z",
          "sectionId": 0,
          "tagId": 0
        }
      ],
      "attributeStatus": "active",
      "dbCodeName": "string",
      "sectionCodeName": "string",
      "sectionId": 0,
      "sectionName": "string",
      "sectionStatus": "active",
      "status": "active",
      "statusDt": "2026-01-01T12:00:00Z"
    }
  ],
  "attributeTypeCodeName": "string",
  "attributeTypeId": 0,
  "attributeTypeName": "string",
  "canBeDeleted": true,
  "canCodeNameChange": true,
  "codeName": "string",
  "id": 0,
  "name": "string",
  "status": "active",
  "statusDt": "2026-01-01T12:00:00Z"
}