# Update knowledge slice Update the name or description of a knowledge slice. Partially updates a knowledge slice. Only the provided fields will be modified. 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 knowledge slice (format: `kslice_*`). #### Request Body **`name`** string optional The updated name of the knowledge slice (1-255 characters). **`description`** string optional The updated description of the knowledge slice. ## Returns The updated knowledge slice object. Request ```bash cURL curl -X PATCH https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/slices/kslice_abc123 \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Product Docs", "description": "Revised product documentation" }' ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.knowledge.update_slice( organization_id="org_xyz789", slice_id="kslice_abc123", name="Updated Product Docs", description="Revised product documentation", ) print(result) ``` ```python Python import requests org_id = "org_xyz789" slice_id = "kslice_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/slices/{slice_id}" headers = { "Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json", } data = { "name": "Updated Product Docs", "description": "Revised product documentation", } response = requests.patch(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript const orgId = "org_xyz789"; const sliceId = "kslice_abc123"; const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/knowledge/slices/${sliceId}`, { method: "PATCH", headers: { "Authorization": `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify({ name: "Updated Product Docs", description: "Revised product documentation", }), } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "id": "kslice_abc123", "name": "Updated Product Docs", "description": "Revised product documentation", "type": "standard", "is_composite": false, "owner_type": "organization", "owner_id": "org_xyz789", "status": "active", "member_slice_ids": [], "store_count": 3, "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 Slices](/docs/api-reference/knowledge/list-slices) - [Get Slice](/docs/api-reference/knowledge/get-slice) - [Create Slice](/docs/api-reference/knowledge/create-slice) - [Archive Slice](/docs/api-reference/knowledge/archive-slice) - [Unarchive Slice](/docs/api-reference/knowledge/unarchive-slice)