Skip to main content
PUT
Save one client's settings

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.

Scopes

openid

Issue an OIDC ID token identifying the caller.

profile

Read the caller's basic profile claims.

email

Read the caller's email address.

Path Parameters

client
string
required

claude (Claude Code) or codex (Codex)

Body

application/json
capabilities
object
required

The normalized capability contract compiled by barndoor-cli into client-specific flags and configuration. The product default is the client's native loop (client_default); locked_down is an explicit named preset, not the omitted-envelope fallback.

preferences
object

Any subset of the client's slot keys (possibly empty). Each value is a single Model Route or routing-policy alias. Stored but not read by a launch, which derives every slot from the person's allowed models. A trailing [1m] on a Claude value is accepted for older clients and dropped.

Response

The saved settings

One client's settings, or the built-in defaults when the organization has not saved any.

capabilities
object
required

The normalized capability contract compiled by barndoor-cli into client-specific flags and configuration. The product default is the client's native loop (client_default); locked_down is an explicit named preset, not the omitted-envelope fallback.

client
string
required

claude (Claude Code) or codex (Codex).

exists
boolean
required

False until the organization first saves settings for the client; the other fields then describe the built-in defaults.

id
string<uuid>
required

Stable settings id (deterministic per organization and client, so it is the same before and after the first save).

preferences
object
required

Stored per-slot model preferences. Accepted and kept, but not read by a launch: every slot is derived from the models Model Access allows the person (the newest allowed route of the slot's family).

version
integer<int32>
required

Current version, 0 when exists is false. Each save appends a version.

Required range: x >= 0
updated_at
string<date-time> | null