๐ Authentication
All API requests require a Bearer token in the Authorization header.
# Include this header in all requests
Authorization: Bearer ic-dev-key-2026-secure
โ ๏ธ In production, set the API_KEY environment variable to override the default key.
๐ฏ Classify Intent
POST
/api/v1/classify
Classifies user utterance and returns intent category, type, and confidence.
Request Body
| Parameter | Type | Description |
|---|---|---|
| text required | string | User utterance to classify |
| pendingKind | string |
Context state: NONE, YESNO, CHOICE,
SLOT
|
| turnId | number | Current conversation turn ID (default: 100) |
| turnOpenedId | number | Turn ID when pending was opened (default: 99) |
Example Request
curl -X POST https://your-app.railway.app/api/v1/classify \
-H "Authorization: Bearer ic-dev-key-2026-secure" \
-H "Content-Type: application/json" \
-d '{
"text": "Yes, I agree with that",
"pendingKind": "YESNO",
"turnId": 100
}'
Example Response
{
"success": true,
"input": {
"text": "Yes, I agree with that",
"turnId": 100,
"pending": { "kind": "YESNO", ... }
},
"result": {
"C1": "FLOW",
"C2": "acknowledgment",
"confidence": 0.9,
"slots": {},
"meta": {
"consumption": "MIXED",
"sidecar_answer": { "kind": "YESNO", "value": "YES" }
}
}
}
๐งช Try It
// Response will appear here
๐ Response Codes
| Code | Description |
|---|---|
| 200 | Success - Intent classified |
| 400 | Bad Request - Missing or invalid parameters |
| 401 | Unauthorized - Missing Authorization header |
| 403 | Forbidden - Invalid API key |
๐ Intent Categories (C1)
EXPRESSING
INQUIRING
DIRECTING
RELATING
FLOW
META