وثائق المطورينبوابة التواصل مرجع الـ API Postman English

البدء السريع

  1. افتح مساحة شركتك، واربط صفحة من شاشة «الحسابات المربوطة». في Sandbox تظهر صفحات تجريبية بدون حساب Meta.
  2. أنشئ عميل API من شاشة «عملاء API» وانسخ المفتاح (يظهر مرة واحدة).
  3. اقرأ الحسابات المفعلة:
curl https://api.crmgateway.brainstorming-solutions.com//api/v1/social-accounts \
  -H "X-Api-Key: sgk_test_..."

انشر منشورًا نصيًا فورًا:

curl -X POST https://api.crmgateway.brainstorming-solutions.com//api/v1/posts \
  -H "X-Api-Key: sgk_test_..." \
  -H "Idempotency-Key: CRM-POST-98452" \
  -H "Content-Type: application/json" \
  -d '{
    "targets": [ { "socialAccountId": "ACCOUNT_ID", "platform": "facebook" } ],
    "content": { "type": "text", "message": "Hello" },
    "publishing": { "mode": "immediate" },
    "externalReference": "CRM-CAMPAIGN-98452"
  }'

الرد فوري:

{ "requestId": "req_...", "operationId": "0192...", "status": "queued", "externalReference": "CRM-CAMPAIGN-98452", "resource": { "postId": "0192..." } }

تابع النتيجة بـ GET /api/v1/operations/{operationId} أو استقبل الحدث social.post.published على الـ Webhook.