v1

latestOpenAPI 3.0.12026-08-041753011.2 MB
Custom fields

Create custom fields on a workspace

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

Path parameters

workspaceIdstring required

Represents workspace identifier across the system.

Example:64a687e29ae1f428e7ebe303

Represents workspace identifier across the system.

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