AssistantSession
Mint an AI Assistant session
POST /api/v1/assistant/session
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Exchanges the caller's already-validated platform credentials for a
short-lived AI Assistant session token, scoped to the active
organization (X-Organization-Id). The exchange happens
server-to-server between the platform and the first-party assistant
service — clients cannot mint assistant sessions themselves.
Re-issuable on demand: renew by calling again before expires_in
elapses. Chat traffic then flows directly between the client and the
assistant service using the returned session token.
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
organization_id |
string | non | An explicit body organization_id must agree with the resolved org context — silently preferring one over the other would let a stale client mint a session for an org it did not intend. |
Réponses
| Statut | Description |
|---|---|
| 200 |
Exemple de requête
curl -X POST "https://kworia.com/api/v1/assistant/session" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"organization_id": "string"
}'