Webhooks

Introduction

Webhooks are notifications of certain events in Tender. Whenever these events are fired, Tender can send HTTP POST requests to a URL that you specify. This is perfect for synchronizing data from Tender with your custom systems. All you need to play is a responding web server.

You can manage your webhooks from the Site Settings area of your Tender Site.

Events

These are the events that can trigger webhook notifications.

  • When a Discussion is created.
  • When a Discussion is created or replied to.
  • When a new User signs up.

Built-in Services

Tender has a few built-in services if you don't want to host your own webhook server.

  • Notify.io - gives you notifications on the desktop.
  • Prowl - Growl client for iPhones.

Payload data

The payload data for discussion events matches the json output for comment API calls. There will be a 3 extra keys for user, category, and discussion.

{
  "body":"this is a body",
  "formatted_body":"<div><p>...</p></div>",
  "user": {USER},
  "category": {CATEGORY},
  "discussion": {DISCUSSION}
}

The payload data for user events will match the json output for single user API calls:

{"name": "Bob","email":"bob@email.com"...}

Debugging

You can use a system like PostBin to inspect the payload data of the Tender webhook requests. Just enter your custom PostBin address as a Custom Web URL.

PostBin example

Also, you can use PostBin as a passthrough callback. For instance, if you have a callback handler like http://my-server.com/tender-webhook, you can use PostBin to record the body before passing the request to your server webhook. Just precede your server URL with the PostBin URL and a ?:
http://postbin.org/abc?http://my-server.com/tender-webhook.

PostBin passthrough example