Webhooks

Webhooks allow you to subscribe to certain events on Tuemilio. After adding a webhook URL, we'll ping you each time a user leaves an email.

new-subscriber Event

Each time you get a new subscriber we will send a post request to your app.

POST /example HTTP/1.1
Host: example.com
User-Agent: Tuemilio-Hookshot/1.0
Content-Type: application/json
X-Tuemilio-Event: new-subscriber
{
   "event": "new-subscriber",
   "id": 232424,
   "address": "child@gmail.com",
   "ip": "192.168.10.1",
   "position": 2,
   "points": 0,
   "anti_points": 0,
   "source": "email-form",
   "referrer_id": 232423,
   "referrer_url": null,
   "subscribed": 1,
   "dashboard_link": "https://mysite.com?email=child@gmail.com",
   "referral_link": "https://mysite.com?r=LZwZy",
   "referral_id": "LZwZy"
   "created_at": "2020-10-14 09:22:29",
   "blocked": 0,
   "fraud_id": null,
   "custom_fields": [],
   "shared_on": [],
   "subscribers_count": 2,
   "referrer": {
      "id": 232423,
      "address": "parent@gmail.com",
      "ip": "192.168.10.1",
      "points": 1,
      "anti_points": 1,
      "source": "email-form",
      "referrer_id": 0,
      "referrer_url": "https://mysite.com",
      "subscribed": 1,
      "click_time": 6,
      "cookie_uuid": "aa5b48b7-13bf-4e79-bac7-aaad5b973d05",
      "created_at": "2020-10-14 09:20:51",
      "blocked": 1,
      "fraud_id": 3,
      "custom_fields": [],
      "shared_on": [],
      "dashboard_link":"https://mysite.com?email=parent@gmail.com"
   },
   "waiters": [
      {
         "address": "xx@xx.com",
         "points": 1,
         "deleted_at": null,
         "position": 1
      },
      {...}
   ]
}

grant-access Event

Automatic webhooks sent from Tuemilio as configured for granting access from your app to your subscribers. Check the documentation on how to configure the frequency to give access and the number of users per batch here.

POST /example HTTP/1.1
Host: example.com
User-Agent: Tuemilio-Hookshot/1.0
Content-Type: application/json
X-Tuemilio-Event: grant-access
{
   "event": "grant-access",
   "id": 232424,
   "address": "child@gmail.com",
   "ip": "192.168.10.1",
   "position": 2,
   "points": 0,
   "anti_points": 0,
   "source": "email-form",
   "referrer_id": 232423,
   "referrer_url": null,
   "subscribed": 1,
   "dashboard_link": "https://mysite.com?email=child@gmail.com",
   "referral_link": "https://mysite.com?r=LZwZy",
   "referral_id": "LZwZy"
   "created_at": "2020-10-14 09:22:29",
   "blocked": 0,
   "fraud_id": null,
   "custom_fields": [],
   "shared_on": [],
   "subscribers_count": 2,
   "referrer": {
      "id": 232423,
      "address": "parent@gmail.com",
      "ip": "192.168.10.1",
      "points": 1,
      "anti_points": 1,
      "source": "email-form",
      "referrer_id": 0,
      "referrer_url": "https://mysite.com",
      "subscribed": 1,
      "click_time": 6,
      "cookie_uuid": "aa5b48b7-13bf-4e79-bac7-aaad5b973d05",
      "created_at": "2020-10-14 09:20:51",
      "blocked": 1,
      "fraud_id": 3,
      "custom_fields": [],
      "shared_on": [],
      "dashboard_link":"https://mysite.com?email=parent@gmail.com"
   },
   "waiters": [
      {
         "address": "xx@xx.com",
         "points": 1,
         "deleted_at": null,
         "position": 1
      },
      {...}
   ]
}