Webhooks

Webhooks are custom HTTP callbacks from WebTranslateIt to any URL you specify. They are called whenever a transaltion is made on WebTranslateIt.

Setup a Webhook

A webhook can be setup in your project settings. Provide the webhook section with the URL of your webservice and WebTranslateIt will request a HTTP POST request everytime a translation was made on your project.

The HTTP POST request made contains a so-called payload which are attributes indicating what was updated.

Webhook requests are made in the background so there can be a small delay between the moment a translation is saved and the time the webhook request is made. Timeout is set to drop requests exceeding 10 seconds.

There are two different kinds of payloads, single payloads and multiple payloads.

Single Payload

A single payload is a payload sent for a single translation made from the web interface. Here is an example payload.

Multiple Payload

A multiple payload is a payload for a group of translations that were made from a batch operation or a file upload. Instead of sending thousands of single payloads WebTranslateIt sends a payload containing an array of translation changes. In order not to make too large requests, requests are capped to 100 changes.

What can you do with a webhook?

You could use a webhook to:

  • download the latest version of your linguistic file on your webserver, so translators can live-reload your website.
  • create a new build of your software and make it available to download.
  • automatically commit the new version of the file to your Version Control System.
  • send an e-mail notification or write a line on Campfire, Slack or IRC.

More information about webhook