Custom fields

Create custom fields on a workspace

Changed on
post/v1/workspaces/{workspaceId}/custom-fields

Request

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

Path parameters

workspaceIdstring required

Represents workspace identifier across the system.

Example:64a687e29ae1f428e7ebe303

Request body

allowedValuesstring[]

Represents a list of custom field's allowed values.

descriptionstring

Represents custom field description.

entityType'TIMEENTRY' | 'USER'

Represents custom field entity type

namestring required

Represents custom field name.

onlyAdminCanEditboolean

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

placeholderstring

Represents custom field placeholder value.

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

Represents custom field status

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

Represents custom field type.

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.",
  "entityType": "TIMEENTRY",
  "name": "location",
  "placeholder": "Location",
  "status": "VISIBLE",
  "type": "DROPDOWN_MULTIPLE"
}

Response

Created

Changes

    • 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

      the request property default value was added

    • 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