CreateSysDept - Create a department
Creates a department in your organization. By default, the system creates two top-level departments: "Enterprise Department" and "Other Department". You can use this API to create sub-departments under these two departments. Creating additional top-level departments is not supported.
The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.
|
Supported editions |
Enterprise Dedicated Edition |
Service endpoints
Get the service endpoint and replace {domain} in the API request syntax with your endpoint.
Authorization
|
Product |
Resource |
Required permission |
|
organization settings |
departments |
Read and write |
Request syntax
POST https://{domain}/oapi/v1/platform/departments
Request details |
Sample request
|
Request headers |
|
|
The access token. See Access token for details. Example: pt-0fh3****0fbG_35af****0484. |
|
Request parameters |
|
|
name The department name. |
|
|
parentId The parent department ID. You can get this ID by calling the ListSysDepts API. By default, the system creates two top-level departments: "Enterprise Department" and "Other Department". You can only create descendant departments under these top-level departments. Creating new top-level departments is not supported. |
Response parameters |
Sample success response
|
|
id The department ID. |
|
|
name The department name. |
|
|
creatorId The ID of the user who created the department. |
|
|
parentId The parent department ID. |
Error codes
For more information, see Error code center.