API Reference
API Reference

/departments

Creates a department in your account. Required scope: w_departments. Accessible with all token types.

Request

An example of the request body:

{
    "name": "Commercial",
    "parent_id": null
}

Results

Calling the POST /departments endpoint will create a new department and return the newly created department for the account for the account. An example of the response follows:

{
    "id": "3ff4d641",
    "name": "Commercial",
    "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!