Subscribe Webhook Event
Subscribe a connected profile to webhook events for real-time notifications. Specify the brand_id
and connected_profile_id
(from get-social-profiles
). The profile must have is_webhook_subscribed: false
(check via get-social-profiles
). Supported platforms: Facebook (likes, comments, messages) and Instagram (comments, messages). Requires a webhook callback URL (from add-webhook-callback-url
), ORG_ADMIN permission, and social inbox permissions.
- Method: POST
- Endpoint:
/api/api-services/v1/brand-service/subscribe-webhook-event
- Returns: Confirmation of successful webhook event subscription
Subscribe Webhook Event
POST https://app.brand2social.com/api/api-services/v1/brand-service/subscribe-webhook-event
Field | Type | Required | Description |
---|---|---|---|
Authorization | string (header) | Yes | Bearer token for authentication (requires ORG_ADMIN permission) |
brand_id | int64 | Yes | ID of the brand |
connected_profile_id | int64 | Yes | ID of the connected profile (from social-connect , Facebook or Instagram only, must have is_webhook_subscribed: false ) |
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/subscribe-webhook-event' \
--header 'Authorization: Bearer B2S_dummyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"brand_id": 123,
"connected_profile_id": 512
}'
Response
{
"status": "SUCCESS",
"http_code": 200,
"message": "Webhook event subscription created successfully",
"data": ""
}
Error Response
{
"status": "FAILURE",
"http_code": 400,
"message": "webhook profile with connected_profile_id 387 already exists",
"data": ""
}