1. Home
  2. FAQs & Reference
  3. References
  4. Webhooks Reference (Beta)

Webhooks Reference (Beta)

From your

Applies to

Overview

Webhooks send event data from When I Work to an endpoint that you set up letting you know about certain changes that happen in near real-time within your account. Webhooks also allow for a push model where you are notified about any changes made on the backend.

Beta

This feature is currently in Beta. Watch Product News for more information about a public release.

Considerations

Account settings

Endpoint

Endpoint URL

The Endpoint is the URL where When I Work sends the event updates. Event data is sent encrypted and requires an endpoint that supports Transport Layer Security (TLS).

Recommendation

When I Work recommends that you own this domain and understand that a relatively large number of updates may be streamed to it.

Signing Secret

Each payload has a signed hash in the headers using the HMAC-256 hashing algorithm. Use this secret to verify that the payload you have received at your endpoint came from When I Work and not from another source.

Subscriptions

Event subscriptions refer to the types of events that are sent to your account. Each event may have several sub-types, but currently only the primary type can be selected for a subscription.

Example (Users sub events)

  • users::created
  • users::updated
  • users::deleted
  • users::invited

Configure webhooks

  1. Hover over Gear, then select Settings General Settings.

  2. Click Webhooks in the menu on the left.webhooks menu item
  3. Click Enable Webhooks.enable webhooks
  4. Enter your webserver info into the Endpoint URL field.webhooks endpoint url
  5. Select the event subscriptions you want sent to your endpoint (webserver).event subscriptions
  6. Click Save. A Signing Secret field appears and the secret is generated.save webhooks

Additional information

Batching

Batching is used to group large numbers of events that are generated together into a single payload. Batching is done to prevent making too many requests to your endpoint. Event batching introduces a small delay between when the event is generated and when it is sent to your endpoint. The delay is usually between 5 – 7 seconds. There is no guarantee events are sent in order, but the event data includes a timestamp of when the event was triggered.

Retries

If When I Work failed to receive a 2xx response from your endpoint the webhook call is retried. An exponential backoff algorithm is used and retries to deliver the event data happens for about 2 hours before stopping event delivery.

Updated on August 18, 2021

Was this article helpful?

Related Articles

Still Need Help?

Open a ticket with our customer care team.

Submit a Ticket