Update an API key
const url = 'https://api.aetherpush.com/v1/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scopes":["deploy","read","apps"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.aetherpush.com/v1/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scopes": [ "deploy", "read", "apps" ] }'Updates name, scopes, and/or expires_at on an existing API
key. At least one field must be provided. Cannot update revoked
keys.
Once the account passed its two-factor setup deadline with MFA still
off, changing expires_at and widening the scope set are both refused
with 403 and code mfa_setup_required. Renaming and narrowing scopes
stay open.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Body shape for updating an API key. All fields optional. At least one field must be provided.
object
Example
{ "scopes": [ "deploy", "read", "apps" ]}Responses
Section titled “Responses”API key updated.
API key metadata. Fields use snake_case for historical reasons —
this will be normalized to camelCase in a future API version.
object
Public, non-sensitive prefix for visual identification of the key.
Format: aether_sk_live_ followed by 9 base62 characters.
Null means no expiration.
Example
{ "name": "github-actions-ci", "key_prefix": "aether_sk_live_AbC123XyZ", "scopes": [ "deploy", "read" ]}Missing or invalid fields.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Unauthenticated.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}API keys and named access keys receive a plain 403. A valid login
session that is not a dashboard login session receives
dashboard_session_required; an account that passed its two-factor
setup deadline and asks to change expires_at or widen its scopes
receives mfa_setup_required.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Returned when the account passed its two-factor setup deadline and asks
for a new credential. Same shape as the reauth response so clients can
branch on code rather than on message text.
object
Returned after login-session validation when a valid session that is
not a dashboard login session tries to issue or widen an API key,
create an access key or change its lifetime, enrol a passkey or
authenticator app, start a passkey step-up challenge, or run the CLI
device ceremony. Endpoints that enforce both guards reject API keys and
named access keys earlier with a plain 403 response and no code.
API-key creation applies only the dashboard-session guard, so any
non-dashboard credential receives this response there. Listing,
renaming and revoking stay open to any login session. Sessions created
before the credential_origin column existed cannot be attributed to
the dashboard and are also refused; signing out and back in fixes that.
object
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}API key not found.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Cannot update a revoked API key.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}