Schema Validate API

Checks every record against a declared schema (per-field type and required flag) and splits the set into valid and invalid records with per-record reasons. Deterministic; no data is mutated.

What it does

Validate records against a declared field schema.

When to use it

Reach for Schema Validate when you need to answer: Do these records conform to my expected schema? It sits in the Detect stage of the catalog — surface anomalies and revenue exposure.

Endpoint & cost

POST /api/v1/schema-validate

Cost: Per credit. Zaps draw down your shared monthly allowance; requests that fail validation are not charged.

Authentication

Send your key as a bearer token: Authorization: Bearer zap_live_…. See Authentication for key management and the alternate header.

Example request

curl https://zapinner.com/api/v1/schema-validate \
  -H "Authorization: Bearer zap_live_••••••" \
  -H "Content-Type: application/json" \
  -d '{"data":[{"email":"a@b.com","age":30},{"email":"nope","age":"x"}],"options":{"schema":{"email":{"type":"email","required":true},"age":{"type":"integer"}}}}'
Every response is structured JSON and includes a request_id. Full field-level request and response schemas for this endpoint live in the OpenAPI spec and the API reference.

Errors & limits

Errors use one consistent shape ( error.code, error.message, request_id). See Errors and Rate limits.

SDK

Schema Validate has typed methods in both the JavaScript and Python SDKs. Both are implemented and package-ready but not yet published to npm / PyPI — until they ship, vendor the package source or install from a git ref, or call the endpoint over HTTPS with the example above.

Try it

Select Schema Validate in the playground to see the request, or run it live with your API key.

  • Anomaly Detection Flag values that look unusual against the rest of the dataset.
  • Revenue Leakage Analyze orders, invoices, and payments for revenue leakage and exposure.
  • Completeness Report per-field fill rate and an overall completeness score.
  • Consistency Report each column's dominant type and how much data agrees.
  • Data Quality A composite 0-100 quality score with an explainable breakdown.
  • Drift Compare a baseline to current data and report per-field drift.
  • Change Detect A keyed diff: added, removed, changed, and unchanged records.
  • Schema Diff Compare inferred schemas of two record sets.
  • Validate Email Syntax + structural email validation with normalization.
  • PII Detect Locate PII without ever echoing the sensitive values.