U

User

Member

التكاملات · API

API و Webhooks

دمج إيربوست مع أدوات خارجية عبر webhooks و API.

نقطة الـ Webhook

POST https://airpost.agency/api/webhooks

أرسل Gemini API key كـ X-API-Key header للمصادقة.

الإجراءات

POST create_post

إنشاء مسودة بوست للعميل.

{
  "action": "create_post",
  "client_id": 1,
  "topic": "Text on design",
  "caption": "Instagram caption",
  "post_type": "post",
  "platforms": "instagram"
}
POST list_posts

احصل على آخر بوستات للعميل.

{
  "action": "list_posts",
  "client_id": 1
}
POST update_engagement

تحديث قياسات تفاعل بوست (من 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 الذكاء

GET /api/intelligence/memory?client_id=1 ذاكرة البراند
GET /api/intelligence/hooks?client_id=1 أعلى الهوكات
POST /api/intelligence/score تقييم المحتوى
GET /api/intelligence/top-patterns?client_id=1 الأنماط الناجحة
POST /api/intelligence/analyze-performance تدقيق كامل
GET /api/intelligence/export?client_id=1 تقرير JSON كامل
POST /api/intelligence/populate-hooks توليد ٢٠+ هوك بالذكاء
POST /api/intelligence/analyze-competitor استخراج وتحليل منافس
POST /api/intelligence/engagement تتبّع تفاعل البوست
POST /api/intelligence/engagement/batch تحديث تفاعل جماعي
POST /api/ai-design/generate-template قالب تلقائي من اللوجو
POST /api/campaigns إنشاء حملة

المصادقة

مصادقة API Key: X-API-Key header. احصل على المفتاح من الإعدادات.

مصادقة الجلسة: كل نقاط الداشبورد تستخدم session cookies. سجّل دخول عبر POST /api/login أولاً.

حدود المعدل

النقطةالحد
كل نقاط API٢٠٠ طلب/دقيقة
تسجيل الدخول١٠ طلبات/دقيقة
توليد الذكاءحسب الخطة (مجاني: ٥٠/شهر، Pro: ٥٠٠/شهر)
رفع ملفات٥٠ ميجا كحد أقصى للملف

نقاط إضافية

GET /api/plan الخطة الحالية والاستخدام
GET /api/workspace/health نقاط صحة المساحة
GET /api/analytics/ai-usage AI generation analytics
GET /api/analytics/export?period=30 Export analytics CSV
GET /api/account/export GDPR data export
GET /api/clients/{id}/health Client health score
GET /api/clients/{id}/export Client data export JSON
GET /api/posts/{id}/versions Post edit history
GET /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

CodeMeaning
400Bad request — missing or invalid parameters
401Not authenticated — login or add X-API-Key header
403Access denied — wrong workspace or insufficient role
404Resource not found
429Rate limited — slow down (see limits above)
500Server error — try again or contact support
NO_API_KEYAI features need an API key — add in Settings
PLAN_LIMITPlan limit reached — upgrade for more