Custom fields

Update custom field on workspace

Changed on
put/v1/workspaces/{workspaceId}/custom-fields/{customFieldId}

Request

  • Base URL: https://api.clockify.me/api
  • URL: https://api.clockify.me/api/v1/workspaces/{workspaceId}/custom-fields/{customFieldId}
  • Auth: one of:
    • API key in header x-api-key
    • API key in header x-addon-token

Path parameters

workspaceIdstring required

Represents a workspace identifier across the system.

Example:64a687e29ae1f428e7ebe303
customFieldIdstring required

Represents a custom field identifier across the system.

Example:26a687e29ae1f428e7ebe101

Request body

allowedValuesstring[]

Represents a list of custom field's allowed values. If field type is not DROPDOWN_SINGLE or DROPDOWN_MULTIPLE, the values provided will be ignored by the server.

descriptionstring

Represents a custom field description.<br/>If this field is not included in the payload,it will automatically be set to null

namestring required

Represents a custom field name.

onlyAdminCanEditboolean

Flag to set whether custom field is modifiable only by admin users.

placeholderstring

Represents a custom field placeholder value.<br/>If this field is not included in the payload,it will automatically be set to null.

requiredboolean

Flag to set whether custom field is mandatory or not.

status'INACTIVE' | 'VISIBLE' | 'INVISIBLE'

Represents a custom field status.<br/>If this field is not included in the payload,it will automatically be set to default INACTIVE.

type'TXT' | 'NUMBER' | 'DROPDOWN_SINGLE' | 'DROPDOWN_MULTIPLE' | 'CHECKBOX' | 'LINK'

Represents a custom field type. This field is now deprecated and it's value will be ignored by the server. It will be removed entirely in a future release. Please stop including it in your payloads. To change a custom field type, please create a new object with the desired type instead.

workspaceDefaultValueobject

Represents a custom field's default value in the workspace.<li>if type = NUMBER, then value must be a number</li><li>if type = DROPDOWN_MULTIPLE, value must be a list</li><li>if type = CHECKBOX, value must be true/false</li><li>otherwise any string</li>

Example request

{
  "allowedValues": [
    "New York",
    "London",
    "Manila",
    "Sydney",
    "Belgrade"
  ],
  "description": "This field contains a location.",
  "name": "location",
  "placeholder": "This is a sample placeholder.",
  "status": "VISIBLE",
  "type": "DROPDOWN_MULTIPLE"
}

Response

OK

allowedValuesstring[]

Represents a list of custom field's allowed values.

descriptionstring

Represents custom field description.

entityTypestring

Represents custom field entity type

idstring

Represents custom field identifier across the system.

namestring

Represents custom field name.

onlyAdminCanEditboolean

Flag to set whether custom field is modifiable only by admin users.

placeholderstring

Represents custom field placeholder value.

requiredboolean

Flag to set whether custom field is mandatory or not.

statusstring

Represents custom field status

typestring

Represents custom field type.

workspaceDefaultValueobject

Represents a custom field's default value in the workspace.

workspaceIdstring

Represents workspace identifier across the system.

Example response

{
  "allowedValues": [
    "New York",
    "London",
    "Manila",
    "Sydney",
    "Belgrade"
  ],
  "description": "This field contains a location.",
  "entityType": "USER",
  "id": "44a687e29ae1f428e7ebe305",
  "name": "location",
  "placeholder": "Location",
  "projectDefaultValues": [
    {
      "projectId": "5b641568b07987035750505e",
      "status": "VISIBLE"
    }
  ],
  "status": "VISIBLE",
  "type": "DROPDOWN_MULTIPLE",
  "workspaceId": "64a687e29ae1f428e7ebe303"
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      the request property default value was added

    • info

      added the new CHECKBOX enum value to the request property

    • info

      added the new DROPDOWN_MULTIPLE enum value to the request property

    • info

      added the new DROPDOWN_SINGLE enum value to the request property

    • info

      added the new LINK enum value to the request property

    • info

      added the new NUMBER enum value to the request property

    • info

      added the new TXT enum value to the request property

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status

    • info

      the response's property default value was added for the status