---
updatedAt: 2026-04-27T23:21:35.000Z
agentTools:
  projectIndex: https://developer.runn.io/llms.txt
---

# Create a leave time off


#### Create or Update

This endpoint may return an existing time off if the new time off is a subset of an existing one.

#### Automatic Merging

If one or more existing time offs overlap with the specified start/end date, they will be automatically merged.

#### Partial Time Offs

If the `minutesPerDay` field is provided, automatic merging will only occur if any overlapping time off has the same `minutesPerDay` value. If the `minutesPerDay` value differs, the request will fail.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Runn API",
    "version": "1.0.0",
    "description": "<p>See <a target=\"_blank\" href=\"https://help.runn.io/en/articles/8579592-api-v1-beta\" title=\"Runn API full documentation\">the full documentation and guide</a> to using the Runn API.</p><p>The domain for your API endpoint can be found in <strong>Accounts > Settings > API</strong> in your Runn application</p>"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "BadRequest": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "Bad Request"
            ]
          },
          "message": {
            "type": "string"
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          }
        },
        "required": [
          "error",
          "message",
          "statusCode"
        ]
      },
      "NotFound": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "Not Found"
            ]
          },
          "message": {
            "type": "string"
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          }
        },
        "required": [
          "error",
          "message",
          "statusCode"
        ]
      },
      "TimeOffLeaveInput": {
        "type": "object",
        "properties": {
          "personId": {
            "description": "The unique identifier for the person.",
            "type": "integer"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "The start date of the time-off. Format: YYYY-MM-DD"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "The end date of the time-off. Format: YYYY-MM-DD"
          },
          "note": {
            "description": "A note or comment related to the time-off, if any.",
            "type": "string"
          },
          "minutesPerDay": {
            "description": "The minutes per day taken as time off. Omit this property if time-off is for full day(s) as per person's contract.",
            "minimum": 15,
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "personId",
          "startDate",
          "endDate"
        ]
      },
      "TimeOff": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The unique identifier for the assignment.",
            "type": "integer"
          },
          "personId": {
            "description": "The identifier referencing the person associated with the time-off.",
            "type": "integer"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "The start date of the time-off. Format: YYYY-MM-DD"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "The end date of the time-off. Format: YYYY-MM-DD"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the object was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the object was last updated."
          },
          "minutesPerDay": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "personId",
          "startDate",
          "endDate",
          "note",
          "createdAt",
          "updatedAt",
          "minutesPerDay"
        ]
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              401
            ]
          }
        },
        "required": [
          "error",
          "message",
          "statusCode"
        ]
      }
    }
  },
  "paths": {
    "/time-offs/leave/": {
      "post": {
        "operationId": "createLeave",
        "summary": "Create a leave time off",
        "description": "\n#### Create or Update\n\nThis endpoint may return an existing time off if the new time off is a subset of an existing one.\n\n#### Automatic Merging\n\nIf one or more existing time offs overlap with the specified start/end date, they will be automatically merged.\n\n#### Partial Time Offs\n\nIf the `minutesPerDay` field is provided, automatic merging will only occur if any overlapping time off has the same `minutesPerDay` value. If the `minutesPerDay` value differs, the request will fail.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeOffLeaveInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "default": "1.0.0",
              "enum": [
                "1.0.0"
              ]
            },
            "in": "header",
            "name": "accept-version",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOff"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.runn.io",
      "description": "EU Server"
    },
    {
      "url": "https://api.us.runn.io",
      "description": "US Server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  }
}
```