Skip to content
AWANhris
Guide menu

Webhooks and the API log

A webhook tells another system each time an employee joins, transfers or leaves. This page explains how to add a webhook, read the delivery log and resume a paused webhook.

Before you start

  • You need the permission to manage API tokens. By default, only HRIS admin holds it.
  • First create a token with the events:subscribe scope. See API tokens.
  • Ask the owner of the other system for the receiving address. The address must start with https and be reachable from the internet.
  • Use a computer or tablet.

Add a webhook

  1. Open Integrations, then select Webhooks and API log.
  2. Select Add webhook.
  3. In Token, choose a token. Only tokens with events:subscribe show. The webhook sends events from that token's companies.
  4. Fill in Address, such as https://example.com/hooks/hris.
  5. In Events, tick the events to send: Hired, Transferred or Terminated.
  6. Select Add webhook.

Copy the signing secret now appears. Copy this secret and give it to the owner of the receiving system through a secure channel. The receiver uses it to check the signature on each delivery. The secret shows only once.

The app shows Webhook added.

Events sent

  • Hired: a new employee joins.
  • Transferred: an employee transfers, including to another company in the group. Promotions and demotions are not included.
  • Terminated: the employment ends.

One change makes one delivery to each webhook that listens for that event.

Read the delivery log

The Deliveries section shows each delivery and its retries:

  • Event: the type of event
  • Attempt: which attempt it is, such as 3 of 18
  • Answer: the receiver's answer, such as 200 OK, Timeout, No connection or Address refused
  • Next: when the next attempt is

If the receiver does not answer, the app tries again with longer and longer gaps: 1, 2, 4, 8 minutes and so on, up to 18 times over about one day.

The API calls refused today section lists the API calls refused today and why, such as a company outside the token or a revoked token. A refused call sends no data.

A paused webhook

If 18 attempts fail, the webhook pauses on its own. Admins who can manage tokens get a Webhook paused notification, and this page shows Webhook paused, followed by the token name.

New events are still kept while the webhook is paused. To resume:

  1. Make sure the receiving system can take deliveries again. Ask its owner.
  2. Select Resume.

The app shows Webhook resumed. The kept events are sent again, oldest first.

Remove a webhook

  1. On the webhook, select Remove.
  2. Select Remove webhook.

The app shows Webhook removed. Nothing more is sent to that address. Its delivery log is kept.

Common problems

  • Use an address that starts with https. The address must start with https.
  • This address points inside a private network. Use a public one. The address points to an internal network. Use a public address.
  • This address can't be found. Check the spelling. Check how the address is spelled.
  • Leave the user name and password out of the address. Remove the user name and password from the address.
  • No token has events:subscribe yet. Create one first. Create a token with the events:subscribe scope first.
  • This token is revoked or expired. Choose another. Choose another token that still works.