Skip to main content

FAQs

Have more questions about using Webhooks? This page provides answers to some of the commonly asked questions related to Webhooks.

For how long are AppDirect webhooks retained?

AppDirect webhook events are retained for a maximum of 90 days after creation. Webhooks are stored in a dedicated database, which allows for features such as event logs and automated and manual retries.

What is the timeout for webhook endpoints?

Webhook endpoint listeners have a maximum of 30 seconds to reply with an HTTP 200 OK status.

What are some reasons why a webhook is considered to have failed?

A Webhooks is considered to have failed for any of the following reasons:

  • The webhook endpoint returned an HTTP code that is not in the 2XX range.
  • The webhook endpoint is configured with OAuth2 credentials, but the OAuth2 handshake resulted in an error.
  • The webhook endpoint did not respond within the maximum timeout of 30 seconds.

About webhooks retry mechanism and policy

There are different reasons why a webhook may fail to be delivered to the configured endpoints. These can include network problems, bugs, an unavailable webhook listener, or misconfiguration. AppDirect webhooks are designed to handle such situations.If the delivery of a webhook fails for any reason, an automatic retry mechanism will take over and retry and follow our retry policy to resend the webhook.

The retry policy is based on an exponential backoff strategy. The automatic retry mechanism will continue until the webhook is delivered or the number of automatic retry attempts exceeds the limit specified in the policy. The policy specifies the frequency and timing of automatic attempts, with a total of 11 planned attempts including the original one.

AttemptTime until next attemptTime since first attempt
Initial attempt5 minutes0 minutes
1st retry10 minutes5 minutes
2nd retry20 minutes15 minutes
3rd retry40 minutes35 minutes
4th retry1 hour1 hour 15 minutes
5th retry2 hours2 hours 15 minutes
6th retry12 hours4 hours 15 minutes
7th retry1 day16 hours 15 minutes
8th retry1 day1 day 16 hours 15 minutes
9th retry1 day2 days 16 hours 15 minutes
10th retryNone3 days 16 hours 15 minutes

You can also manually retry webhooks. In the event log table, click the retry button for the webhook you want to retry. Manual retries are not counted as part of the automatic retry mechanism. They will only impact the automatic retry schedule if the attempt is successful, in which case the automatic retries are stopped. To trigger a retry manually, the webhook must conform to our retention policy and should have failed previously.

How does the AppDirect platform ensure that dependent webhooks are delivered in the correct order?

The AppDirect platform ensures that webhooks are delivered in the correct order by leveraging capabilities of the internal event streaming platform and the explicit webhook dependency detection mechanism that is at the implementation's core.

A webhook is considered to depend on another webhook if it refers to the same resource (resource type and resource identifier) and is sent to the same endpoint. Dependencies are only considered if the original webhook has not been delivered. In this case, any dependent webhook is not sent until after the original webhook has been properly delivered or the original webhook exceeds the retention policy. For example, a USER changed notification is only sent after the notification for USER added for a particular user.

Dependencies can also be grouped. For instance, multiple USER-changed notifications are grouped in the order they were created. For the optimal use of dependencies, it is recommended to create a single webhook configuration for all the actions of a resource type.

What are some best practices for managing Webhooks?

Webhook endpoints should be configured in such a way that responses are received as quickly as possible with a 2XX status code. If more time is needed to process a request, it should be done asynchronously after a response has been returned.

Was this page helpful?