API Reference
API Reference

/departments/:id/merge

Merges an existing department with a target one in your account. Required scope: w_departments. Accessible with all token types.

Request

An example of the request body:

{
    "target_department_id": "3ff4d64b",
    "force": false
}

Results

Calling the POST /departments/:id/merge endpoint will merge the given department with the target department and will return the full department object that is referring to the target department. If resources are affected by this merge, the endpoint will return a 409 error along with a list of those affected resources. To bypass this restriction, the client can set the force parameter to true

{
    "id": "3ff4d64b",
    "name": "HR",
    "parent_id": null,
    "sample": false
}

Each department will have the following keys:

keytypedescription
idstringThe department identifier
namestringThe name of the department
parent_idstringThe department identifier of the parent department or null if it is a top level department
samplebooleanIndicates whether the department is a sample created department
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!