Start free
Docs · Teams

API reference

Teams

Read as Markdown

On this page
  1. List the teams
  2. Create a team
  3. Rename a team
  4. Delete a team
  5. Set a team's members
  6. Set a team's workspaces

Base URL https://api.beplan.io/v1. Authentication, envelopes, pagination, idempotency and rate limits: conventions. OpenAPI document: openapi.json.

All 6 Teams operations

List the teams

GET /organizations/{organizationId}/teams
Beta Reads only teams.list
Scope
organization:read
Role permission
Manage the organization (organization:update)
Effect
Changes nothing.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Returns every team of the organization, by name: its members (membership ids, matching GET …/members) and the workspaces it sees. Only users who can edit the organization's settings can read it. A token narrowed to chosen workspaces sees only those workspaces in each team's workspaces.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Parameters

Name In Type Description
organizationId required path string 1–128 characters

Responses

200 OK

object · ListTeamsResponse

  • dataarray of objectrequired
    7fields in each item
    • idstringrequired
      The team's id (a UUID).
    • namestringrequired
    • memberCountnumberrequired
      How many members are in the team.
    • memberIdsarray of stringrequired
      The team's members, by membership id (the id of GET …/members, not the user id).
    • workspaceAccessstringrequired
      all: the team's members see every workspace, current and future. selected: only the workspaces in workspaces. Owners and admins see every workspace whatever their teams.
      One of: all, selected
    • workspacesarray of objectrequired
      The workspaces of a selected team (empty for all). Through the public API, only the workspaces the token was given are listed.
      2fields in each item
      • idstringrequired
      • namestringrequired
    • createdAtstringrequired
      When the team was created, ISO 8601 in UTC.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 429, 500.

Error codes

Status Code Message
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
10 more that every operation can answer (tokens, scopes, limits)
400 VALIDATION_FAILED Some of the information sent is invalid.
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

One team restricted to one workspace

curl
curl -X GET "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams" \
  -H "Authorization: Bearer beplan_pat_…"
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams", {
  method: "GET",
  headers: {
    Authorization: "Bearer beplan_pat_…",
  },
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import requests

response = requests.get(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams",
    headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"]
Response 200
{
  "data": [
    {
      "id": "7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
      "name": "Editors",
      "memberCount": 1,
      "memberIds": [
        "Qe4hT8vN2sLw6KpZ1cXbR"
      ],
      "workspaceAccess": "selected",
      "workspaces": [
        {
          "id": "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62",
          "name": "Northwind"
        }
      ],
      "createdAt": "2026-05-06T10:00:00.000Z"
    }
  ]
}

Create a team

POST /organizations/{organizationId}/teams
Beta Changes data teams.create
Scope
members:write
Role permission
Manage the organization (organization:update)
Effect
Changes data in Beplan.
Idempotency
Send an Idempotency-Key to retry safely: the same key with the same body within 24 hours returns the stored response.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Creates a team with no members. workspaceIds absent, null or empty: the team sees every workspace, current and future; otherwise exactly those workspaces (ids from GET …/workspaces; one that isn't a workspace of the organization answers 404 WORKSPACE_NOT_FOUND and nothing is created). Add members with PUT …/teams/:teamId/members. Names need not be unique. Answers 201 with the team.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Needs a token given all the workspaces of the organization: one narrowed to chosen workspaces answers 403 INTEGRATION_SELECTION_TOO_NARROW, since a team's change affects workspaces the token can't see.

Parameters

Name In Type Description
organizationId required path string 1–128 characters

Request body JSON, required

object · CreateTeamBody

  • namestringrequired
    1–100 characters
  • workspaceIdsarray of string (uuid)optionalnullable
    The workspaces the team's members see: null or [] = every workspace, current and future; otherwise exactly these (each a workspace of the organization, from GET …/workspaces).
    at most 500 items

Responses

201 Created

object · OrganizationTeamResponse

  • dataobject · OrganizationTeamrequired
    7fields
    • idstringrequired
      The team's id (a UUID).
    • namestringrequired
    • memberCountnumberrequired
      How many members are in the team.
    • memberIdsarray of stringrequired
      The team's members, by membership id (the id of GET …/members, not the user id).
    • workspaceAccessstringrequired
      all: the team's members see every workspace, current and future. selected: only the workspaces in workspaces. Owners and admins see every workspace whatever their teams.
      One of: all, selected
    • workspacesarray of objectrequired
      The workspaces of a selected team (empty for all). Through the public API, only the workspaces the token was given are listed.
      2fields in each item
      • idstringrequired
      • namestringrequired
    • createdAtstringrequired
      When the team was created, ISO 8601 in UTC.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 409, 413, 415, 429, 500.

Error codes

Status Code Message
400 VALIDATION_FAILED Some of the information sent is invalid.
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
404 WORKSPACE_NOT_FOUND This workspace doesn't exist or you don't have access to it.
14 more that every operation can answer (tokens, scopes, limits)
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
403 INTEGRATION_SELECTION_TOO_NARROW This needs access to every workspace of the organization. Connect again and pick all workspaces.
409 CONFLICT This changed in the meantime. Refresh and try again.
409 IDEMPOTENCY_KEY_REUSED This Idempotency-Key was already used for a different request. Send a new key.
413 PAYLOAD_TOO_LARGE This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key.
415 UNSUPPORTED_MEDIA_TYPE This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

A team that sees every workspace

curl
curl -X POST "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams" \
  -H "Authorization: Bearer beplan_pat_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Editors"
}'
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams", {
  method: "POST",
  headers: {
    Authorization: "Bearer beplan_pat_…",
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Editors"
  }),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import uuid

