Skip to main content
POST
Create a model route group

Authorizations

Authorization
string
header
required

A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.

Body

application/json
name
string
required
change_note
string | null

Optional free-text note explaining why this group was created (BCP-3998). Distinct from description, which describes what the group is and persists; this describes one change and is replaced by the next edit's note.

description
string
model_aliases
string[]

Optional initial membership, so "create a group from the routes I have selected" is one request instead of two.

Response

The created record

A route group plus its membership, which is how both the admin list and the routes table want it — the UI renders a chip per group on each route, so shipping the aliases with the group saves a second round trip and an inconsistent intermediate state.

description
string
required
id
string<uuid>
required
model_aliases
string[]
required

Member aliases, alphabetical. Empty for a group nobody has filled in yet — which is a legitimate state, not an error: an admin can create the group, attach it to a policy, and populate it afterwards.

name
string
required
org_id
string<uuid>
required
created_by_email
string | null
created_by_name
string | null
created_by_user_id
string<uuid> | null
last_change_note
string | null

Optional free text explaining why the last change was made ("Raised for the Q3 batch job", "Vendor deprecated the old endpoint").

Admin-authored and rendered in the portal, so it is untrusted input: length-capped here, escaped on render.

last_modified_at
string<date-time> | null

When the change named by last_modified_by_* happened.

Its own column rather than the row's updated_at, because updated_at is bumped by writes nobody is attributed for -- pairing the two would date a named admin's edit to a background job's clock. See the V75 migration for the full reasoning.

last_modified_by_email
string | null
last_modified_by_name
string | null
last_modified_by_user_id
string<uuid> | null