JsonFabrica

API Reference

Public entry point for the JsonFabrica JSON-generation platform. All `/v1/*` routes require an API key sent as `Authorization: Bearer <api-key>`. The gateway resolves the key to a tenant/role via svc-auth and forwards the request to the appropriate internal microservice, injecting trusted `X-Tenant-Id`/`X-Role` headers downstream (callers never set those themselves). `/health` is unauthenticated.

Base URL

Base URL

The spec's local/development base URL is http://localhost:4000. A hosted production API endpoint is not yet publicly available — check back once it's announced, or run the gateway yourself per the repo's self-hosting instructions and replace the base URL with your deployment's gateway URL.

Authentication

All /v1/* routes require an API key sent as an Authorization header, except the public Billing signup/webhook routes noted on their own page:

Authorization: Bearer <api-key>

The gateway resolves the key to a tenant/role via the internal auth service and forwards the request to the appropriate microservice, injecting trusted X-Tenant-Id / X-Role headers downstream — callers never set those headers themselves. GET /health is unauthenticated.

Error envelope

Every error response — across every endpoint — uses the same shape:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "\"name\" is required",
    "details": { "field": "name" }
  }
}
FieldTypeDescription
error.errorobject

Standard error codes

CodeMeaning
UNAUTHORIZEDMissing, malformed, or invalid API key.
FORBIDDENAuthenticated, but the caller lacks the required role (e.g. non-admin calling an Admin route).
NOT_FOUNDThe requested resource (template, sequence, batch, ...) does not exist.
VALIDATION_ERRORThe request body is missing a required field or fails basic validation.

Individual endpoints also use more specific codes for their own failure modes (e.g. NO_PLACEHOLDERS, UNKNOWN_FUNCTION, GENERATION_FAILED on Templates) — see each endpoint group's page.

Endpoint groups