POST
/
departments
curl --request POST \
  --url https://api.absentify.com/api/v1/departments \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "name": "<string>",
  "custom_id": "<string>",
  "default_allowance": 123,
  "maximum_absent": 123,
  "approval_process": "Linear_all_have_to_agree",
  "manager_member": [
    {
      "member_id": "<string>",
      "predecessor_manager_id": "<string>"
    }
  ],
  "default_department_allowances": [
    {
      "id": "<string>",
      "value": 123
    }
  ]
}'
"3c90c3cc-0d44-4b50-8888-8dd25736052a"

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required
custom_id
string | null
required
default_allowance
number
required
maximum_absent
number
required
approval_process
enum<string>
required
Available options:
Linear_all_have_to_agree,
Linear_one_has_to_agree,
Parallel_all_have_to_agree,
Parallel_one_has_to_agree
manager_member
object[]
required
default_department_allowances
object[]
required

Response

200
application/json
Successful response

The response is of type string.