After creation, subscriptions can be updated to change what events are subscribed to, what url to send the payloads to, and other settings such as whether the subscription is active. Any values that can be set on the subscription when creating it can be updated.
The update method is a patch operation, so only properties you send in the request will be updated on the record. The events property, however, does not support partial updates as an array.
The access token used when updating a subscription must have the webhooks.writeauth scope.
Attributes of the webhook subscription to update.
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/{subscription_id}
- US2https://partner.us2.onfirstup.com/v2/webhooks/subscriptions/{subscription_id}
- EUhttps://partner.onfirstup.eu/v2/webhooks/subscriptions/{subscription_id}
- oauth2_as_a_user
- oauth2_as_a_server
curl -i -X PUT \
'https://partner.socialchorus.com/v2/webhooks/subscriptions/{subscription_id}' \
-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" } }