To activate a webhook, make a PATCH request with the active property set to true. By default, newly created webhooks are inactive by default and must be activated to start recieving events.
The following is a sample PATCH request to activate a webhook.
The Webhooks API V2 can only be called by Service Applications. This request requires an Authorization header with a valid Bearer token with the webhooks:modify scope. For more information on Service Applications and how to obtain an access token can be found here. A list of your Service Applications can be found here.
The Service Application must have the webhooks_maintainer permission assigned at the iTwin level or be an Organization Administrator for the Organization that owns a given iTwin.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
json
HeaderNotFound
{"error":{"code":"HeaderNotFound","message":"Header Authorization was not found in the request. Access denied."}}
Invalid request to create new account webhook. Make sure request had required properties and does not pass in readonly properties.
json
{"error":{"code":"InvalidUpdateWebhookRequest","message":"Cannot update a webhook. Make sure the request body is valid.","details":[{"code":"InvalidRequestBody","message":"Invalid request body.","target":"callbackUrl"}]}}
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.