Subscriptions are configurations that define what events you want to receive webhooks for. A url and at least one event are required for a subscription. If your server requires authorization, the authorization_header property allows you to specify what value to send in the "Authorization" http header of every delivery to your url.
More information about creating webhook subscriptions is available on the Creating Webhook Subscriptions page, and the list of available events is available on the Event List page.
The access token used when creating a subscription must have the webhooks.writeauth scope.
Attributes of the webhook subscription to create.
The url that will be called when delivering events for this subscription.
Whether the subscription is "turned on". Inactive subscriptions will not send deliveries to the subscription url except for ping deliveries.
- US1https://partner.socialchorus.com/v2/webhooks/subscriptions
- US2https://partner.us2.onfirstup.com/v2/webhooks/subscriptions
- EUhttps://partner.onfirstup.eu/v2/webhooks/subscriptions
- oauth2_as_a_user
- oauth2_as_a_server
curl -i -X POST \
https://partner.socialchorus.com/v2/webhooks/subscriptions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/webhook",
"authorization_header": "Bearer abc123-some-token",
"active": true,
"events": [
{
"name": "content_published",
"version": "1"
}
]
}'{ "data": { "id": "abc123", "url": "https://example.com/webhook", "authorization_header": "Bearer abc123-some-token", "active": true, "events": [ … ], "created_at": "2000-01-01T00:00:00Z", "updated_at": "2000-01-01T00:00:00Z" } }