Integration

Quick Reference (API usage)

Auth, endpoints, payloads, and copy-paste examples for common integrations.

Idioma:ESENFRPTDE
Última actualización: Apr 8, 2026quickreferenceendpoints

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
/chat
,
text
/agent-config
,
text
/billing/*
,
text
/users/*
.

text
Authorization: Bearer <jwt>

2) API key (Tenant Secret)

Für:

text
/public/session
,
text
/rag-config
,
text
/prompt-templates
,
text
/public/*
.

text
x-api-key: <tenant_api_key>

Regel:

text
x-api-key
niemals im Browser/App ausliefern.


B2C Flow (empfohlen)

A) Session minten (server-side)

text
POST /public/session
(x-api-key)

bash
curl -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)

bash
curl -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"
  }'