Create portal
Create a portal for one app or keyspace in your workspace.
Unreleased and subject to change without notice.
Send exactly one of keyspaceId or appId. That resource must belong to your
workspace, and it can back only one portal, so a second portal for the same
resource is a 409.
displayName is what your end users see. It is yours to set and change
independently of the resource the portal serves.
Required Permissions
Your root key must have portal.*.create_portal. A grant scoped to a specific
portal id does not authorize creation, because the id does not exist yet.
Authorizations
Unkey uses bearer tokens for authentication. Public integrations use root keys, while the dashboard proxy uses short-lived JWTs. To authenticate, include the token in the Authorization header of each request:
Root keys have specific permissions attached to them, controlling what operations they can perform. Legacy permissions use tuple strings like api.*.create_key; resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:keyspaces/*#create_key.
Security best practices:
- Keep root keys secure and never expose them in client-side code
- Use different root keys for different environments
- Rotate keys periodically, especially after team member departures
- Create keys with minimal necessary permissions following least privilege principle
- Monitor key usage with audit logs.
Body
- Option 1
- Option 2
URL-safe handle for this portal, unique within your workspace. Lowercase alphanumerics and single hyphens, 3-64 characters, not starting or ending with a hyphen.
3 - 64^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"acme-portal"
Human-readable name your end users see in the portal header and page
titles. Unlike slug it is not part of any URL, so it can be changed
freely.
1 - 64^\S(.*\S)?$"Acme"
The id of the keyspace this portal serves keys for. Must belong to your workspace.
A portal serves exactly one resource, so keyspaceId and appId are
mutually exclusive.
1 - 255^[a-zA-Z0-9_-]+$"ks_1234abcd"
The id of the app this portal serves keys for. Must belong to your workspace.
A portal serves exactly one resource, so appId and keyspaceId are mutually
exclusive.
1 - 255^[a-zA-Z0-9_-]+$"app_1234abcd"
Whether sessions can be minted for this portal immediately. Defaults to true; send false to create it dormant and enable it later.
true
Absolute https:// URL of the logo shown in the portal header.
Loaded by your end users' browsers, so the host you name receives their IP and user agent on every page view.
1 - 500^https://"https://cdn.example.com/logo.svg"
Six-digit hex colour used for primary actions and accents in the portal.
^#[0-9a-fA-F]{6}$"#6366f1"
Response
Portal created successfully.