Developer docsSocial Gateway API reference Postman العربية

Quickstart

  1. Open your workspace and connect a page under Connections. On the sandbox, test pages appear without a Meta account.
  2. Create an API client under API Clients and copy the key (shown once).
  3. List the active accounts:
curl https://api.crmgateway.brainstorming-solutions.com//api/v1/social-accounts \
  -H "X-Api-Key: sgk_test_..."

Publish a text post now:

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"
  }'

The answer comes back at once:

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

Follow it with GET /api/v1/operations/{operationId}, or receive social.post.published on your webhook.