Schemas · List
List account schemas
Endpoint
https://www.claix.dev/api/schemasThis endpoint returns every schema attached to the API key, including the full definition. It is read-only: it does not process files and does not write to usage_logs.
Always call https://www.claix.dev/api/schemas. Do not use the internal Supabase URL (/functions/v1/...).
It is intended for server-to-server integrations (backends, scripts, n8n/Make). Do not call it from an end-user browser because it requires a secret API key.
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.
Before returning data, the system validates that:
- The API key exists and is active.
- The associated account is active (not suspended).
If validation fails, the request is rejected with 401.
2. Request format
Method: GET · Body: none · Query params: none
Do not send schema_id or filters: the response includes every schema in the account, newest first.
3. How to build the call
- Have your server API key ready.
- Send a GET to
https://www.claix.dev/api/schemas. - Add the authentication header.
- Check the HTTP status: only 200 means success.
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,
"total_schemas": 2,
"schemas": [
{
"id": "b980cfe7-61ef-4a5a-9724-881c8a5541e2",
"name": "DNI cliente",
"type": "img-json",
"schema_definition": {
"nombre_dni": {
"type": "string",
"description": "nombre de la persona del dni"
},
"numero_dni": {
"type": "string",
"description": "numero de dni"
}
},
"is_agent_mode": true,
"agent_definition": {
"es_mayor_edad": {
"type": "boolean",
"description": "Es mayor de edad actualmente la persona del dni?"
}
},
"resumen_agent": null,
"created_at": "2026-08-17T13:10:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
| success | boolean | Always true when HTTP is 200. |
| total_schemas | number | Number of schemas returned. |
| schemas | array | Account schema list. |
| schemas[].id | uuid | Schema identifier. |
| schemas[].name | string | Visible schema name. |
| schemas[].type | string | excel-json, json-excel, pdf-json, doc-json, or img-json. |
| schemas[].schema_definition | object | Fields to extract: each key has type and description. |
| schemas[].is_agent_mode | boolean | If true, the schema can be used with /agent/*-json. |
| schemas[].agent_definition | object | null | Agent mode parameters (when enabled). |
| schemas[].resumen_agent | string | null | Optional instruction for the agent phase. |
| schemas[].created_at | datetime | ISO 8601 creation timestamp. |
6. Error codes
{
"error": "Descripción legible del problema.",
"detalle": "Información técnica adicional (solo presente en algunos casos)."
}401 — Authentication failed: missing, unknown, or disabled key, or suspended account.
405 — Method other than GET. · 500 — Internal error.
7. Status code summary
| Code | Category | Retry? |
|---|---|---|
| 200 | Success | — |
| 400 | Client error (malformed data) | No — fix the request first |
| 401 | Authentication error | No — fix credentials first |
| 405 | Incorrect HTTP method | No — fix the method first |
| 500 | Internal server error | Yes, with caution |
8. Best practices
- Always use the public domain
www.claix.dev, not the Supabase Edge Function URL. - Store each schema
idfor extraction calls or/api/delete-schema. - This GET is not billed; you can sync catalogs freely.
- Never put your API key in frontend code or public repos.