> ## Documentation Index
> Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Leave Type

> Updates a custom leave type. Only the name can be modified.



## OpenAPI

````yaml /api-reference/openapi.json put /company/leaves-types/{leaveTypeId}
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /company/leaves-types/{leaveTypeId}:
    put:
      tags:
        - User Leaves
      summary: Update Leave Type
      description: Updates a custom leave type. Only the name can be modified.
      parameters:
        - name: leaveTypeId
          in: path
          required: true
          schema:
            type: integer
          description: Leave type ID to update
          example: 111
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeaveTypeInput'
            example:
              name: Custom type - edited
      responses:
        '200':
          description: Leave type updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaveType'
              example:
                id: 111
                name: Custom type - edited
                type_code: CODE
                company_id: 1111
                created_at: '2024-12-10T17:57:12.000Z'
                updated_at: '2024-12-10T18:19:13.000Z'
                deleted_at: null
                icon_name: ICON
components:
  schemas:
    LeaveTypeInput:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the leave type
    LeaveType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type_code:
          type: string
        company_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        icon_name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````