Admin-only endpoint to create a new department.
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
| Content-Type | string | Yes | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Department name |
| description | string | No | Department description |
| parentId | string | No | Parent department ID (for sub-departments) |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Department name
"Engineering"
Department description
"Handles all software engineering operations"
Department code
"ENG-001"
Department location
"San Francisco HQ"
Parent department info
"68c87b38e0c86b191d1b3c5b"