API Reference
Trigger flows, send events, and retrieve conversation data via the KX Axis REST API.
API Reference
The KX Axis API is a REST API. All requests use HTTPS. Authentication is via Bearer token.
Base URL
https://api.kxaxis.com/v1Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYGenerate API keys in Settings → API Keys.
Trigger a Flow
Start a conversation programmatically by triggering a named flow.
POST /conversationsRequest body
{
"flowId": "flow_abc123",
"channel": "api",
"userId": "user_xyz",
"variables": {
"firstName": "Alex",
"planTier": "growth"
}
}Response
{
"conversationId": "conv_9f3k2m",
"status": "active",
"createdAt": "2025-01-15T10:30:00Z"
}Send a Message
Send a user message into an active conversation.
POST /conversations/{conversationId}/messagesRequest body
{
"content": "I want to upgrade my plan",
"type": "text"
}Get Conversation
Retrieve a conversation and its full transcript.
GET /conversations/{conversationId}List Conversations
GET /conversations?flowId=flow_abc123&status=completed&limit=50Query parameters
| Parameter | Type | Description |
|---|---|---|
flowId | string | Filter by flow |
status | string | active, completed, or abandoned |
limit | integer | Max results (default 20, max 100) |
cursor | string | Pagination cursor from previous response |
Webhooks
KX Axis can POST events to your endpoint as conversations progress. Configure webhook URLs in Settings → Webhooks.
Event types
conversation.startedconversation.messageconversation.completedconversation.abandoned
Payload shape
{
"event": "conversation.completed",
"conversationId": "conv_9f3k2m",
"flowId": "flow_abc123",
"outcome": "booked",
"variables": {
"meetingTime": "2025-01-20T14:00:00Z"
},
"timestamp": "2025-01-15T10:45:00Z"
}