GuidesBuilding a Custom Domain
Creating a Custom Domain
Create and configure a custom domain via the dashboard API.
1. Create the domain
POST https://api.liyaengine.ai/dashboard/custom-domains
Authorization: Bearer <dashboard_jwt>
Content-Type: application/json
{
"domainKey": "legal-ops",
"displayName": "Legal Operations",
"description": "AI intelligence for legal operations and contract management",
"icon": "⚖",
"color": "#6366f1",
"systemPrompt": "You are a senior legal analyst at a commercial law firm. Provide precise, well-reasoned legal analysis. Always cite applicable law or standard practice when relevant."
}Response:
{
"success": true,
"data": {
"domain": {
"domain_key": "legal-ops",
"display_name": "Legal Operations",
"is_active": true,
"created_at": "2026-03-15T10:00:00Z"
}
}
}Creating a domain automatically adds its key to your tenant's enabled_domains.
Domain key rules
- Lowercase letters, numbers, and hyphens only:
^[a-z0-9-]+$ - Must be unique within your tenant
- Used as the URL path segment:
POST /v1/{domainKey}/{intentKey}
System prompt
The systemPrompt is injected at the top of every intent call within the domain. It sets the AI's role and context for all operations in this domain. Individual intents can add intent-specific instructions on top of it via their promptTemplate.
2. Verify in dashboard
After creation, the domain appears in your Packs page. You can manage intents and source types from there or continue via the API. Sample domains remain available for testing, but your production workflows should use domains you create and configure.
Listing your domains
GET /dashboard/custom-domains
Authorization: Bearer <dashboard_jwt>{
"success": true,
"data": {
"domains": [
{
"domain_key": "legal-ops",
"display_name": "Legal Operations",
"intents": [],
"source_types": []
}
]
}
}