API Reference - Programmatic Access

Instant JSON Validation and Transformation

View Endpoints See Code Examples

REST Endpoints

Interact with JSONForge’s core engine through three primary endpoints. All requests require HTTPS and return standardized JSON responses with HTTP status codes.

POST /validate

Schema Validation

Submit raw payloads against JSON Schema Draft-2020-12 or custom Zod/Pydantic schemas. Returns detailed error paths, severity ratings, and fix suggestions. Rate limit: 120 requests/minute per API key.

POST /transform

Data Transformation

Apply JQ-style filters, JSONata expressions, or custom mapping templates. Supports batch processing up to 50MB per payload. Rate limit: 60 requests/minute per API key.

GET /schemas/:id

Schema Retrieval

Fetch published validation schemas by UUID. Includes version history, last-modified timestamps, and usage metrics. Rate limit: 300 requests/minute per API key.

Authentication & Rate Limits

Secure your integration using Bearer tokens or API keys. All keys are scoped to specific projects and can be rotated without downtime.

Include your credential in the Authorization header: Bearer jf_live_sk_8f3a9c2d1e4b5f6a7c8d9e0f1a2b3c4d. For server-to-server workflows, use the X-API-Key header instead. Failed authentication returns 401 Unauthorized with a retry-after header. Exceeding rate limits triggers 429 Too Many Requests with exponential backoff recommendations. Enterprise plans support dedicated IP allowlisting and custom quota overrides up to 10,000 RPM.

Implementation Examples

Copy-paste ready snippets for Python and JavaScript. Both examples demonstrate schema validation with error handling.

Python (requests)

import requests
payload = {"order_id": 8842, "items": [{"sku": "WD-4402", "qty": 3}]}
headers = {"Authorization": "Bearer jf_live_sk_8f3a9c...", "Content-Type": "application/json"}
res = requests.post("https://api.jsonforge.tech/v1/validate", json=payload, headers=headers)
if res.status_code == 200:
  print("Valid:", res.json()["compliant"])
else:
  print("Errors:", res.json()["violations"])

JavaScript (fetch)

const payload = { order_id: 8842, items: [{ sku: "WD-4402", qty: 3 }] };
const response = await fetch("https://api.jsonforge.tech/v1/validate", {
  method: "POST",
  headers: { "Authorization": "Bearer jf_live_sk_8f3a9c...", "Content-Type": "application/json" },
  body: JSON.stringify(payload)
});
const data = await response.json();
console.log(data.compliant ? "Payload accepted" : data.violations);