import requests

response = requests.post(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams",
    headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Editors",
    },
)
response.raise_for_status()
data = response.json()["data"]
Response 201
{
  "data": {
    "id": "7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    "name": "Editors",
    "memberCount": 0,
    "memberIds": [],
    "workspaceAccess": "all",
    "workspaces": [],
    "createdAt": "2026-05-06T10:00:00.000Z"
  }
}

Rename a team

PATCH /organizations/{organizationId}/teams/{teamId}
Beta Changes data teams.update
Scope
members:write
Role permission
Manage the organization (organization:update)
Effect
Changes data in Beplan.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Renames a team (1 to 100 characters, trimmed). Team ids come from GET …/teams. Answers with the team.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Needs a token given all the workspaces of the organization: one narrowed to chosen workspaces answers 403 INTEGRATION_SELECTION_TOO_NARROW, since a team's change affects workspaces the token can't see.

Parameters

Name In Type Description
organizationId required path string 1–128 characters
teamId required path string (uuid)

Request body JSON, required

object · RenameTeamBody

  • namestringrequired
    1–100 characters

Responses

200 OK

object · OrganizationTeamResponse

  • dataobject · OrganizationTeamrequired
    7fields
    • idstringrequired
      The team's id (a UUID).
    • namestringrequired
    • memberCountnumberrequired
      How many members are in the team.
    • memberIdsarray of stringrequired
      The team's members, by membership id (the id of GET …/members, not the user id).
    • workspaceAccessstringrequired
      all: the team's members see every workspace, current and future. selected: only the workspaces in workspaces. Owners and admins see every workspace whatever their teams.
      One of: all, selected
    • workspacesarray of objectrequired
      The workspaces of a selected team (empty for all). Through the public API, only the workspaces the token was given are listed.
      2fields in each item
      • idstringrequired
      • namestringrequired
    • createdAtstringrequired
      When the team was created, ISO 8601 in UTC.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 413, 415, 429, 500.

Error codes

Status Code Message
400 VALIDATION_FAILED Some of the information sent is invalid.
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
404 TEAM_NOT_FOUND This team doesn't exist in this organization.
12 more that every operation can answer (tokens, scopes, limits)
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
403 INTEGRATION_SELECTION_TOO_NARROW This needs access to every workspace of the organization. Connect again and pick all workspaces.
413 PAYLOAD_TOO_LARGE This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key.
415 UNSUPPORTED_MEDIA_TYPE This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

A new name

curl
curl -X PATCH "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35" \
  -H "Authorization: Bearer beplan_pat_…" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Video editors"
}'
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer beplan_pat_…",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Video editors"
  }),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import requests

response = requests.patch(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    headers={"Authorization": "Bearer beplan_pat_…"},
    json={
        "name": "Video editors",
    },
)
response.raise_for_status()
data = response.json()["data"]
Response 200
{
  "data": {
    "id": "7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    "name": "Video editors",
    "memberCount": 1,
    "memberIds": [
      "Qe4hT8vN2sLw6KpZ1cXbR"
    ],
    "workspaceAccess": "selected",
    "workspaces": [
      {
        "id": "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62",
        "name": "Northwind"
      }
    ],
    "createdAt": "2026-05-06T10:00:00.000Z"
  }
}

Delete a team

