REST API
تحكّم بمنصة نباهة برمجياً — أنشئ وكلاء، أطلق مكالمات، واسحب التقارير
مصادقة JWT
Bearer token في كل طلب
Rate Limiting
١٠٠ طلب / دقيقة
JSON Response
كل الردود بصيغة JSON
المصادقة
أرسل الـ access token في هيدر Authorization مع كل طلب:
curl -X GET "https://nabaha.otekit.com/api/v1/agents" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"
نقاط الوصول (Endpoints)
الوكلاء
GET
/api/v1/agentsPOST
/api/v1/agentsPUT
/api/v1/agents/{id}DELETE
/api/v1/agents/{id}المكالمات
GET
/api/v1/callsGET
/api/v1/calls/{id}GET
/api/v1/calls/{id}/transcriptsPOST
/api/v1/voice/connect/{agentId}قاعدة المعرفة
GET
/api/v1/knowledge-basesPOST
/api/v1/knowledge-basesPOST
/api/v1/knowledge-bases/{id}/documentsالتحليلات
GET
/api/v1/dashboard/statsGET
/api/v1/billing/subscriptionGET
/api/v1/billing/invoicesمثال: إنشاء وكيل جديد
curl -X POST "https://nabaha.otekit.com/api/v1/agents" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "سارة",
"language": "ar-SA",
"voice_id": "your-voice-id",
"system_prompt": "أنتِ سارة، موظفة خدمة عملاء..."
}'