Webhooks

Configure webhook

Set up a webhook for your account so your application can react to Ocrolus events.


You can find a list of supported account-level event types and their sample notifications in the Account-level webhook guide.

📘 Your webhook integration should respond to incoming notifications with a status of 200 OK to indicate that it's working properly.

🚧 We have a better version! This product is superseded by Org Level Webhooks, which we recommend for improved functionality and integration.

post/v1/account/settings/update/webhook_endpoint

Request

  • Base URL
    https://api.ocrolus.com
  • URL
    https://api.ocrolus.com/v1/account/settings/update/webhook_endpoint
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://auth.ocrolus.com/oauth/token

Request body multipart/form-data

webhook_endpointstring url required

The URL of the endpoint that will receive notifications of Ocrolus events. This should be on your own infrastructure, protected from the outside world on a network level. See here for a list of IP addresses that you can add to your firewall's allowlist.

The domain will be checked for validity, although the webhook itself won't be called. We suggest testing the endpoint after configuring it.

eventWebhookEventType[]

A comma-separated list of events that will trigger a call to your webhook. To deregister the webhook, provide an empty array. The event list given in this parameter will replace all existing subscriptions, i.e. providing a single event will subscribe only to that event while unsubscribing from the others.

Example request

{
  "webhook_endpoint": "https://webhook_endpoint_url.com/example",
  "event": [
    "book.verified"
  ]
}

Response

Success

statusinteger required

Numerical code indicating the status of this request. Will be 200 for a successful response.

codeinteger

Numerical code indicating the nature of an error. Will not be present if the response is successful.

messagestring required

A textual description that indicates details about this response's status. Will be "OK" for a successful request.

Changes

No recorded changes to this operation across all 1 revision of this API.