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
| Field | Required | Type | Description |
|---|---|---|---|
| name | Yes | string | Human-readable schema name. |
| slug | Yes | string | Unique identifier (lowercase, hyphens only). |
| definition | Yes | object | JSON Schema defining the expected LLM output structure. |
| system_prompt | No | string | Custom system prompt for this schema. |
| safe_fallback | No | object | Value returned when all providers fail. |
| memory_enabled | No | boolean | Enable per-end-user conversation memory. |
| memory_window | No | number | Prior turns included in context (default: 10). |
| fallback_providers | No | string[] | Ordered fallback provider list. |
| quality_criteria | No | string | Natural-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
| Status | Cause |
|---|---|
400 | Missing required field (name, slug, or definition). |
401 | Missing or invalid X-Reliant-Key. |
404 | Schema ID not found. |