Skip to main content
PUT
Set the default API key lifetime policy

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.

Body

application/json

The settings an admin writes, for the org default, one group or one user.

fixed_lifetime
boolean

Give every key exactly max_lifetime_days instead of capping at it. Omitted = false, so every existing caller keeps writing a cap.

max_lifetime_days
integer<int32> | null
require_expiry
boolean

Response

The updated policies

groups
object[]
required

Per-IdP-group overrides. A user in several of these gets the strictest.

users
object[]
required

Per-user overrides. A user's own override wins over their groups and the default.

default
object | null

The org default; None means self-serve keys have no lifetime limit unless a group override applies.