orgs

Update an API key rule.

Update an API key rule.

patch/orgs/{org}/api-key-rules/{slug_perm}/

Request body

enforce_refreshboolean

When enabled, API's keys that violate the organization's policy will be replaced automatically.

is_enabledboolean

Whether this policy is currently active and enforced.

max_age_hoursinteger nullable

The maximum permitted age of an API key for use in the organization. API keys older than this will no longer have access until they are refreshed. To disable the policy unset this value.

refresh_immediatelyboolean

If set to True, API keys that violate this rule will be replaced immediately after the request is made. There is no way to undo this.

rule_type'All Accounts' | 'Service Accounts' | 'User Accounts'

Specify which account types this rule applies to: all accounts (deprecated — prefer separate service/user rules), service accounts only, or user accounts only.

Response

OK

created_atstring date-time
enforce_refreshboolean

When enabled, API's keys that violate the organization's policy will be replaced automatically.

is_enabledboolean

Whether this policy is currently active and enforced.

last_applied_atstring date-time

The last time this policy was evaluated and applied by the expiry task.

max_age_hoursinteger nullable

The maximum permitted age of an API key for use in the organization. API keys older than this will no longer have access until they are refreshed. To disable the policy unset this value.

rule_type'All Accounts' | 'Service Accounts' | 'User Accounts' required

Specify which account types this rule applies to: all accounts (deprecated — prefer separate service/user rules), service accounts only, or user accounts only.

slugstring slug

Human-readable identifier for the policy type. Automatically generated based on policy_type.

slug_permstring slug

An auto-generated id that uniquely identifies the API key policy.

updated_atstring date-time

Changes

Changed in 1 of the 2 revisions of this API.1