> ## 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.

# Create Leave Type

> Creates a new custom leave type for your company.



## OpenAPI

````yaml /api-reference/openapi.json post /company/leaves-types
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:
    post:
      tags:
        - User Leaves
      summary: Create Leave Type
      description: Creates a new custom leave type for your company.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeaveTypeInput'
            example:
              name: Custom leave type
      responses:
        '200':
          description: Leave type created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaveType'
              example:
                name: Custom leave type
                company_id: 111
                icon_name: ICON
                created_at: '2024-12-10 17:57:12'
                updated_at: '2024-12-10 17:57:12'
                id: 111
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

````