Webhook Integration

Webhook Integration Setup Instructions for Gleam

Gleam can trigger a request to your own endpoint when entries are created. We currently offer two Webhook types which you can setup.

Webhooks are currently available only on our Premium plans.

Integration Webhooks

These will currently only trigger for Subscribe actions and will work just like any normal integration.

Webhooks have the advantage of including custom fields and other data that we don't currently sync with mail providers. Which makes them excellent for building your own integrations or sending data to an unsupported email provider.

Integration Webhooks are not instant (except for Captures), they pass through our Fraud filter first before being sent to your endpoint. The process usually takes 5-10 minutes.

Post Entry Webhooks

These Webhooks are setup on the Post Entry tab of Competitions and Rewards. They will send through a Webhook POST every time an action is completed.

This request will also show things like the total number of entries for that user (for Competitions) and their progress towards unlocking a Reward.

Return a status code of 201 for Gleam to report the entry as "New". A status of 200 will report as "Existing". All other status codes will result in an error.

Post Entry Webhook Request

Our webhooks will create a POST request containing a JSON body to your endpoint. Example JSON:

      "name":"My Campaign",
      "name":"Joe Bloggs",
         "I have read the terms and conditions":"true",
         "How are you?":"Great, thanks!",
      "action":"Subscribe to our newsletter",
      "created_at":"2015-11-18 05:14:37 UTC",
      "value":"Example user answer",
         "post_text":"Hello world",


If you need to whitelist IP addresses, the requests from Gleam's webhooks will come from or

Code Snippets

You will need to have an endpoint that can receive the POST request from Gleam.

Ruby / Ruby On Rails

The user, campaign, and entry details will be mapped to Rails parameters.

For a generic Ruby solution, you can use:

require 'json'

data_json = JSON.parse request.body.read


$data = json_decode(file_get_contents('php://input'), TRUE);