Skip to content

Create a custom field (same request body as API v2).

Request

Security
bearerAuth and apiKeyAuth
Bodyapplication/jsonrequired
idstring
fieldNamestring

Unique Field name for the field

labelstring

English label for the field

descriptionstring

Description for the field

assetTypesArray of strings
typestringrequired

Data Type of field

valuesArray of objects(KeyLabelPair)

Custom field options for a picklist or multi picklist field

valuesOptionsArray of objects(CustomFieldOption)

Custom field options for a picklist or multi picklist field with language translation support

categorystring

Category for the field

enabledboolean

Enabled flag for the field

visibilityobject(Visibility)

Visibility on the custom field

permissionsArray of objects(Permission)

Permissions on the custom field

optionTypestring

Option Type for the custom field

optionKeystring

Option Key for the custom field

createdTimeinteger, (int64)

Created time of the custom field

modifiedTimeinteger, (int64)

Modified time of the custom field

customFieldControllerByIdobject

Custom field controller config

langVsTranslatedFieldValuesobject

Translated fields

curl -i -X POST \
  https://api3.sprinklr.com/prod/api/v3/customField \
  -H 'Authorization: Bearer <YOUR_Token_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Key: YOUR_API_KEY_HERE' \
  -d '{
    "id": "string",
    "fieldName": "string",
    "label": "string",
    "description": "string",
    "assetTypes": [
      "string"
    ],
    "type": "string",
    "values": [
      {
        "key": "string",
        "label": "string"
      }
    ],
    "valuesOptions": [
      {
        "label": "string",
        "value": "string",
        "langVsTranslatedFieldValues": {
          "property1": {
            "property1": "string",
            "property2": "string"
          },
          "property2": {
            "property1": "string",
            "property2": "string"
          }
        }
      }
    ],
    "category": "string",
    "enabled": true,
    "visibility": {
      "globallyVisible": true,
      "visibilityConfig": [
        {
          "type": "string",
          "ids": [
            "string"
          ]
        }
      ]
    },
    "permissions": [
      {
        "spaceType": "string",
        "spaceId": "string",
        "permissionConfigs": [
          {
            "type": "string",
            "ids": [
              "string"
            ],
            "permissions": [
              "string"
            ]
          }
        ]
      }
    ],
    "optionType": "string",
    "optionKey": "string",
    "createdTime": 0,
    "modifiedTime": 0,
    "customFieldControllerById": {
      "property1": {
        "enableReverseMapping": true,
        "controllingValues": [
          "string"
        ],
        "controllingFieldConfig": {
          "property1": [
            "string"
          ],
          "property2": [
            "string"
          ]
        }
      },
      "property2": {
        "enableReverseMapping": true,
        "controllingValues": [
          "string"
        ],
        "controllingFieldConfig": {
          "property1": [
            "string"
          ],
          "property2": [
            "string"
          ]
        }
      }
    },
    "langVsTranslatedFieldValues": {
      "property1": {
        "property1": "string",
        "property2": "string"
      },
      "property2": {
        "property1": "string",
        "property2": "string"
      }
    }
  }'

Responses

Success

Bodyapplication/json
idstring
fieldNamestring

Unique Field name for the field

labelstring

English label for the field

descriptionstring

Description for the field

assetTypesArray of strings
typestringrequired

Data Type of field

valuesArray of objects(KeyLabelPair)

Custom field options for a picklist or multi picklist field

valuesOptionsArray of objects(CustomFieldOption)

Custom field options for a picklist or multi picklist field with language translation support

categorystring

Category for the field

enabledboolean

Enabled flag for the field

visibilityobject(Visibility)

Visibility on the custom field

permissionsArray of objects(Permission)

Permissions on the custom field

optionTypestring

Option Type for the custom field

optionKeystring

Option Key for the custom field

createdTimeinteger, (int64)

Created time of the custom field

modifiedTimeinteger, (int64)

Modified time of the custom field

customFieldControllerByIdobject

Custom field controller config

langVsTranslatedFieldValuesobject

Translated fields

Response
{ "id": "string", "fieldName": "string", "label": "string", "description": "string", "assetTypes": [ "string" ], "type": "string", "values": [ { … } ], "valuesOptions": [ { … } ], "category": "string", "enabled": true, "visibility": { "globallyVisible": true, "visibilityConfig": [ … ] }, "permissions": [ { … } ], "optionType": "string", "optionKey": "string", "createdTime": 0, "modifiedTime": 0, "customFieldControllerById": { "property1": { … }, "property2": { … } }, "langVsTranslatedFieldValues": { "property1": { … }, "property2": { … } } }