Skip to main content
POST
/
areas
curl --request POST \
  --url https://api.roostedhr.com/api/1_12/areas \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Northeast"
}
'
{
  "id": "a1B2c",
  "name": "Northeast",
  "parent_id": "",
  "nlevel": 0,
  "protected": false
}
To create a child area, set parent_id to the ID of an existing area. Omit parent_id (or pass an empty string) for a top-level area.

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required

Display name of the area.

Maximum string length: 50
Example:

"Northeast"

parent_id
string

ID of the parent area. Omit or pass an empty string for a top-level area.

Example:

""

Response

Created

id
string

Unique area identifier.

Example:

"a1B2c"

name
string

Display name of the area.

Example:

"Northeast"

parent_id
string

Parent area ID, or empty string if top-level.

Example:

""

nlevel
integer

Nesting depth (0 = top-level).

Example:

0

protected
boolean

Whether the area is system-protected.

Example:

false