Skip to main content
POST
Create department

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

String. The organization's internal ID (32-character hex string) or its externalSourceId. When the value matches the format of an internal ID, the internal ID takes precedence.

Example:

"11adfe2a080040e3892ffb89c21ec44e"

Body

application/json
name
string
required

Display name of the department. Must be non-empty and not whitespace-only. Leading and trailing whitespace is trimmed.

Maximum string length: 255
externalSourceId
string

Optional external source identifier, for example the department's ID in an integrated system. Leading and trailing whitespace is trimmed, and an empty value is stored as null.

Maximum string length: 255
parentId
string

Optional. The id of the department to create this one under. It must be a department in the same organization. When omitted, null or empty, the department is created as a top-level department directly under the organization's root department (level 1).

vatType
enum<string>

Optional. VAT deduction handling for the department, case-sensitive. Applies to this department only, whether or not parentId is set: it is not inherited from the parent department. Defaults to USE_CATEGORY when omitted, null or empty.

Available options:
USE_CATEGORY,
NON_DEDUCTABLE_VAT,
DEDUCTABLE_VAT

Response

Created — returns the newly created department

id
string
required

Unique identifier of the department.

externalSourceId
string | null
required

External source identifier of the department, if set by an integration. Null when not set.

name
string
required

Display name of the department.

parentId
string | null
required

The id of the parent department. Null only for the organization's own root unit (level 0). Every other department, including a top-level one directly under the root, has this set to its parent's id.

vatType
enum<string>
required

VAT deduction handling for this department. Defaults to USE_CATEGORY when not explicitly set.

Available options:
USE_CATEGORY,
NON_DEDUCTABLE_VAT,
DEDUCTABLE_VAT
customDimensionPresetValues
object[]
required

Preset custom dimension values configured for this department, in the order they were created. The order is stable, so identical requests return the values in the same order. Excludes values belonging to deleted dimension definitions.

level
integer
required

Depth of the department within the organization's unit hierarchy. The organization's implicit root unit is level 0; a genuine top-level department is level 1.