Moonborn — API · workspaces
Update workspace name / slug
PATCH/v1/workspaces/{id}scope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Workspace id (cuid). |
Request body
| Field | Type | Description |
|---|---|---|
| name | string | |
| slug | string |
Responses
200OK
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| orgIdreq | string | |
| slugreq | string | |
| namereq | string | |
| createdAtreq | string |
404Workspace not found
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X PATCH https://api.moonborn.co/v1/workspaces/<id> \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "<string>",
"slug": "<string>"
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.workspaces.updateWorkspace({
id: '<id>',
name: "<string>",
slug: "<string>",
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.workspaces.update_workspace(
id="<id>",
name="<string>",
slug="<string>",
)