Skip to content
Skip to Content
Coder Docs

Update workspace sharing settings for organization

PATCH
/api/v2/organizations/{organization}/settings/workspace-sharing

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

organization*string

Organization ID

Formatuuid

Request Body

Workspace sharing settings

application/json
  1. body
shareable_workspace_owners?string

ShareableWorkspaceOwners controls whose workspaces can be shared within the organization.

Value in"none""everyone""service_accounts"
sharing_disabled?boolean

SharingDisabled is deprecated and left for backward compatibility purposes. Deprecated: use ShareableWorkspaceOwners instead

Response Body

OK

application/json
  1. response
shareable_workspace_owners?string

ShareableWorkspaceOwners controls whose workspaces can be shared within the organization.

Value in"none""everyone""service_accounts"
sharing_disabled?boolean

SharingDisabled is deprecated and left for backward compatibility purposes. Deprecated: use ShareableWorkspaceOwners instead

sharing_globally_disabled?boolean

SharingGloballyDisabled is true if sharing has been disabled for this organization because of a deployment-wide setting.

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PATCH \	"$CODER_URL/api/v2/organizations/{organization}/settings/workspace-sharing" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "shareable_workspace_owners": "none",  "sharing_disabled": true}'
Example Response200
{  "shareable_workspace_owners": "none",  "sharing_disabled": true,  "sharing_globally_disabled": true}