---
title: "Add Department"
method: POST
path: "/api/departments/add"
tags: ["Departments"]
---

# Add Department

`POST /api/departments/add`

## Request

- Base URL: `https://app.timetastic.co.uk` (the document declares no server; this is the origin it was published from)
- URL: `https://app.timetastic.co.uk/api/departments/add`
- Auth: none declared

Adds a new department using the settings provided in the model.
            
A rejection returns an `ErrorStatus` and an `ErrorMessage`. `NotPermitted` means the `managerId` is not a
user in your organisation, or has no email address. `InvalidValue` and `Failed` mean the department itself
was rejected — check `ErrorMessage`.
            
Model validation fails before any of that, and returns a different 400 body: an object keyed by
field name, each holding an array of messages. Check for `ErrorStatus` to tell the two apart.

## Request body

- TimetasticWebViewModelsSettingsDepartmentSetting
  - `name` string, required: The Department name
  - `managerId` integer, required: The userId of the Manager for this department
  - `maxOff` integer: The maximum absent setting for this department

## Response `200`

The department was created. Returns its ID.

- TimetasticWebApiResourceModelsDepartmentResponse: Represents the API response containing the identifier of a created department.
  - `id` integer

## Other responses

- `400`: The department could not be created.
- `401`: The request was not authenticated — the API token is missing or invalid.

---

[API](https://skmtc.dev/timetastic/apis/timetastic-api.md) · [All operations](https://skmtc.dev/timetastic/apis/timetastic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/timetastic/apis/timetastic-api/revisions/709ccb0412c3?raw)
