التكاملات · API
API و Webhooks
دمج إيربوست مع أدوات خارجية عبر webhooks و API.
نقطة الـ Webhook
POST https://airpost.agency/api/webhooks
أرسل Gemini API key كـ X-API-Key header للمصادقة.
الإجراءات
إنشاء مسودة بوست للعميل.
{
"action": "create_post",
"client_id": 1,
"topic": "Text on design",
"caption": "Instagram caption",
"post_type": "post",
"platforms": "instagram"
}
احصل على آخر بوستات للعميل.
{
"action": "list_posts",
"client_id": 1
}
تحديث قياسات تفاعل بوست (من Meta API وغيرها).
{
"action": "update_engagement",
"post_id": 42,
"likes": 150,
"comments": 23,
"saves": 45,
"shares": 12,
"reach": 5000
}
تصدير CSV
GET /api/export/posts?client_id=1
يحمّل كل البوستات كـ CSV مع ID، الموضوع، الكابشن، النوع، الحالة، النقاط، التفاعل، التواريخ.
بوابة العميل
POST /api/client-portal/create-token
{
"client_id": 1,
"permissions": "approve" // "view", "approve", or "comment"
}
يرجّع URL فريد يقدر العميل يستخدمه ليشوف البوستات والإحصائيات ويعتمد/يرفض المحتوى — بدون تسجيل دخول.
APIs الذكاء
/api/intelligence/memory?client_id=1
ذاكرة البراند
/api/intelligence/hooks?client_id=1
أعلى الهوكات
/api/intelligence/score
تقييم المحتوى
/api/intelligence/top-patterns?client_id=1
الأنماط الناجحة
/api/intelligence/analyze-performance
تدقيق كامل
/api/intelligence/export?client_id=1
تقرير JSON كامل
/api/intelligence/populate-hooks
توليد ٢٠+ هوك بالذكاء
/api/intelligence/analyze-competitor
استخراج وتحليل منافس
/api/intelligence/engagement
تتبّع تفاعل البوست
/api/intelligence/engagement/batch
تحديث تفاعل جماعي
/api/ai-design/generate-template
قالب تلقائي من اللوجو
/api/campaigns
إنشاء حملة
المصادقة
مصادقة API Key: X-API-Key header. احصل على المفتاح من الإعدادات.
مصادقة الجلسة: كل نقاط الداشبورد تستخدم session cookies. سجّل دخول عبر POST /api/login أولاً.
حدود المعدل
| النقطة | الحد |
|---|---|
| كل نقاط API | ٢٠٠ طلب/دقيقة |
| تسجيل الدخول | ١٠ طلبات/دقيقة |
| توليد الذكاء | حسب الخطة (مجاني: ٥٠/شهر، Pro: ٥٠٠/شهر) |
| رفع ملفات | ٥٠ ميجا كحد أقصى للملف |
نقاط إضافية
/api/plan
الخطة الحالية والاستخدام
/api/workspace/health
نقاط صحة المساحة
/api/analytics/ai-usage
AI generation analytics
/api/analytics/export?period=30
Export analytics CSV
/api/account/export
GDPR data export
/api/clients/{id}/health
Client health score
/api/clients/{id}/export
Client data export JSON
/api/posts/{id}/versions
Post edit history
/health
Service health check
Zapier / Make.com Integration
Connect Airpost to 5,000+ apps using Zapier or Make.com webhooks.
Example: Create post from Google Sheets
1. In Zapier, trigger: "New Row in Google Sheets"
2. Action: "Webhooks by Zapier" → POST
3. URL: https://airpost.agency/api/webhooks
4. Headers: X-API-Key: your_api_key
5. Body:
{
"action": "create_post",
"client_id": 1,
"topic": "{{Column A}}",
"caption": "{{Column B}}",
"platforms": "instagram"
}
Example: Push engagement data from Meta API
1. Use a scheduled Zap or Make scenario
2. Fetch post insights from Facebook/Instagram Graph API
3. Send to Airpost:
{
"action": "update_engagement",
"post_id": 42,
"likes": 150,
"comments": 23,
"saves": 45,
"reach": 5000
}
Airpost's AI will learn from high-performing content automatically.
Example: Notify Slack when post is published
1. In Zapier, trigger: "Catch Hook" (webhook)
2. In Airpost, set up a webhook to POST to your Zapier URL on publish events
3. Action: "Send Slack Message" with post details
Coming soon: native webhook events for post status changes
Outgoing Webhooks
Receive real-time notifications when events happen in Airpost.
Loading...
Recent Deliveries
Loading...
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Not authenticated — login or add X-API-Key header |
| 403 | Access denied — wrong workspace or insufficient role |
| 404 | Resource not found |
| 429 | Rate limited — slow down (see limits above) |
| 500 | Server error — try again or contact support |
| NO_API_KEY | AI features need an API key — add in Settings |
| PLAN_LIMIT | Plan limit reached — upgrade for more |