Skip to content

Create Unit

POST
/units

Creates a new Unit (organizational grouping) within the current Space. Units group Resources and Actions together — a Resource assigned to a Unit must fulfill all Actions assigned to the same Unit whose targetResourceType matches. The parent Space must be active.

X-Space-Id
required
string format: uuid

UUID of the target Space (tenant boundary). Validated against user access.

object
name
required

Name of the new Unit

string
Example
Production Department
object
id
required

Unit ID

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000
spaceId
required

Space ID this unit belongs to

string format: uuid
Example
660e8400-e29b-41d4-a716-446655440000
name
required

Unit name

string
Example
Production Department

Unauthorized — missing or invalid JWT

Forbidden — insufficient permissions

Validation failed — invalid input