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 unkey:v1:<workspace_id>:projects/<project_id>/portals/*#write
for the project that owns the app or keyspace. A grant scoped to a specific
portal ID does not authorize creation, because the ID does not exist yet.
You must also have read permission on the resource the portal serves:
unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>#readfor an app.unkey:v1:<workspace_id>:projects/<project_id>/keyspaces/<keyspace_id>#readfor a keyspace.
Broader grants that cover these resources and actions also authorize the request. A missing permission returns 403. An app or keyspace outside your workspace returns 404, the same as a resource that does not exist.
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. Resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:projects/*/keyspaces/*/keys/*#write.
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
Response
Portal created successfully.