OVAI API Reference

Complete developer documentation for OVAI Chatbot API. Build custom integrations and applications.

Authentication

All API requests require authentication using API keys. Include your API key in the Authorization header.

POST Get API Key

Generate a new API key for your application

Endpoint
https://api.ovai.in/v1/auth/api-key
Headers
Content-Type: application/json
Authorization: Bearer YOUR_MASTER_KEY
Request Body
{ "name": "My Application", "permissions": ["chat:read", "chat:write"] }
Response
{ "success": true, "api_key": "a43108f399589b94f461929584a90274", "key_id": "key_123456" }

Chatbot API

POST Send Message

Send a message to the chatbot and get response

Endpoint
https://api.ovai.in/v1/chatbot/messages
Headers
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
Request Body
{ "session_id": "session_123", "message": "Hello, how can I help you?", "language": "en", "context": { "user_id": "user_456", "page_url": "https://example.com" } }
Parameters
Parameter Type Required Description
session_id string Yes Unique session identifier
message string Yes The message text
language string No Language code (default: en)
context object No Additional context data
Response
{ "success": true, "response": "I'm here to help! How can I assist you today?", "session_id": "session_123", "timestamp": "2025-01-15T10:30:00Z" }

GET Get Chat History

Retrieve chat history for a session

Endpoint
https://api.ovai.in/v1/chatbot/sessions/{session_id}/messages
Headers
Authorization: Bearer YOUR_API_KEY
Query Parameters
Parameter Type Required Description
limit integer No Number of messages to return (default: 50)
offset integer No Pagination offset
start_date string No Start date filter (ISO format)

Try the API

Test API Endpoint

Try sending a test message to the chatbot API

Error Codes

Code Message Description
400 Bad Request Invalid request parameters
401 Unauthorized Invalid or missing API key
403 Forbidden Insufficient permissions
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error