Skip to main content
POST
Create a principal

Authorizations

x-api-key
string
header
required

Body

application/json

The create-principal request body.

user_id is optional — the door mints one when absent. kind is human or service; role names the role template applied to the principal's policy.

display_name
string
required
Minimum string length: 1
kind
enum<string>
required
Available options:
human,
service
role
string
required
Minimum string length: 1
user_id
string | null

Response

Success.

data
Principal · object
required

A principal: the unit of identity and authority every credential belongs to.

user_id is the id the access-control policy row is keyed by. kind is human (authenticates through an accounts provider) or service (holds keys only, never logs in interactively). display_name is the operator- facing label. created_by is the principal id that created this one, or None for the owner the setup door mints. disabled turns off every credential the principal owns. created_at is timezone-aware (UTC).