# Add Custom Field This api can be used to add a new custom field to the system with the provided attributes ## Endpoints **POST** `/dcapi/customColumn/addCustomColumn` ## Request URL https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/customColumn/addCustomColumn ## Scope `DesktopCentralCloud.CustomField.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (`string`, Mandatory): `application/addCustomColumnStatus.v1+json` - **Content-Type** (`string`, Mandatory): `application/customColumnDetails.v1+json` ### Request Body `application/json` - JSON Object - **tableName** (`string`, Mandatory): The table name can be any of the names provided in the list below: 1. `ManagedComputerCustomFields` - if customfield created in computer view 2. `InvSWCustomFields` - if customfield created in software view. - **columnName** (`string`, Mandatory): Name of the custom field to be created - **dataType** (`string`, Mandatory): The data type of a custom field can be one of the following: 1. `CHAR` 2. `INTEGER` 3. `BOOLEAN` 4. `FILE` A custom data type can also be specified as the field’s data type, which can be created using the API. [/dcapi/customColumn/customDataType](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-field-create-custom-data-type.html) - **size** (`string`, Mandatory): maximum character allowed for custom field value - **defaultValue** (`string`, Optional): Value to be used if none is provided - **description** (`string`, Mandatory): metadata for the field - **isPII** (`boolean`, Mandatory): Indicates whether the field contains sensitive/PII data (true/false) ## Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/customColumn/addCustomColumn \ --header 'Accept: application/addCustomColumnStatus.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/customColumnDetails.v1+json' \ --data '{"size":50,"dataType":"CHAR","description":"Custom Column to Store Sample data","isPII":true,"tableName":"MspCustomerCustomFields","columnName":"OS Type"}' ``` ## Sample Request Body ```json { "size": 50, "defaultValue": "Mac", "dataType": "CHAR", "description": "Custom Column to Store Sample data", "isPII": true, "tableName": "MspCustomerCustomFields", "columnName": "OS Type" } ``` ## Response Parameters ### HTTP Code 200 Response Body - `application/json` - JSON Object - **status** (`string`): Indicates the result of the operation - **message** (`string`): Confirmation message of the operation performed ## Possible Response Codes - **200** (`HTTP code`) ## Sample Response: HTTP 200 ```json { "message": "Field OS Type has been added successfully", "status": "SUCCESS" } ``` ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.