DELETE /organizations/{organizationId}/teams/{teamId}
Beta Deletes teams.delete
Scope
members:write
Role permission
Manage the organization (organization:update)
Effect
Deletes data or cannot be undone.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Deletes a team; its members stay in the organization. Members left in no team see no workspace until they join one, so check GET …/members first. Cannot be undone. Answers 204.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Needs a token given all the workspaces of the organization: one narrowed to chosen workspaces answers 403 INTEGRATION_SELECTION_TOO_NARROW, since a team's change affects workspaces the token can't see.

Parameters

Name In Type Description
organizationId required path string 1–128 characters
teamId required path string (uuid)

Responses

204 No content

No content.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 429, 500.

Error codes

Status Code Message
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
404 TEAM_NOT_FOUND This team doesn't exist in this organization.
11 more that every operation can answer (tokens, scopes, limits)
400 VALIDATION_FAILED Some of the information sent is invalid.
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
403 INTEGRATION_SELECTION_TOO_NARROW This needs access to every workspace of the organization. Connect again and pick all workspaces.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

Delete a team

curl
curl -X DELETE "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35" \
  -H "Authorization: Bearer beplan_pat_…"
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer beplan_pat_…",
  },
});
if (!response.ok) throw new Error((await response.json()).error.code);
Python
import requests

response = requests.delete(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()

Answers 204 with no content.

Set a team's members

PUT /organizations/{organizationId}/teams/{teamId}/members
Beta Changes data teams.members.set
Scope
members:write
Role permission
Manage the organization (organization:update)
Effect
Changes data in Beplan.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Gives a team exactly these members (replacing them; [] empties it), by membership id from GET …/members. An id that isn't a member of the organization answers 404 MEMBER_NOT_FOUND and nothing changes. What each member sees changes at once. Answers with the team.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Needs a token given all the workspaces of the organization: one narrowed to chosen workspaces answers 403 INTEGRATION_SELECTION_TOO_NARROW, since a team's change affects workspaces the token can't see.

Parameters

Name In Type Description
organizationId required path string 1–128 characters
teamId required path string (uuid)

Request body JSON, required

object · SetTeamMembersBody

  • memberIdsarray of stringrequired
    Every member of the team, by membership id (replaces them; [] empties the team).
    at most 1000 items · each 1–128 characters

Responses

200 OK

object · OrganizationTeamResponse

  • dataobject · OrganizationTeamrequired
    7fields
    • idstringrequired
      The team's id (a UUID).
    • namestringrequired
    • memberCountnumberrequired
      How many members are in the team.
    • memberIdsarray of stringrequired
      The team's members, by membership id (the id of GET …/members, not the user id).
    • workspaceAccessstringrequired
      all: the team's members see every workspace, current and future. selected: only the workspaces in workspaces. Owners and admins see every workspace whatever their teams.
      One of: all, selected
    • workspacesarray of objectrequired
      The workspaces of a selected team (empty for all). Through the public API, only the workspaces the token was given are listed.
      2fields in each item
      • idstringrequired
      • namestringrequired
    • createdAtstringrequired
      When the team was created, ISO 8601 in UTC.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 413, 415, 429, 500.

Error codes

Status Code Message
400 VALIDATION_FAILED Some of the information sent is invalid.
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 MEMBER_NOT_FOUND This person isn't a member of the organization anymore.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
404 TEAM_NOT_FOUND This team doesn't exist in this organization.
12 more that every operation can answer (tokens, scopes, limits)
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
403 INTEGRATION_SELECTION_TOO_NARROW This needs access to every workspace of the organization. Connect again and pick all workspaces.
413 PAYLOAD_TOO_LARGE This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key.
415 UNSUPPORTED_MEDIA_TYPE This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

One member

curl
curl -X PUT "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/members" \
  -H "Authorization: Bearer beplan_pat_…" \
  -H "Content-Type: application/json" \
  -d '{
  "memberIds": [
    "Qe4hT8vN2sLw6KpZ1cXbR"
  ]
}'
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/members", {
  method: "PUT",
  headers: {
    Authorization: "Bearer beplan_pat_…",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "memberIds": [
      "Qe4hT8vN2sLw6KpZ1cXbR"
    ]
  }),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import requests

response = requests.put(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/members",
    headers={"Authorization": "Bearer beplan_pat_…"},
    json={
        "memberIds": [
            "Qe4hT8vN2sLw6KpZ1cXbR",
        ],
    },
)
response.raise_for_status()
data = response.json()["data"]
Response 200
{
  "data": {
    "id": "7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    "name": "Editors",
    "memberCount": 1,
    "memberIds": [
      "Qe4hT8vN2sLw6KpZ1cXbR"
    ],
    "workspaceAccess": "selected",
    "workspaces": [
      {
        "id": "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62",
        "name": "Northwind"
      }
    ],
    "createdAt": "2026-05-06T10:00:00.000Z"
  }
}

