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/workspaces

List all workspaces in your organization.

Query Parameters

FieldTypeRequiredDescription
limitintegerNoNumber of workspaces to return, default 50, max 100
offsetintegerNoNumber of workspaces to skip for pagination
includeSuspendedbooleanNoInclude 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/workspaces

Create a new workspace.

Request Body

FieldTypeRequiredDescription
namestringYesWorkspace name
slugstringYesURL-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

StatusCodeDescription
400VALIDATION_ERRORInvalid or missing name/slug
403QUOTA_EXCEEDEDWorkspace limit reached for your plan
409DUPLICATEWorkspace slug already exists

Get Workspace

GET/api/v1/workspaces/:id

Retrieve a specific workspace.

Path Parameters

FieldTypeDescription
idstring (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

StatusCodeDescription
404NOT_FOUNDWorkspace not found

Update Workspace

PATCH/api/v1/workspaces/:id

Update a workspace name or slug.

Path Parameters

FieldTypeDescription
idstring (uuid)Workspace ID

Request Body

FieldTypeRequiredDescription
namestringNoNew workspace name
slugstringNoNew 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

StatusCodeDescription
400VALIDATION_ERRORInvalid name or slug
400NO_UPDATESNo fields provided
403SCOPE_DENIEDAPI key does not have access to this workspace
404NOT_FOUNDWorkspace not found
409DUPLICATEWorkspace slug already exists

Delete Workspace

DELETE/api/v1/workspaces/:id

Delete a workspace and all associated resources.

Path Parameters

FieldTypeDescription
idstring (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

StatusCodeDescription
404NOT_FOUNDWorkspace not found