Webhooks are a powerful resource that you can use to automate your use cases and improve your productivity. You can find more about them through this link if you're unfamiliar.

Unlike the API resources, which represent static data that you can create, update and retrieve as needed, webhooks represent dynamic resources. You can configure them to automatically notify you on a particular action, such as job results.

When the specified events happen, Skraper sends you a POST request with a JSON payload to each of the URLs you provided in your webhook configuration. Skraper also sends the webhook secret in the X-Skraper-Secret header so that you can verify the request is actually coming from Skraper and not a malicious third-party.

You can manage your webhooks from the Skraper dashboard on the API tab.

Events

Here's the current webhook events that you can subscribe to:

job_success

Skraper notifies your server whenever one of your jobs successfully finishes.

Example JSON payload:

{
  event: 'job_success',
  job: {
    _id: '123...',
    name: 'Example Job',
    status: 'idle',
    ...
  }
}

job_error

Skraper notifies your server whenever one of your jobs terminates with a fatal error.

Example JSON payload:

{
  event: 'job_error',
  job: {
    _id: '123...',
    name: 'Example Job',
    status: 'error',
    statusMessage: '<Some explanation for the error>',
    ...
  }
}