# Update a time off request

Source: https://www.supervisible.com/developers/time-off/patch-time-off-id

PATCH /time-off/{request_id}



## PATCH /time-off/{request_id}

Update a time off request

Base URL: https://app.supervisible.com/api/v1

Required scope: write:time_off

## Operation contract

The definition below includes parameters, request bodies, response schemas, examples and authentication requirements.

```json
{
  "summary": "Update a time off request",
  "tags": [
    "time-off"
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-required-scope": "write:time_off",
  "parameters": [
    {
      "in": "path",
      "name": "request_id",
      "required": true,
      "description": "Time off request ID.",
      "schema": {
        "type": "string",
        "description": "UUID"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "startDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "endDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "availability": {
              "type": "integer",
              "minimum": 0,
              "maximum": 24
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 2000
                },
                {
                  "type": "null"
                }
              ]
            },
            "timeOffTypeId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "example": {
            "reason": "Vacation updated"
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "example": {
            "data": {
              "reason": "Vacation updated"
            }
          }
        }
      }
    },
    "400": {
      "description": "Invalid request"
    },
    "401": {
      "description": "Unauthorized"
    },
    "403": {
      "description": "Missing required scope or current member permission"
    },
    "404": {
      "description": "Not found"
    },
    "409": {
      "description": "Conflict; refresh current state and preview again"
    },
    "429": {
      "description": "Rate limited; honor Retry-After"
    }
  }
}
```

## Referenced definitions

```json
{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key"
      }
    }
  }
}
```

[Complete OpenAPI specification](https://www.supervisible.com/openapi/public-api-v1.json)
