Workspaces
List, create, update and delete workspaces with the Platform API.
A workspace groups apps together. Every account has at least one, and one of them is always the default.
List workspaces#
GET
/workspacesworkspaces:readReturns every workspace the key can see. A key that is limited to one workspace gets only that one.
| Query | Type | Notes |
|---|---|---|
counts | boolean | Include the number of apps in each workspace. Off by default because it costs one query per workspace. |
curl "https://apipublic.yeshbe.com/api/platform/v1/workspaces?counts=true" \ -H "Authorization: Bearer $YESHBE_KEY"const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/workspaces?counts=true", { headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}` } }); const { success, data, error } = await res.json();import os, requests res = requests.get( "https://apipublic.yeshbe.com/api/platform/v1/workspaces?counts=true", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, ) payload = res.json(){"success":true,"data":{"items":[{"id":12,"name":"Production","description":"","color":"#2e8b57","is_default":true,"apps_count":4,"created_at":"2026-01-14T09:22:00"}],"total":1}}Get a workspace#
GET
/workspaces/{id}workspaces:readAlways includes the app count.
curl "https://apipublic.yeshbe.com/api/platform/v1/workspaces/12" \ -H "Authorization: Bearer $YESHBE_KEY"const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/workspaces/12", { headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}` } }); const { success, data, error } = await res.json();import os, requests res = requests.get( "https://apipublic.yeshbe.com/api/platform/v1/workspaces/12", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, ) payload = res.json(){"success":true,"data":{"id":12,"name":"Production","description":"","color":"#2e8b57","is_default":true,"apps_count":4}}Create a workspace#
POST
/workspacesworkspaces:writeA key that is limited to a single workspace can't create new ones.
| Body | Type | Notes |
|---|---|---|
name | string | Required. Up to 200 characters. |
description | string | |
color | string | Hex, for example #2e8b57. |
is_default | boolean | Makes this the default and clears the flag from the previous one. |
curl -X POST "https://apipublic.yeshbe.com/api/platform/v1/workspaces" \ -H "Authorization: Bearer $YESHBE_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"Staging","color":"#3b6fb8"}'const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/workspaces", { method: "POST", headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "name": "Staging", "color": "#3b6fb8" }) }); const { success, data, error } = await res.json();import os, requests res = requests.post( "https://apipublic.yeshbe.com/api/platform/v1/workspaces", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, json={"name": "Staging", "color": "#3b6fb8"}, ) payload = res.json(){"success":true,"data":{"id":19,"name":"Staging","color":"#3b6fb8","is_default":false}}Update a workspace#
PATCH
/workspaces/{id}workspaces:writePartial. Fields you leave out keep their current value.
| Body | Type | Notes |
|---|---|---|
name | string | |
description | string | |
color | string | |
is_default | boolean | Only true has an effect. To unset a default, make another workspace the default. |
curl -X PATCH "https://apipublic.yeshbe.com/api/platform/v1/workspaces/19" \ -H "Authorization: Bearer $YESHBE_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"Staging EU"}'const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/workspaces/19", { method: "PATCH", headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "name": "Staging EU" }) }); const { success, data, error } = await res.json();import os, requests res = requests.patch( "https://apipublic.yeshbe.com/api/platform/v1/workspaces/19", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, json={"name": "Staging EU"}, ) payload = res.json(){"success":true,"data":{"id":19,"name":"Staging EU","is_default":false}}Delete a workspace#
DELETE
/workspaces/{id}workspaces:writeRefused with 409 if the workspace is the default, if it is the last one, or if it still holds apps. Move the apps first with Move an app.
curl -X DELETE "https://apipublic.yeshbe.com/api/platform/v1/workspaces/19" \ -H "Authorization: Bearer $YESHBE_KEY"const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/workspaces/19", { method: "DELETE", headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}` } }); const { success, data, error } = await res.json();import os, requests res = requests.delete( "https://apipublic.yeshbe.com/api/platform/v1/workspaces/19", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, ) payload = res.json(){"success":true,"data":{"id":19,"deleted":true}}