Skip to main content
POST
Create a group 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.

Body

application/json
group_name
string
required
fixed_lifetime
boolean

Give every key exactly max_lifetime_days (BCP-5229).

max_lifetime_days
integer<int32> | null
require_expiry
boolean

Response

The created record

One stored row: the org default (group_name: None) or a group override.

fixed_lifetime
boolean
required

Every key gets exactly max_lifetime_days and the user doesn't choose (BCP-5229). 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
group_name
string | null

None for the org default; otherwise the IdP group this overrides it for.

max_lifetime_days
integer<int32> | null

Longest a key may live, in days from when it is created or rotated. None = no maximum. A maximum also rules out a never-expiring key.

updated_by_user_id
string<uuid> | null