API Reference

/departments

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

Log in to see full request history
timestatususer agent
Retrieving recent requests…
LoadingLoading…

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
Path Params
string
required

The account subdomain

Body Params
string
required

The name of the new department

string

The department identifier of the parent department if it is a top level department

Responses

Language
Credentials
URL
Click Try It! to start a request and see the response here! Or choose an example:
application/json