Set a team's workspaces

PUT /organizations/{organizationId}/teams/{teamId}/workspaces
Beta Changes data teams.workspaces.set
Scope
members:write
Role permission
Manage the organization (organization:update)
Effect
Changes data in Beplan.
Stability
Beta. May still change before it is marked stable. Since 2026-11-20.

Sets the workspaces a team sees (replacing them): null or [] for every workspace, current and future, or exactly the given ones (ids from GET …/workspaces; one that isn't a workspace of the organization answers 404 WORKSPACE_NOT_FOUND and nothing changes). What the team's members see changes at once. Answers with the team.

Teams decide which workspaces their members see: members below admin only see the workspaces of their teams (owners and admins see every workspace). Teams grant no permission; roles do. Needs the Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED).

Needs a token given all the workspaces of the organization: one narrowed to chosen workspaces answers 403 INTEGRATION_SELECTION_TOO_NARROW, since a team's change affects workspaces the token can't see.

Parameters

Name In Type Description
organizationId required path string 1–128 characters
teamId required path string (uuid)

Request body JSON, required

object · SetTeamWorkspacesBody

  • workspaceIdsarray of string (uuid)requirednullable
    The workspaces the team's members see: null or [] = every workspace, current and future; otherwise exactly these (each a workspace of the organization, from GET …/workspaces).
    at most 500 items

Responses

200 OK

object · OrganizationTeamResponse

  • dataobject · OrganizationTeamrequired
    7fields
    • idstringrequired
      The team's id (a UUID).
    • namestringrequired
    • memberCountnumberrequired
      How many members are in the team.
    • memberIdsarray of stringrequired
      The team's members, by membership id (the id of GET …/members, not the user id).
    • workspaceAccessstringrequired
      all: the team's members see every workspace, current and future. selected: only the workspaces in workspaces. Owners and admins see every workspace whatever their teams.
      One of: all, selected
    • workspacesarray of objectrequired
      The workspaces of a selected team (empty for all). Through the public API, only the workspaces the token was given are listed.
      2fields in each item
      • idstringrequired
      • namestringrequired
    • createdAtstringrequired
      When the team was created, ISO 8601 in UTC.

Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 413, 415, 429, 500.

Error codes

Status Code Message
400 VALIDATION_FAILED Some of the information sent is invalid.
402 PLAN_UPGRADE_REQUIRED Your current plan doesn't include this feature.
403 MISSING_PERMISSION You don't have permission to do this.
404 ORGANIZATION_NOT_FOUND This organization doesn't exist or you're not a member of it.
404 TEAM_NOT_FOUND This team doesn't exist in this organization.
404 WORKSPACE_NOT_FOUND This workspace doesn't exist or you don't have access to it.
12 more that every operation can answer (tokens, scopes, limits)
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
403 INTEGRATION_BLOCKED_BY_ORGANIZATION This organization doesn't allow this integration. Ask an admin of the organization.
403 INTEGRATION_PENDING_APPROVAL An admin of this organization needs to approve this connection first.
403 INTEGRATION_SELECTION_TOO_NARROW This needs access to every workspace of the organization. Connect again and pick all workspaces.
413 PAYLOAD_TOO_LARGE This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key.
415 UNSUPPORTED_MEDIA_TYPE This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

Only one workspace

curl
curl -X PUT "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/workspaces" \
  -H "Authorization: Bearer beplan_pat_…" \
  -H "Content-Type: application/json" \
  -d '{
  "workspaceIds": [
    "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62"
  ]
}'
TypeScript
const response = await fetch("https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/workspaces", {
  method: "PUT",
  headers: {
    Authorization: "Bearer beplan_pat_…",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "workspaceIds": [
      "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62"
    ]
  }),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import requests

response = requests.put(
    "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/teams/7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35/workspaces",
    headers={"Authorization": "Bearer beplan_pat_…"},
    json={
        "workspaceIds": [
            "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62",
        ],
    },
)
response.raise_for_status()
data = response.json()["data"]
Response 200
{
  "data": {
    "id": "7a3e9c21-5b8d-4f60-9e2a-1c4d7b8f0e35",
    "name": "Editors",
    "memberCount": 1,
    "memberIds": [
      "Qe4hT8vN2sLw6KpZ1cXbR"
    ],
    "workspaceAccess": "selected",
    "workspaces": [
      {
        "id": "3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62",
        "name": "Northwind"
      }
    ],
    "createdAt": "2026-05-06T10:00:00.000Z"
  }
}