Schemas
Getting Started with Ontopix Schemas
What are Ontopix Schemas?
Ontopix Schemas are JSON Schema (Draft-07) definitions that provide standardized data contracts across Ontopix services. Each schema includes:
- Strict validation (
additionalProperties: false) - Self-description (
schema_typeandschema_versionfields) - Views -- Named projections for presenting data in different formats
Using the SDK (recommended)
Python
pip install ontopix-schemas
from ontopix_schemas import SchemaInstance
instance = SchemaInstance({
"schema_type": "customer-interaction",
"schema_version": "v1.0-beta1",
"id": "int-12345",
"source": {"media": "text", "channel": "email", "synchronicity": "asynchronous"},
"time": {"start": "2026-01-28T10:30:00Z"},
"participants": [{"id": "cust-001", "role": "customer"}],
"events": [{
"id": "evt-001", "type": "message", "participant_id": "cust-001",
"time_offset": {"start": 0.0}, "content": {"text": "I need help"}
}]
})
print(instance.view("one-liner"))
print(instance.view("summary", format="markdown"))
print(instance.view("full", format="json"))
TypeScript
npm install @ontopix/schemas
import { SchemaInstance } from '@ontopix/schemas';
const instance = new SchemaInstance({
schema_type: "customer-interaction",
schema_version: "v1.0-beta1",
// ...
});
console.log(instance.view("summary"));
Direct Schema Validation
Use the JSON Schema files directly with any validator:
import requests
from jsonschema import validate
schema = requests.get(
"https://schemas.platform.ontopix.ai/customer-interaction/v1.0-beta1.json"
).json()
validate(instance=your_data, schema=schema)
Schema URLs
https://schemas.platform.ontopix.ai/{schema-name}/{version}.json
https://schemas.platform.ontopix.ai/{schema-name}/{version}.views.json
Next Steps
- Browse Schemas Reference for available schemas
- Read the Schema Views Specification to understand views
- Check SDK documentation for Python and TypeScript guides