Skip to navigation

Update Leave Type

Renames an existing leave type. Shared rules: see Writing data.

  • Only the name can change; the category (leave_type) cannot. Past leave records keep working, they follow the type and not the name.
  • name is the current leave type name, matched exactly (see GET /leave/type). System leave types can’t be renamed.
  • new_name must be unique in the company, ignoring upper/lower case and outer spaces.
  • Repeating after success gives 400 “No leave type named …” for the old name.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Request

This endpoint expects an object.
namestringRequired
Current exact leave type name.
new_namestringRequired1-255 characters
New leave type name. Unique in the company, ignoring case and outer spaces.

Response

The leave type was renamed.
messagestringOptional
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error