AI Concierge Chatbot API Reference
Complete API documentation for integrating AI Concierge chatbot functionality into your applications.
Authentication
All API requests require authentication using your API key:
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.triorama.ai/chatbot/v1/
Base URL
https://api.triorama.ai/chatbot/v1/
Endpoints
Chat Conversations
#
Start New Conversation
POST /conversations
Request Body:
{
"storefront_id": "your_storefront_id",
"user_id": "optional_user_identifier",
"context": {
"page_url": "https://yourstore.com/products/example",
"user_agent": "browser_info",
"language": "en"
}
}
Response:
{
"conversation_id": "conv_123456789",
"session_token": "sess_abcdef123",
"agents": {
"sales": "enabled",
"support": "enabled",
"search": "enabled"
},
"expires_at": "2025-07-17T12:00:00Z"
}
#
Send Message
POST /conversations/{conversation_id}/messages
Request Body:
{
"message": "I'm looking for a blue dress for a wedding",
"message_type": "text",
"context": {
"intent": "product_search",
"user_context": "browse_products"
}
}
Response:
{
"message_id": "msg_987654321",
"agent_response": {
"agent_type": "sales",
"message": "I'd love to help you find the perfect wedding guest dress! What's your budget range and preferred style?",
"suggested_products": [
{
"id": "prod_123",
"name": "Elegant Blue Midi Dress",
"price": "$149.99",
"image": "https://...",
"url": "/products/blue-midi-dress"
}
],
"follow_up_questions": [
"What's your size?",
"Formal or semi-formal event?",
"Any color preferences besides blue?"
]
},
"conversation_context": {
"intent": "product_search",
"category": "dresses",
"filters": {
"color": "blue",
"occasion": "wedding"
}
}
}
Product Integration
#
Sync Product Catalog
POST /products/sync
Request Body:
{
"products": [
{
"id": "prod_123",
"name": "Blue Midi Dress",
"description": "Elegant blue midi dress perfect for special occasions",
"price": 149.99,
"currency": "USD",
"category": "dresses",
"tags": ["blue", "midi", "elegant", "wedding"],
"images": ["https://..."],
"variants": [
{
"id": "var_123",
"size": "M",
"color": "navy-blue",
"inventory": 5
}
],
"url": "/products/blue-midi-dress"
}
]
}
Analytics
#
Get Conversation Analytics
GET /analytics/conversations?start_date=2025-07-01&end_date=2025-07-16
Response:
{
"total_conversations": 1547,
"avg_conversation_length": 4.2,
"conversion_rate": 0.23,
"top_intents": [
{"intent": "product_search", "count": 623},
{"intent": "support_inquiry", "count": 445},
{"intent": "order_status", "count": 289}
],
"agent_performance": {
"sales": {"conversations": 623, "conversions": 167},
"support": {"conversations": 445, "satisfaction": 4.7},
"search": {"conversations": 479, "click_through": 0.34}
}
}
Webhooks
Configure webhooks to receive real-time updates about conversations:
Conversation Events
{
"event": "conversation.started",
"conversation_id": "conv_123456789",
"timestamp": "2025-07-16T10:30:00Z",
"data": {
"storefront_id": "your_storefront_id",
"user_context": {...}
}
}
Conversion Events
{
"event": "conversion.completed",
"conversation_id": "conv_123456789",
"timestamp": "2025-07-16T10:45:00Z",
"data": {
"order_value": 149.99,
"products": ["prod_123"],
"agent_type": "sales"
}
}
Error Handling
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "The request parameters are invalid",
"details": {
"field": "storefront_id",
"issue": "required"
}
}
}
Common Error Codes
-authentication_failed
- Invalid API key
- rate_limit_exceeded
- Too many requests
- invalid_request
- Request format issues
- conversation_not_found
- Invalid conversation ID
- quota_exceeded
- Plan limits reachedRate Limits
- Standard Plan: 1,000 requests/hour - Professional Plan: 10,000 requests/hour - Enterprise Plan: Custom limits
SDKs and Libraries
JavaScript SDK
import { AIConciergeAPI } from '@triorama/ai-concierge-sdk';const client = new AIConciergeAPI('your_api_key');
const conversation = await client.conversations.create({
storefront_id: 'your_storefront_id'
});
const response = await client.conversations.sendMessage(
conversation.id,
'I need help finding a product'
);
Python SDK
from triorama import AIConciergeClientclient = AIConciergeClient(api_key='your_api_key')
conversation = client.conversations.create(
storefront_id='your_storefront_id'
)
response = client.conversations.send_message(
conversation.id,
'I need help finding a product'
)
Best Practices
1. Context Management: Always provide relevant page context 2. Error Handling: Implement proper retry logic for failed requests 3. Rate Limiting: Respect API rate limits and implement exponential backoff 4. Security: Never expose API keys in client-side code 5. Performance: Cache conversation tokens to reduce API calls
Guide Information
Quick Actions
Related Guides
Ready to Implement?
Start building your AI automation solution with the tools and guidance from this guide.