put https://{subdomain}.workable.com/spi/v3/departments
Updates an existing department in your account. Required scope: w_departments
. Accessible with all token types.
Request
An example of the request body:
{
"id": "3ff4d641",
"name": "New Commercial name",
"parent_id": "3ff4d64b"
}
Rename a department
In order to rename an existing department, the full body should be sent by changing only the name.
Change parent of the department
In order to change the department's parent, then the new provided id it should be in the parent_id
field. In cases that the parent_id
is null
then the department become a root department.
Results
Calling the PUT /departments
endpoint will update the given department and return it. An example of the response follows:
{
"id": "3ff4d641",
"name": "New Commercial name",
"parent_id": "3ff4d64b",
"sample": false
}
Each department
will have the following keys:
key | type | description |
---|---|---|
id | string | The department identifier |
name | string | The name of the department |
parent_id | string | The department identifier of the parent department or null if it is a top level department |
sample | boolean | Indicates whether the department is a sample created department |