---
title: "Set Workspace Team"
method: PUT
path: "/v2/workspaces/{workspace_id}/team"
tags: ["v2 - Workspaces"]
---

# Set Workspace Team

`PUT /v2/workspaces/{workspace_id}/team`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/workspaces/{workspace_id}/team`
- Auth: HTTP bearer

Atomically set (or clear) a workspace's team in one request.

Replaces the client-side unlink-then-link pattern, which could leave a
workspace orphaned from every team if the second call failed. Validates the
target team up front, then unlinks from the old team and links to the new
one, saving the workspace once. team_id=None unlinks only.

Access: workspace owner only (matches the link endpoint).

## Path parameters

- `workspace_id` string, required

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Request body

- SetWorkspaceTeamRequest: Atomic set-team: link/unlink in one request. team_id=None unlinks.
  - `team_id` string, nullable: Team to link to. None unlinks from any current team.

## Response `200`

Successful Response

- WorkspaceResponse: Full workspace response.
  - `workspace_id` string, required
  - `owner_member_ref` string, nullable
  - `owner` object, nullable: The owner's public profile: {member_ref, display_name, avatar_url, handle, is_you}. Null for an unclaimed trial.
  - `is_owner` boolean
  - `folder_id` string, nullable, required
  - `team_id` string, nullable: Team this workspace belongs to (if linked)
  - `team_name` string, nullable: Name of the linked team (for display)
  - `my_role` string, nullable: Role of the requesting user: 'owner', 'admin', 'editor', 'reviewer', 'viewer', or null if not a member
  - `name` string, required
  - `description` string, nullable, required
  - `cover_image_url` string, nullable, required
  - `kind` 'workspace' | 'collection'
  - `archived` boolean
  - `archived_at` string, date-time, nullable
  - `archived_by` string, nullable
  - `archived_by_member_ref` string, nullable
  - `members` WorkspaceMemberResponse[], required
    - `member_ref` string, required
    - `role` string, required
    - `joined_at` string, date-time, required
    - `expires_at` string, date-time, nullable
    - `is_you` boolean
    - `can_approve` boolean: Holds the release here: the owner, or granted by the owner
  - `approvers` WorkspaceApproverResponse[]: Who, besides the owner, may release a launch of this workspace's content
    - `kind` 'profile' | 'team', required
    - `member_ref` string, nullable: For kind=profile: the grantee's workspace-scoped member_ref
    - `person` object, nullable: For kind=profile: {member_ref, display_name, avatar_url, handle, is_you}
    - `team_id` string, nullable: For kind=team: the linked team
    - `team_name` string, nullable
    - `granted_at` string, date-time, nullable
  - `can_approve` boolean: Whether the caller may release a launch here
  - `has_reviewers` boolean, nullable: Whether the workspace has at least one reviewer (a reviewer on the linked team, or a direct workspace reviewer); the approval badge shows only then. Null when the linked team was not read.
  - `stats` WorkspaceStatsResponse, required: Workspace statistics in response.
    - `total_contents` integer, required
    - `launched_contents` integer, required
    - `scheduled_contents` integer, required
    - `draft_contents` integer, required
    - `total_members` integer, required
    - `pending_launches` integer, required
  - `default_language` string, nullable, required
  - `default_tags` string[], nullable, required
  - `split_override` object, nullable: Workspace-level ownership/revenue split override
  - `member_opt_outs` string[], nullable: member_refs of members who opted out of the ownership split (never profile IDs)
  - `plan` string, nullable: Plan the workspace was created under
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable, required
  - `expires_at` string, date-time, nullable: When this workspace expires (None = permanent)
  - `claimed_from_trial_at` string, date-time, nullable: When this workspace was claimed out of the try-now flow (None if it never was)
  - `meta_engagement_enabled` boolean: Facebook and Instagram first comments are switched on here (META_ENGAGEMENT_ENABLED_WORKSPACES, meta_engagement_policy)

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
