Workspaces
Create and manage workspaces within your organization.
Workspaces
Workspaces provide logical grouping for connections, triggers, and other resources within an organization. Use workspaces to separate environments (staging, production) or teams.
List Workspaces
GET
/api/v1/workspacesList all workspaces in your organization.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Number of workspaces to return, default 50, max 100 |
offset | integer | No | Number of workspaces to skip for pagination |
includeSuspended | boolean | No | Include suspended workspaces. Defaults to false |
Response
json
{
"workspaces": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orgId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production",
"slug": "production",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
],
"total": 1
}Example
bash
curl https://api.weavz.io/api/v1/workspaces \
-H "Authorization: Bearer wvz_your_api_key"Create Workspace
POST
/api/v1/workspacesCreate a new workspace.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workspace name |
slug | string | Yes | URL-friendly slug (unique within org) |
Response (201)
json
{
"workspace": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orgId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production",
"slug": "production",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
}Example
bash
curl -X POST https://api.weavz.io/api/v1/workspaces \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Production", "slug": "production"}'Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid or missing name/slug |
403 | QUOTA_EXCEEDED | Workspace limit reached for your plan |
409 | DUPLICATE | Workspace slug already exists |
Get Workspace
GET
/api/v1/workspaces/:idRetrieve a specific workspace.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Workspace ID |
Response
json
{
"workspace": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orgId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production",
"slug": "production",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
}Example
bash
curl https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer wvz_your_api_key"Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | Workspace not found |
Update Workspace
PATCH
/api/v1/workspaces/:idUpdate a workspace name or slug.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Workspace ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New workspace name |
slug | string | No | New workspace slug. Must be lowercase alphanumeric characters and hyphens, start with a letter or number, and be unique within the organization |
Provide at least one field.
Response
json
{
"workspace": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orgId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production EU",
"slug": "production-eu",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z"
}
}Example
bash
curl -X PATCH https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Production EU", "slug": "production-eu"}'Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid name or slug |
400 | NO_UPDATES | No fields provided |
403 | SCOPE_DENIED | API key does not have access to this workspace |
404 | NOT_FOUND | Workspace not found |
409 | DUPLICATE | Workspace slug already exists |
Delete Workspace
DELETE
/api/v1/workspaces/:idDelete a workspace and all associated resources.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Workspace ID |
Response
json
{
"deleted": true,
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Example
bash
curl -X DELETE https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer wvz_your_api_key"Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | Workspace not found |