cURL examples
Copy-paste examples for testing the Chatevo API from a terminal. Replace placeholders with your values.
export CHATEVO_API_KEY="ch_live_your_key_here"export CHATEVO_BASE="https://api.chatevo.ai"All authenticated examples use:
-H "Authorization: Bearer $CHATEVO_API_KEY" \-H "Content-Type: application/json"Assistants
Section titled “Assistants”List assistants
Section titled “List assistants”curl -s "$CHATEVO_BASE/api/v1/assistants" \ -H "Authorization: Bearer $CHATEVO_API_KEY" | jqCreate assistant
Section titled “Create assistant”curl -s -X POST "$CHATEVO_BASE/api/v1/assistants" \ -H "Authorization: Bearer $CHATEVO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "API Test Assistant", "master_prompt": "Answer from knowledge base only.", "model": "gpt-5.4-mini" }' | jqKnowledge bases
Section titled “Knowledge bases”Upload a PDF
Section titled “Upload a PDF”curl -s -X POST "$CHATEVO_BASE/api/v1/knowledge-bases/kb_YOUR_KB_ID/documents" \ -H "Authorization: Bearer $CHATEVO_API_KEY" \ -F "file=@./faq.pdf" \ -F "title=FAQ"Check indexing status
Section titled “Check indexing status”curl -s "$CHATEVO_BASE/api/v1/knowledge-bases/kb_YOUR_KB_ID/status" \ -H "Authorization: Bearer $CHATEVO_API_KEY" | jqMessages (Direct API)
Section titled “Messages (Direct API)”Send a message
Section titled “Send a message”curl -s -X POST "$CHATEVO_BASE/api/v1/messages" \ -H "Authorization: Bearer $CHATEVO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "deployment_id": "dep_YOUR_DEPLOYMENT", "content": "What are your business hours?" }' | jqStream a response (SSE)
Section titled “Stream a response (SSE)”curl -N -X POST "$CHATEVO_BASE/api/v1/messages" \ -H "Authorization: Bearer $CHATEVO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "deployment_id": "dep_YOUR_DEPLOYMENT", "conversation_id": "conv_YOUR_CONVERSATION", "content": "Show available products", "stream": true }'Widget (public, no API key)
Section titled “Widget (public, no API key)”Fetch widget config
Section titled “Fetch widget config”curl -s "$CHATEVO_BASE/api/v1/widget/config?deployment_id=dep_YOUR_DEPLOYMENT" \ -H "Origin: https://www.yourbusiness.com" | jqSend widget message
Section titled “Send widget message”curl -s -X POST "$CHATEVO_BASE/api/v1/widget/messages" \ -H "Content-Type: application/json" \ -H "Origin: https://www.yourbusiness.com" \ -d '{ "deployment_id": "dep_YOUR_DEPLOYMENT", "content": "Hello" }' | jqWebhooks
Section titled “Webhooks”Register endpoint
Section titled “Register endpoint”curl -s -X POST "$CHATEVO_BASE/api/v1/webhooks" \ -H "Authorization: Bearer $CHATEVO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://hooks.example.com/chatevo", "events": ["message.created", "conversation.created"] }' | jqSend test event
Section titled “Send test event”curl -s -X POST "$CHATEVO_BASE/api/v1/webhooks/wh_YOUR_WEBHOOK/test" \ -H "Authorization: Bearer $CHATEVO_API_KEY" | jqRate limit headers
Section titled “Rate limit headers”Inspect limits on any response:
curl -s -D - -o /dev/null "$CHATEVO_BASE/api/v1/assistants" \ -H "Authorization: Bearer $CHATEVO_API_KEY" | grep -i x-ratelimit