# Archive knowledge slice Archive a knowledge slice to mark it as inactive. Archives the specified knowledge slice. Archived slices are excluded from default listing queries. 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_*`). ## Returns The archived knowledge slice object with `archived_at` and `archived_by` populated. Request ```bash cURL curl -X POST https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/slices/kslice_abc123/archive \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.knowledge.archive_slice( organization_id="org_xyz789", slice_id="kslice_abc123", ) 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}/archive" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.post(url, headers=headers) 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}/archive`, { method: "POST", headers: { "Authorization": `Bearer ${accessToken}` }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "id": "kslice_abc123", "name": "Product Documentation", "description": "All product-related knowledge", "type": "standard", "is_composite": false, "owner_type": "organization", "owner_id": "org_xyz789", "status": "archived", "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": "2025-07-01T09:00:00Z", "archived_by": "usr_owner1" } ``` ```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) - [Update Slice](/docs/api-reference/knowledge/update-slice) - [Unarchive Slice](/docs/api-reference/knowledge/unarchive-slice)