API Reference

Create & Delete Schema

Create new schemas or permanently delete existing ones via API Key.


GET/api/schemas

Lists all schemas in the project.

http
GET /api/schemas X-Reliant-Key: rel_your_api_key
json — 200 OK
{ "schemas": [ { "id": "sch_...", "name": "Lead Scoring", "slug": "lead-scoring", "version": 2, "created_at": "2026-08-05T03:00:00Z" } ] }

GET/api/schemas/:id

Returns full details of a single schema including definition, system prompt, and settings.

http
GET /api/schemas/:id X-Reliant-Key: rel_your_api_key

POST/api/schemas

Creates a new schema. The Railway backend automatically sets version to 1.

Authentication

http
POST /api/schemas X-Reliant-Key: rel_your_api_key Content-Type: application/json

Body

FieldRequiredTypeDescription
nameYesstringHuman-readable schema name.
slugYesstringUnique identifier (lowercase, hyphens only).
definitionYesobjectJSON Schema defining the expected LLM output structure.
system_promptNostringCustom system prompt for this schema.
safe_fallbackNoobjectValue returned when all providers fail.
memory_enabledNobooleanEnable per-end-user conversation memory.
memory_windowNonumberPrior turns included in context (default: 10).
fallback_providersNostring[]Ordered fallback provider list.
quality_criteriaNostringNatural-language criteria for the LLM quality judge.

Example

json — body
{ "name": "Lead Scoring", "slug": "lead-scoring", "definition": { "type": "object", "required": ["score", "reason"], "properties": { "score": { "type": "number" }, "reason": { "type": "string" } } }, "safe_fallback": { "score": 0, "reason": "Unable to evaluate" }, "memory_enabled": false }
json — 201 Created
{ "id": "sch_...", "name": "Lead Scoring", "slug": "lead-scoring", "version": 1, "created_at": "2026-08-05T03:00:00Z" }

DELETE/api/schemas/:id

Soft-deletes a schema by ID. Existing executions referencing this schema are preserved.

http
DELETE /api/schemas/:id X-Reliant-Key: rel_your_api_key
json — 200 OK
{ "success": true }

Error responses

StatusCause
400Missing required field (name, slug, or definition).
401Missing or invalid X-Reliant-Key.
404Schema ID not found.