Context Window · Delete space
Delete a knowledge space
Endpoint
https://claix.dev/delete-space/{space_id}Deletes a knowledge space by space_id. It accepts no body and no query parameters — the identifier is only in the URL path.
The delete only affects a space owned by the same account as the API key. If the UUID does not exist or belongs to someone else, the API returns 404 with the same generic message (the exact reason is not exposed).
Public URL: DELETE https://claix.dev/delete-space/{space_id}
The operation is irreversible. This call is free: it is not billed and does not consume extraction or context-window quota.
1. Authentication
Every request must include your API key. It is a personal server-side credential, different from any user session token.
Option A — Dedicated header (recommended):
x-api-key: <YOUR_API_KEY>
Option B — Standard Authorization header:
Authorization: Bearer <YOUR_API_KEY>
Either one is enough. If you send both, x-api-key wins.
Claix checks that the key exists and is active, and that the account is not suspended. Otherwise it returns 401.
2. Request format
Method: DELETE · Body: not required · Query params: none
| Parameter | Location | Required | Description |
|---|---|---|---|
| space_id | URL path | Yes | UUID of the space returned by POST /create-space. |
Expected URL format: /delete-space/{space_id}
3. Building the call
- Get the
space_idfrom the original create call or from your own store. - Replace
{space_id}in the URL with that UUID. - Send
DELETEwith your API key inx-api-key(no body).
4. Request examples
Use the code panel on the right to copy examples in cURL, JavaScript, Python, and more.
5. Success response format
HTTP 200 — The space was deleted. The response only includes the deleted space_id; there is no success field. If the delete was not possible, the request ends in 404 before a success response is built.
{
"space_id": "5b9e2c14-7d3a-4f8b-9e1c-6a0d4b8f2e7c"
}6. Error codes
{
"error": "Descripción legible del problema.",
"detalle": "Información técnica adicional (solo presente en algunos casos)."
}400 — Missing space_id in the URL, or it is not a valid UUID.
401 — Authentication failed: key missing, unknown, disabled, or account not active.
404 — The space does not exist, belongs to another account, or was already deleted. Same generic message for security.
404 example:
{
"error": "No existe ningún espacio de conocimiento con id '5b9e2c14-7d3a-4f8b-9e1c-6a0d4b8f2e7c'."
}405 — Method other than DELETE. · 500 — Internal error.
7. Code summary
| Code | Category | Retry? |
|---|---|---|
| 200 | Success — space deleted | — |
| 400 | Client error (space_id missing or malformed) | No — fix the request first |
| 401 | Authentication error | No — fix credentials first |
| 404 | Space not found, foreign, or already deleted | No — fix the space_id first |
| 405 | Incorrect HTTP method | No — use DELETE |
| 500 | Internal server error | Yes, with caution |
8. Best practices
- Always use the public
claix.devdomain, not the direct Supabase URL. - Delete the space when the case or client no longer needs cross-document queries. Documents that were grouped still exist on their own: this endpoint does not delete them.
- After deletion,
POST /space-context/{space_id}will return 404. - Never ship your API key in frontend code or public repositories.