API Documentation

Schema endpoints

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

Schemas · List

List account schemas

Endpoint

GEThttps://claix.dev/api/schemas

This endpoint returns every schema attached to the API key, including the full definition. It is read-only: it does not process files.

Always call https://claix.dev/api/schemas.

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.

This call is free: it is not billed and does not consume your extraction quota.

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

  1. Have your server API key ready.
  2. Send a GET to https://claix.dev/api/schemas.
  3. Add the authentication header.
  4. 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,
      "window_context": false,
      "window_time": null,
      "cita_por_campo": false,
      "created_at": "2026-08-17T13:10:00.000Z"
    }
  ]
}
FieldTypeDescription
successbooleanAlways true when HTTP is 200.
total_schemasnumberNumber of schemas returned.
schemasarrayAccount schema list.
schemas[].iduuidSchema identifier.
schemas[].namestringVisible schema name.
schemas[].typestringexcel-json, json-excel, pdf-json, doc-json, img-json, txt-json, or audio-json.
schemas[].schema_definitionobjectFields to extract: each key has type and description.
schemas[].is_agent_modebooleanIf true, the schema can be used with /agent/*-json.
schemas[].agent_definitionobject | nullAgent mode parameters (when enabled).
schemas[].resumen_agentstring | nullOptional instruction for the agent phase.
schemas[].window_contextbooleanIf true, extractions persist a queryable document_id.
schemas[].cita_por_campobooleanIf source verification is enabled, extraction and Agent mode return each field as { value, source }.
schemas[].created_atdatetimeISO 8601 creation timestamp.

6. Error codes

{
  "error": "Descripción legible del problema.",
  "detalle": "Información técnica adicional (solo presente en algunos casos).",
  "log_id": "7c2e1a90-4b3d-4f8a-9e21-6d5c8b0a1f34"
}

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

405 — Method other than GET. · 500 — Internal error.

7. Status code summary

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

8. Best practices

  • Always use the public domain claix.dev.
  • Store each schema id for 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.

Request examples

curl -X GET "https://claix.dev/api/schemas" \
  -H "x-api-key: <TU_API_KEY>"