--- title: "Externally Managed Custom Field" description: "How to create custom fields controlled by an external system and update their values via the platform API." --- Corridor provides the ability to: - Ability to be able to create fields which are "Controlled by External System" - Allow users to update these field programmatically. We support externally managed custom fields to be of the following types: - SHORT_TEXT - LONG_TEXT - SINGLE_SELECT - MULTI_SELECT - DATE_TIME - NUMBER ## Updating the values of externally managed custom field In order to update the custom field, the external app need to do a POST call with `objectFields` and `comment` as part of payload. The endpoint would look like below (assuming corridor-api is running on port 5000): `http://localhost:5000/api/v1/models//external/fields` ## Sample payload ```json { "objectFields": { "department": "tech", "tenure": 5, "expiry_date": "2010-11-12 00:00:00", "region": null, "model_tags": ["fraud", "uat"] }, "comment": "Automated update of custom-fields" } ``` :::note Giving null as value in the payload removes an assigned value for the custom-field ::: ### body `objectFields`: objectFields accepts a json where the key is the alias of the custom field and the value is the value that needs to be assigned to the custom field for the particular object. This is a mandatory field `comment`: comment to be shown in the change history for corresponding change. This is optional. ### headers `x-api-key`: The secret key has to be part of the API call for authentication `x-workspace-name`: Workspace name should be part of the headers, if multiple workspaces are present in the system. :::note If an external custom field is not provided in the payload the existing value of the custom field will be fetched from the DB and populated. :::