Webhook notifications

November 03, 2019

We have added the ability to get notifications every time a capture is done through webhooks.

To start with webhooks, follow these steps:

  1. Configure your HTTP Webhook
  2. Configure your App
  3. Use your App

Configure your HTTP Webhook

We support HTTP and HTTPS webhook but we strongly recommend to use HTTPS. Your webhook should process notifications within 60 second and return 200 OK.

Blit will send one notification for a capture, with information about all URLs in the capture. We send a POST request in this format:

User-Agent: Blitapp/Webhook
Content-Type: application/json

{
  "type": "production",
  "version": "v1",
  "date": "2019-11-03T20:01:16.313Z",
  "capture": {
    "name": "My capture",
    "urls": [
      {
        "url": "https://www.example.com/",
        "image": "https://blitapp-images.com/file?query_sring",
        "status": "OK"
      }
    ]
  }
}

headers:

  • User-Agent: Blitapp/Webhook
  • Content-Type: application/json

Post body:

The information is sent as JSON:

  • type: production or test (when verifying an app)
  • version: v1, we may increase the version if we add more information
  • date: the date at which the webhook notification was sent, in your timezone
  • capture: the details of your capture: ** name: the name of your capture ** urls: information about all the URLs in your capture: * url: the URL requested * image: the link to the screenshot ** status: OK or ERROR

Configure your App

Go to Apps and click Add an App. Choose Webhook as the type. Enter a name for your Webhook type.

Then, you should test your webhook by clicking on “Verify”. A request with the format (type: “test”) above will be sent to your webhook. If any problem occurs, it will be reported there.

Here is an example of the request sent to verify your webhook:

{
  "type": "test",
  "version": "v1",
  "date": "2019-11-03T11:53:45-08:00",
  "capture": {
    "name": "test",
    "urls": [
      {
        "url": "https://blitapp.com/",
        "image": "https://blitapp.com/img/blit_logo.svg",
        "status": "OK"
      }
    ]
  }
}

Use the App

Your App will show in the list of Apps available. When you edit an existing capture or schedule a new capture, there is a new field for Apps. Click in the box to see the list of Apps available, or start typing its name to filter the list.

Use multiple apps

Every time a capture is done, a notification will be sent to your webhook.


Blit

Blit is a tool that lets you take screenshots of websites on a schedule. Try it free.