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.
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 |
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 |