Quick Reference — Integrationen (copy/paste)
Diese Seite ist ein Developer Cheat-Sheet für schnelle CLIA-Integrationen.
Für B2C Embedding starte hier:
- text
/docs/b2c-agent-embedding-guide
Base URL
- Production: text
https://clia-backend.frontiercodes.com
Auth (die richtige wählen)
1) JWT (Tenant Dashboard User)
Für:
text
/chattext
/agent-configtext
/billing/*text
/users/*textAuthorization: Bearer <jwt>
2) API key (Tenant Secret)
Für:
text
/public/sessiontext
/rag-configtext
/prompt-templatestext
/public/*textx-api-key: <tenant_api_key>
Regel: niemals im Browser/App ausliefern.textx-api-key
B2C Flow (empfohlen)
A) Session minten (server-side)
text
POST /public/sessionbashcurl -X POST "https://clia-backend.frontiercodes.com/public/session" \ -H "Content-Type: application/json" \ -H "x-api-key: $CLIA_TENANT_API_KEY" \ -d '{ "agentId": "AGENT_ID", "channel": "chat", "externalCustomerId": "enduser_123", "scopes": ["mcp:access", "tool:http_request"] }'
B) Message senden (frontend → agentEndpoint)
bashcurl -X POST "https://<your-agent-endpoint>/webhook/chat" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $EXECUTION_TOKEN" \ -d '{ "agentId": "AGENT_ID", "query": "Hallo!", "sessionId": "sess_...", "workspaceId": "WORKSPACE_ID", "externalCustomerId": "enduser_123" }'