API Documentation

Schema endpoints

List, create, and delete schemas in your account with the same API key used for extraction.

Schemas · Delete

Delete a schema via API

Endpoint

POSThttps://www.claix.dev/api/delete-schema

Deletes a schema from the API key account. Only schemas you own are removed: if the UUID is missing or belongs to another account, the response is 404 without revealing whether it exists.

Always call https://www.claix.dev/api/delete-schema. Do not use the internal Supabase URL (https://yuhcusjiywsuzjwirarw.supabase.co/functions/v1/delete-schema).

The operation is irreversible. It is not billed (no usage_logs row).

1. Authentication

Every request must include your API key. It is a personal server credential, distinct from any 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 sufficient. If you send both, x-api-key takes priority.

The system checks that the key exists, is active, and the account is not suspended. Failure returns 401.

2. Request format

Method: POST (DELETE is also accepted) · Content-Type: application/json

FieldTypeRequiredDescription
schema_iduuidYesSchema to delete. id is also accepted, or ?schema_id= as a query param.
{ "schema_id": "b980cfe7-61ef-4a5a-9724-881c8a5541e2" }

3. How to build the call

  1. Get the id from GET /api/schemas.
  2. Send a JSON POST to https://www.claix.dev/api/delete-schema.
  3. Add the authentication header and schema_id.
  4. Check the HTTP status: only 200 means it was deleted.

4. Request examples

Use the panel on the right for cURL, JavaScript, Node.js, Python, PHP, and n8n examples.

5. Successful response

200 OK · Content-Type: application/json

{
  "success": true,
  "deleted": true,
  "id": "b980cfe7-61ef-4a5a-9724-881c8a5541e2"
}
FieldTypeDescription
successbooleanAlways true when HTTP is 200.
deletedbooleanConfirms the schema was removed.
iduuidUUID of the deleted schema.

6. Error codes

{
  "error": "Descripción legible del problema.",
  "detalle": "Información técnica adicional (solo presente en algunos casos)."
}

400 — Missing schema_id or not a valid UUID.

401 — Authentication failed: missing, unknown, or disabled key, or suspended account.

404 — The schema does not exist or does not belong to your account.

405 — Method other than POST or DELETE. · 500 — Internal error.

7. Status code summary

CodeCategoryRetry?
200Success
400Client error (malformed data)No — fix the request first
401Authentication errorNo — fix credentials first
404Resource not foundNo — fix schema_id first
405Incorrect HTTP methodNo — fix the method first
500Internal server errorYes, with caution

8. Best practices

  • Use https://www.claix.dev/api/delete-schema, never the Supabase URL.
  • Deletion is permanent; confirm the UUID before calling.
  • A 404 does not distinguish “missing” from “not yours”, on purpose.
  • Never put your API key in frontend code or public repos.

Request examples

curl -X POST "https://www.claix.dev/api/delete-schema" \
  -H "x-api-key: <TU_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "schema_id": "b980cfe7-61ef-4a5a-9724-881c8a5541e2" }'