Skip to main content
PUT
Replace who a workspace is shared with
Sends the complete desired share list, and OneCLI reconciles to it. On Cloud, sharing with people needs the Team plan and sharing with groups needs Enterprise, checked on additions only. See Editions and User provisioning. Replaces the full set of shares. People are added, removed, or re-roled to match users; groups to match groupIds. On Cloud, sharing with people needs the Team plan and sharing with groups needs the Enterprise plan; the check applies to additions only, so an existing binding never blocks an edit.
Availability: Cloud · Enterprise (self-hosted). Not available on the Community edition: a self-hosted deployment needs ENTERPRISE_ENABLED=true, otherwise the endpoint answers 403 with error.type: "enterprise_license_required".

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Path Parameters

workspaceId
string
required

Body

application/json
users
object[]
required
Maximum array length: 1000
groupIds
string[]
required
Maximum array length: 1000

Response

The diff that was applied

added
integer
removed
integer
roleChanged
integer