Skip to main content
PUT
Update a user API key lifetime override

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

id
string<uuid>
required

Identifier, a UUID

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 record

A per-user override (BCP-5283). It wins outright: the user's group overrides and the org default don't apply to them.

fixed_lifetime
boolean
required

Every key gets exactly max_lifetime_days. Requires max_lifetime_days.

id
string<uuid>
required
require_expiry
boolean
required

The key must have an expiry, even when there is no maximum.

updated_at
string<date-time>
required
user_id
string<uuid>
required

The user this override applies to.

max_lifetime_days
integer<int32> | null

Longest a key may live, in days. None = no maximum.

updated_by_user_id
string<uuid> | null