Retries

Loyale treats any response outside the 200–299 range, or a connection failure, as an unsuccessful webhook delivery. The initial failure is logged and a retry job is scheduled.

Automatic retries

  • The first retry job is scheduled approximately 10 seconds after the initial failed delivery.
  • The retry job uses Hangfire's automatic retry policy with Attempts = 10. Backoff timing is managed by Hangfire, so integrations should not rely on a fixed total duration.
  • Delivery stops as soon as the endpoint returns a 2xx response.
  • A notification is sent to the subscription's email address when automatic retrying begins and when the retry limit is reached.
  • Every delivery attempt records the HTTP status code and reason phrase.

View delivery logs

GET https://api.loyale.io/api/WebhookLog

curl 'https://api.loyale.io/api/WebhookLog' \
  --header 'Authorization: Bearer <access-token>' \
  --header 'X-Scheme: <scheme-id>' \
  --header 'Accept: application/json'

The endpoint returns webhook logs for the scheme, including the subscription and its attempt history. Query-string filtering, sorting, and pagination follow the API's standard Sieve parameters.

FieldDescription
idWebhook log UUID. Use this value for a manual retry.
dataThe stored JSON request body.
webhookIdSubscription UUID used for delivery.
isLastAttemptSuccessfulWhether the most recent attempt returned a 2xx response.
inProgressWhether delivery or automatic retrying is still active.
webhookAttemptsAttempt records containing the response and success state.
createdDate, updatedDateUTC audit timestamps.

Webhook logs are removed by a scheduled retention job. The retention period is controlled by the WebhookLogRetention system setting.

Retry selected webhook logs

POST https://api.loyale.io/api/WebhookLog/RetryWebhook

curl --request POST 'https://api.loyale.io/api/WebhookLog/RetryWebhook' \
  --header 'Authorization: Bearer <access-token>' \
  --header 'X-Scheme: <scheme-id>' \
  --header 'Content-Type: application/json' \
  --data '[
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]'

The request body is an array of webhook-log UUIDs. Loyale reuses each log's stored payload and original subscription. The subscription must still exist; missing log IDs or deleted subscriptions cause the request to fail with an explanatory error. Manual attempts are appended to the existing log.

The previous /api/Webhook/Failed, /api/Webhook/FailedRetry, and /api/Webhook/FailedRetryAll routes are not part of the current API.


What’s Next