UploadRequestMetadata
{
"type": "object",
"properties": {
"title": {"type": "string"},
"doc_type": {"type": "string"},
"tags": {"type": "array", "items": {"type": "string"}},
"confidentiality": {"type": "string"},
"business_unit": {"type": "string"},
"effective_date": {"type": "string", "format": "date"},
"expiry_date": {"type": "string", "format": "date"}
},
"required": ["title", "doc_type"]
}
UploadResponse
{
"type": "object",
"properties": {
"upload_id": {"type": "string"},
"status": {"type": "string"},
"message": {"type": "string"}
},
"required": ["upload_id", "status"]
}
UploadStatusEntity
{
"type": "object",
"properties": {
"upload_id": {"type": "string"},
"status": {"type": "string"},
"progress": {"type": "integer", "minimum": 0, "maximum": 100},
"processing_stage": {"type": "string"},
"message": {"type": "string"},
"errors": {"type": "array", "items": {"type": "object"}},
"metadata": {"type": "object"},
"timestamps": {"type": "object"}
},
"required": ["upload_id", "status", "progress", "processing_stage", "metadata"]
}
EventGridActivityRecord
{
"type": "object",
"properties": {
"event_type": {"type": "string"},
"timestamp": {"type": "string", "format": "date-time"},
"upload_id": {"type": "string"},
"status": {"type": "string"},
"details": {"type": "object"}
},
"required": ["event_type", "timestamp", "upload_id", "status"]
}
Schemas
This page provides canonical JSON Schemas for all major request and response formats used by the v2 API endpoints. Use these for validation, integration, or as a reference for building clients and tools.
FlexibleChatRequest
{
"type": "object",
"properties": {
"question": {"type": "string"},
"fetch_args": {"type": "object", "default": {}},
"history": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {"type": "string"},
"content": {"type": "string"},
"sources": {"type": "array", "items": {"type": "object"}, "default": []}
},
"required": ["role", "content"]
},
"default": []
},
"ab_testing": {
"type": "object",
"properties": {
"user_id": {"type": "string"},
"session_id": {"type": "string"},
"experiment_name": {"type": "string"}
}
},
"system_prompt_template": {"type": "string"},
"system_prompt_file": {"type": "string"},
"response_template": {"type": "string"},
"response_template_file": {"type": "string"},
"template_variables": {"type": "object", "default": {}},
"override_config": {"type": "object", "default": {}},
"metadata": {"type": "object", "default": {}}
},
"required": ["question"]
}
FlexibleChatResponse
{
"type": "object",
"properties": {
"response_id": {"type": "string"},
"answer": {"type": "string"},
"metadata": {"type": "array", "items": {"type": "object"}},
"history": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {"type": "string"},
"content": {"type": "string"},
"sources": {"type": "array", "items": {"type": "object"}, "default": []}
},
"required": ["role", "content"]
}
},
"ab_testing": {
"type": "object",
"properties": {
"experiment_name": {"type": "string"},
"variant_name": {"type": "string"},
"session_id": {"type": "string"}
}
},
"errors": {"type": "array", "items": {"type": "object"}},
"data": {"type": "object"},
"template_info": {"type": "object"},
"processing_time": {"type": "number"},
"tokens_used": {"type": "number"},
"response_metadata": {"type": "object"}
},
"required": ["response_id", "answer", "metadata", "history", "template_info", "processing_time", "response_metadata"]
}
FlexibleRagRequest
{
"type": "object",
"properties": {
"question": {"type": "string"},
"fetch_args": {"type": "object", "default": {}},
"history": {"type": "array", "items": {"type": "object"}, "default": []},
"ab_testing": {
"type": "object",
"properties": {
"user_id": {"type": "string"},
"session_id": {"type": "string"},
"experiment_name": {"type": "string"}
}
},
"system_prompt_template": {"type": "string"},
"system_prompt_file": {"type": "string"},
"response_template": {"type": "string"},
"response_template_file": {"type": "string"},
"template_variables": {"type": "object", "default": {}},
"override_config": {"type": "object", "default": {}},
"metadata": {"type": "object", "default": {}}
},
"required": ["question"]
}
FlexibleRagResponse
{
"type": "object",
"properties": {
"response_id": {"type": "string"},
"answer": {"type": "string"},
"metadata": {"type": "array", "items": {"type": "object"}},
"history": {"type": "array", "items": {"type": "object"}},
"ab_testing": {
"type": "object",
"properties": {
"experiment_name": {"type": "string"},
"variant_name": {"type": "string"},
"session_id": {"type": "string"}
}
},
"errors": {"type": "array", "items": {"type": "object"}},
"data": {"type": "object"},
"template_info": {"type": "object"},
"processing_time": {"type": "number"},
"tokens_used": {"type": "number"},
"response_metadata": {"type": "object"}
},
"required": ["response_id", "answer", "metadata", "history", "template_info", "processing_time", "response_metadata"]
}
For more details, see the endpoint documentation and the OpenAPI spec at /api/v2/openapi.json.