Custom headers not included in first audit trail webhook delivery

Last updated: September 9, 2025

Custom headers not included in first audit trail webhook delivery

When setting up custom headers for audit trail webhooks, you may notice that the first delivery after configuration doesn't include your custom headers, even though they appear to be configured correctly.

Why this happens

The system creates audit trail configurations in two separate requests:

  1. First, it creates the audit trail webhook endpoint

  2. Then, it sets the custom headers configuration

The first audit trail delivery (with action set to audit_trail_webhook.set) is sent during the initial creation step, before the custom headers are applied. Starting with the second delivery, all custom headers will be included as expected.

Workaround

To ensure your endpoint receives a test delivery with custom headers included:

  1. Disable the custom headers configuration

  2. Re-enable the custom headers configuration

This will trigger a new audit trail delivery that includes your custom headers, allowing you to verify that your endpoint is receiving the Authorization header correctly.

Expected behavior

After the initial setup, all subsequent audit trail deliveries will include your configured custom headers. Only the very first delivery immediately after initial configuration will be missing the custom headers.