portal

Update portal

Change a portal's slug, display name, the resource it serves, its enabled state, or its branding.

Unreleased and subject to change without notice.

Only the fields you send change. Omitting a field leaves it as it is, and for branding, sending null clears it. Send at most one of keyspaceId or appId.

Two changes affect your end users immediately:

  • Re-pointing at a different resource revokes the portal's live sessions, because a session carries the scope it was minted with.
  • Disabling stops new sessions but leaves live ones running until they expire.

Required Permissions

Your root key must have one of:

  • portal.*.update_portal (to update any portal in the workspace)
  • portal.<portal_id>.update_portal (to update a specific portal)

Without the permission this returns 404, not 403.

post/v2/portal.updatePortal

Request body

portalstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

slugstring

New handle for this portal. Omit to leave unchanged.

displayNamestring

New human-readable name shown to your end users. Omit to leave unchanged.

keyspaceIdstring

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.

appIdstring

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.

enabledboolean

Whether new sessions can be minted. Omit to leave unchanged.

Disabling does not end sessions that are already live.

logoUrlstring uri nullable

Absolute https:// URL of the portal logo. Omit to leave unchanged, or set null to remove the logo.

primaryColorstring nullable

Six-digit hex colour for primary actions. Omit to leave unchanged, or set null to fall back to default styling.

Example request

{
  "portal": "proj_1234abcd",
  "slug": "acme-portal",
  "displayName": "Acme",
  "keyspaceId": "ks_1234abcd",
  "appId": "app_1234abcd",
  "logoUrl": "https://cdn.example.com/logo.svg",
  "primaryColor": "#6366f1"
}

Response

The portal as it now stands.

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "data": {
    "id": "pc_1234abcd",
    "slug": "acme-portal",
    "displayName": "Acme",
    "enabled": true,
    "keyspaceId": "ks_1234abcd",
    "appId": "app_1234abcd",
    "branding": {
      "logoUrl": "https://cdn.example.com/logo.svg",
      "primaryColor": "#6366f1"
    },
    "createdAt": 1719849600000,
    "updatedAt": 1719936000000
  }
}

Changes

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