Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceAccount and accessAccess

Set the maximum key lifetime

Sets maxKeyLifetimeDays, from 0 to 3650, and returns the saved settings. New API keys must expire within that many days; 0 lets keys never expire. Requires a signed-in session.

Required permission

Requires the guardrail.manage permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl authz key-setting update --max-key-lifetime-days <max-key-lifetime-days>
PUT
/v1/authz/settings

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Request Body

application/json
  1. body
maxKeyLifetimeDays*integer

New keys must expire within this many days; 0 means keys may never expire.

Range0 <= value <= 3650
updatedBy?string
updatedAt?string

Response Body

Updated

application/json
  1. response
maxKeyLifetimeDays*integer

New keys must expire within this many days; 0 means keys may never expire.

Range0 <= value <= 3650
updatedBy?string
updatedAt?string
Example Request
curl -X PUT 'https://api.openrelay.inc/v1/authz/settings' \  -H 'Content-Type: application/json' \  -d '{  "maxKeyLifetimeDays": 0}'
Example Response
{  "maxKeyLifetimeDays": 0,  "updatedBy": "string",  "updatedAt": "string"}