Context window

Context window

Ask questions about a persisted document after extraction with window_context enabled.

Context Window · Delete space

Delete a knowledge space

Endpoint

DELETEhttps://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

ParameterLocationRequiredDescription
space_idURL pathYesUUID of the space returned by POST /create-space.

Expected URL format: /delete-space/{space_id}

3. Building the call

  1. Get the space_id from the original create call or from your own store.
  2. Replace {space_id} in the URL with that UUID.
  3. Send DELETE with your API key in x-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

CodeCategoryRetry?
200Success — space deleted
400Client error (space_id missing or malformed)No — fix the request first
401Authentication errorNo — fix credentials first
404Space not found, foreign, or already deletedNo — fix the space_id first
405Incorrect HTTP methodNo — use DELETE
500Internal server errorYes, with caution

8. Best practices

  • Always use the public claix.dev domain, 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.

Request examples

curl -X DELETE "https://claix.dev/delete-space/5b9e2c14-7d3a-4f8b-9e1c-6a0d4b8f2e7c" \
  -H "x-api-key: <TU_API_KEY>"