# Remove thread from space Remove a thread's association with a space and clean up its embedded vectors. Remove a thread from a space. The thread's embedded message vectors are cleaned up from the space's dedicated vector store. The thread itself is not deleted. Requires edit access to the space. #### Path Parameters **`space_id`** string required The unique identifier of the space. **`thread_id`** string required The unique identifier of the thread to remove. ## Returns No content (204). Request ```bash cURL curl -X DELETE "https://api.aitronos.com/v1/spaces/space_abc123/threads/thrd_def456" \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python Python import os import requests api_key = os.environ["FREDDY_API_KEY"] response = requests.delete( "https://api.aitronos.com/v1/spaces/space_abc123/threads/thrd_def456", headers={"X-API-Key": api_key}, ) print(response.status_code) # 204 ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/spaces/space_abc123/threads/thrd_def456", { method: "DELETE", headers: { "X-API-Key": apiKey }, } ); console.log(response.status); // 204 ``` Response ```json 204 No Content // No response body ``` ```json 404 Not Found { "success": false, "error": { "code": "RESOURCE_NOT_FOUND", "message": "The requested resource could not be found.", "system_message": "Space not found", "type": "client_error", "status": 404, "details": { "space_id": "space_invalid" }, "trace_id": "abc-123-def", "timestamp": "2026-02-26T10:30:00Z" } } ``` ```json 403 Forbidden { "success": false, "error": { "code": "INSUFFICIENT_PERMISSIONS", "message": "You don't have permission to perform this action.", "system_message": "Edit access required", "type": "client_error", "status": 403, "details": { "space_id": "space_abc123" }, "trace_id": "abc-123-def", "timestamp": "2026-02-26T10:30:00Z" } } ``` ## Related Resources - [Add Thread to Space](/docs/api-reference/spaces/add-thread) - [List Space Threads](/docs/api-reference/spaces/list-threads) - [Create Space](/docs/api-reference/spaces/create) - [Delete Space](/docs/api-reference/spaces/delete)