# Update composite slice Update a composite slice's name, description, or member slices. Partially updates a composite slice. You can change its metadata or replace its member slice list entirely. Requires the `MANAGE_KNOWLEDGE_SLICES` capability. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). **`slice_id`** string required The unique identifier of the composite slice (format: `kslice_*`). #### Request Body **`name`** string optional The updated name of the composite slice (1-255 characters). **`description`** string optional The updated description of the composite slice. **`member_slice_ids`** array of strings optional Replacement list of knowledge slice IDs. When provided, the entire member list is replaced. ## Returns The updated composite slice object. Request ```bash cURL curl -X PATCH https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/composites/kslice_comp789 \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Engineering Knowledge", "member_slice_ids": ["kslice_abc123", "kslice_def456", "kslice_ghi789"] }' ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.knowledge.update_composite( organization_id="org_xyz789", slice_id="kslice_comp789", name="Updated Engineering Knowledge", member_slice_ids=["kslice_abc123", "kslice_def456", "kslice_ghi789"], ) print(result) ``` ```python Python import requests org_id = "org_xyz789" slice_id = "kslice_comp789" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/composites/{slice_id}" headers = { "Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json", } data = { "name": "Updated Engineering Knowledge", "member_slice_ids": ["kslice_abc123", "kslice_def456", "kslice_ghi789"], } response = requests.patch(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript const orgId = "org_xyz789"; const sliceId = "kslice_comp789"; const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/knowledge/composites/${sliceId}`, { method: "PATCH", headers: { "Authorization": `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Updated Engineering Knowledge", member_slice_ids: ["kslice_abc123", "kslice_def456", "kslice_ghi789"], }), } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "id": "kslice_comp789", "name": "Updated Engineering Knowledge", "description": "Combines backend and frontend docs", "type": "standard", "is_composite": true, "owner_type": "organization", "owner_id": "org_xyz789", "status": "active", "member_slice_ids": ["kslice_abc123", "kslice_def456", "kslice_ghi789"], "store_count": 0, "organization_id": "org_xyz789", "created_by": "usr_owner1", "created_at": "2025-06-15T10:00:00Z", "updated_at": "2025-06-20T14:30:00Z", "archived_at": null, "archived_by": null } ``` ```json 404 Error { "success": false, "error": { "code": "KNOWLEDGE_SLICE_NOT_FOUND", "message": "The requested knowledge slice could not be found.", "system_message": "Knowledge slice not found", "type": "client_error", "status": 404, "details": { "slice_id": "kslice_invalid" }, "trace_id": "abc-123-def", "timestamp": "2025-11-02T08:21:45Z" } } ``` ## Related Resources - [List Composites](/docs/api-reference/knowledge/list-composites) - [Create Composite](/docs/api-reference/knowledge/create-composite) - [List Slices](/docs/api-reference/knowledge/list-slices)