Skip to main content
PUT
Set my default organization

Authorizations

scribe_session
string
cookie
required

Browser session cookie set by the WorkOS sign-in flow.

Body

application/json

The organization to make the default.

Choose which of the caller’s organizations is their default.

orgId
string
required

Id of one of the caller’s organizations to make their default.

Minimum string length: 1
Example:

"org_4kBnQpR7sT2vWxYz01ab"

Response

The refreshed profile with the new default organization.

Profile of the authenticated user plus their organization memberships.

user
object
required

A Scribe user profile.

Example:
orgs
object[]
required

All organizations the user belongs to.

Example:
currentOrgId
string
required

Id of the organization the request is scoped to (via the X-Org-Id header or ?orgId). Without an explicit selection it falls back to the default organization, then to the first membership; empty for accounts without an organization.

Example:

"org_4kBnQpR7sT2vWxYz01ab"

defaultOrgId
string | null

Id of the organization sessions fall back to when no X-Org-Id selection is sent (set via PUT /api/me/default-org). Null only when the user belongs to no organization or their default organization was just deleted.

Example:

"org_4kBnQpR7sT2vWxYz01ab"