# Manage workspaces Create, retrieve, update, and delete connector workspaces for an organization. ## List workspaces Returns all connector workspaces. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). ## Get workspace Retrieve a single workspace by ID. #### Path Parameters **`organization_id`** string required The unique identifier of the organization. **`workspace_id`** string required The connector workspace ID. ## Create workspace Create a new connector workspace. #### Request Body **`name`** string required Human-readable workspace name. ## Update workspace Update workspace properties. #### Request Body **`name`** string optional Updated workspace name. ## Delete workspace Permanently delete a workspace. Returns 204 No Content on success. ## Set OAuth credentials Set OAuth credentials on a workspace for use by sources that require OAuth. #### Request Body **`actor_type`** string required The actor type (e.g., `workspace`). **`name`** string required Credential name. **`configuration`** object required OAuth configuration blob containing client_id, client_secret, etc. ## Returns A workspace object containing `workspace_id`, `name`, and `data_residency`. Request ```bash cURL curl "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/workspaces" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") # List workspaces workspaces = client.knowledge_connectors.list_workspaces( organization_id="org_xyz789", ) print(workspaces) ``` ```python Python import requests org_id = "org_xyz789" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/connectors/workspaces" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/workspaces", { headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "data": [ { "workspace_id": "ws_abc123", "name": "Production", "data_residency": "auto" } ] } ``` ```json 4xx Error { "success": false, "error": { "code": "CONNECTOR_WORKSPACE_NOT_FOUND", "message": "The workspace was not found.", "type": "client_error", "status": 404, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-12-22T15:30:00Z" } } ``` ## Related Resources - [Health Check](/docs/api-reference/knowledge-connectors/health) - [Source Definitions](/docs/api-reference/knowledge-connectors/source-definitions) - [Sources](/docs/api-reference/knowledge-connectors/sources)