You need a root key with the permissions listed on this page. Create one in the dashboard under Settings > Root Keys. See Permission reference for every permission.
null clears the value. Calls POST /v2/portal.updatePortal. The portal management commands are unreleased and may change without notice.
Two changes affect your end users right away:
- Pointing the portal at a different keyspace or app signs out every current session. Sending the same keyspace or app it already has changes nothing. The new one must be in the same project as the old one, or the call fails with 412. Keyspaces are in the workspace’s default project and apps are in the project you created them in, so moving between a keyspace and an app often hits this. Create a new portal instead.
- Disabling the portal stops new sessions and lets current ones run until they expire. Use it to close a portal gradually. To close it at once, use delete-portal.
Usage
Flags
string
required
Portal id or slug to update.
string
New portal handle, unique in the workspace. A slug another portal has returns 409
err:unkey:data:portal_already_exists. Update any calls that use the old slug.string
New name shown to end users.
string
Keyspace the portal should serve instead. Mutually exclusive with
--app-id.string
App the portal should serve instead. Mutually exclusive with
--keyspace-id.boolean
Whether you can create new sessions. Leave it off to keep the current state.
string
New absolute HTTPS logo URL, or
null to remove the logo.string
New six-digit hex color, or
null to fall back to the default styling.Shared flags
Everyunkey api command takes these. See CLI output and shared flags.
string
Root key used for the request. Falls back to
UNKEY_ROOT_KEY, then to the key stored by unkey auth login.string
default:"https://api.unkey.com"
Base URL of the API. Falls back to
UNKEY_API_BASE_URL. You don’t normally need to set it.string
default:"~/.unkey/config.toml"
Path of the config file written by
unkey auth login. Falls back to UNKEY_CONFIG.string
Output format. Falls back to
UNKEY_OUTPUT. json prints the full response. Any other value prints the request ID and data.string
Send this JSON as the whole request body instead of using the command’s flags. You can’t combine it with them.
Required permissions
portal.*.update_portal or portal.<portalId>.update_portal. Without it you get a 404, as if the portal didn’t exist. Pointing the portal at a new resource also needs read on it: api.*.read_api or api.<apiId>.read_api for a keyspace, app.*.read_app or app.<appId>.read_app for an app. Without that, the call fails with 403 and “You do not have permission to point a portal at that resource.” See Root key permissions.
Examples
Rename
Re-point and disable
Clear branding
Raw body