If you find any errors, typos or have general feedback, select the text and click CTRL+ALT+ENTER.

Introduction

A webhook is a method of augmenting the behavior of a service with custom callbacks, which may be maintained, modified, and managed by Appery.io users. Simply speaking, it’s an HTTP POST that occurs when an event occurs.

Currently, Appery.io supports two categories of webhooks. Each category contains its own events:

Project webhooks:

  • App version created.
  • App version removed.
  • App version restored.
  • App published on Appery.io.
  • Android build success.
  • Android build failure.
  • Android build abort.
  • Android build start.
  • iOS build success.
  • iOS build failure.
  • iOS build abort.
  • iOS build start.
  • App test.

Account webhooks:

  • App created.
  • App removed.
  • App renamed.

For example, let’s say a system needs to be notified when the Android build is successful for a particular app. You would use an Android build success event. When the build is successful, a POST request will be invoked to the URL you specify.

Creating and attaching webhooks

1. Create a callback to collect and inspect webhooks. You can use a RequestBin service, or any URL you have for this purpose.

2. To register the URL as a webhook in Appery.io, open your Resources tab, switch to Webhooks, and click “Create new webhook”:1stScreen

3. Enter the webhook parameters, and click “Create”:
CreateWebhook

A list of webhooks appears in the tab. Any line can be edited or deleted:NewWebhook

4. To attach the Account webhooks, choose the needed webhook and events. If successful, you will see a message:WebhookAttached

5. To manage permissions to your webhooks, go to Permissions tab. Information on Appery.io team and resource security model can be found here.Permissions

6. To attach a Project webhook to your app, open the Apps tab, select the project, and scroll down to the Webhooks section:App

7. Click “Attach Webhook.” In the popup, choose the webhook, check all the events you need, and click “Attach”:
AttachWebhook

8. The specified webhook appears in the area. It can be configured or deleted at any time:
WebhookAttached

When any of the checked events occur, your app POSTs data to the specified URL:
wh007

If the callback is unavailable, the webhook call is postponed and attempted several times during the following 24 hours, after which, if it’s unsuccessful, it will be deleted. The webhook call history isn’t stored.

Using several Webhooks

You can specify different event notifications to be sent to different URLs:

1. Open your Resources section, switch to Webhooks tab, and create several webhooks:
SeveralWebhooks

2. When attaching webhooks to your project, under Apps, check only the events with the data you need to be posted to the selected URLs:
MyNewWH

3. The same events can be checked for different webhooks, which means that event notifications will be posted to several URLs. If every event is selected for a webhook, “Attach Webhook” becomes grayed-out:3WHs

POST payload information

When any of the following events occur, the Appery.io app POSTs data to the webhook. In this document, you’ll find the payload examples of every webhook call.

Project webhooks

App version created

Event ID: PROJECT_VERSION_CREATE.

Webhook payload example:

The RequestBin shows the following webhook:

wh001

App version restored

Event ID: PROJECT_VERSION_RESTORE.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_version_restore

App version removed

Event ID: PROJECT_VERSION_REMOVE.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_version_remove

Published on Appery.io success

Event ID: PROJECT_PUBLISH_APPERY_SUCCESS.

Webhook payload example:

The RequestBin shows the following webhook:

wh002

Android binary build start

Event ID: PROJECT_BUILD_ANDROID_START.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_android_start

Android binary build success

Event ID: PROJECT_BUILD_ANDROID_SUCCESS.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_android_success

Android binary build abort

Event ID: PROJECT_BUILD_ANDROID_ABORT.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_android_abort

Android binary build fail

Event ID: PROJECT_BUILD_ANDROID_FAIL.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_android_fail

iOS binary build start

Event ID: PROJECT_BUILD_IOS_START.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_ios_start

iOS binary build success

Event ID: PROJECT_BUILD_IOS_SUCCESS.

Webhook payload example:

The RequestBin shows the following webhook:

wh005

iOS binary build fail

Event ID: PROJECT_BUILD_IOS_FAIL.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_build_ios_fail

Project preview test

Event ID: PROJECT_PREVIEW_TEST.

Webhook payload example:

The RequestBin shows the following webhook:

web_hooks_project_preview_test