Manage departments, managers and team structures
/api/v1/departmentsReturns all departments in the organisation.
curl https://api.offly.net/api/v1/departments \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/departmentsCreates a new department. Requires admin or owner role.
| Field | Type | Description |
|---|---|---|
| name* | string | |
| manager_id | string(uuid) | |
| default_leave_allowance | number |
| Field | Type | Description |
|---|---|---|
| id | string(uuid) | |
| name | string | |
| manager_id | string(uuid)| null | |
| default_leave_allowance | number| null | |
| created_at | string(date-time) |
curl -X POST https://api.offly.net/api/v1/departments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/departments/{id}Updates a department. Requires admin or owner role.
| Name | Type | In | Description |
|---|---|---|---|
| id* | string(uuid) | path |
| Field | Type | Description |
|---|---|---|
| name | string | |
| manager_id | string(uuid)| null | |
| default_leave_allowance | number| null |
| Field | Type | Description |
|---|---|---|
| id | string(uuid) | |
| name | string | |
| manager_id | string(uuid)| null | |
| default_leave_allowance | number| null | |
| created_at | string(date-time) |
curl -X PATCH https://api.offly.net/api/v1/departments/{id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Do not use production API keys on shared devices. Keys are stored in memory only.
/api/v1/departments/{id}Deletes a department. Requires admin or owner role.
| Name | Type | In | Description |
|---|---|---|---|
| id* | string(uuid) | path |
curl -X DELETE https://api.offly.net/api/v1/departments/{id} \
-H "Authorization: Bearer YOUR_API_KEY"Do not use production API keys on shared devices. Keys are stored in memory only.