REST Hook Subscription Issue with Zapier Integration

I’m struggling with a weird problem in my Zapier webhook setup. The authentication part works fine, but something strange happens after that.

When Zapier sends me the subscription request with the webhook URL and event details, everything looks normal. But here’s the issue - as soon as I try to send any data back to their webhook URL, it automatically triggers an unsubscribe request. This means the webhook gets disabled right away.

Every time I attempt to send data to the webhook endpoint, I just get back a message saying to unsubscribe. This is really frustrating because I can’t get the integration to work properly.

Initial subscription data from Zapier:

{
    "webhook_endpoint": "https://hooks.zapier.com/hooks/catch/1234567/abcd123/",
    "callback_url": "https://hooks.zapier.com/hooks/catch/1234567/abcd123/",
    "trigger_event": "fetch_user"
}

Headers I receive:

{
    "host": "myapp.tunnel.io",
    "x-zapier-test": "true",
    "content-type": "application/json",
    "user-agent": "Zapier",
    "authorization": "Basic ABC123DEF456==",
    "content-length": "185"
}

Data I’m sending back:

[{
    "name": "John",
    "surname": "Smith", 
    "user_id": "USR789",
    "trigger_event": "fetch_user",
    "contact_email": "[email protected]"
}]

Response I get:

{
    "result": "ok",
    "delivery_id": "abc-123-def-456",
    "hook_id": "hook_789",
    "trace_id": "trace_123"
}

Right after getting this response, the unsubscribe callback gets triggered automatically. Has anyone seen this behavior before?

This happens because you’re treating the test request like a real event. When Zapier sends that x-zapier-test: true header, it’s just validating your webhook - not asking for actual data. If you send back real user data during this test, Zapier thinks something’s broken and kills the webhook automatically. Check for that test header and return an empty array or simple success message instead. Only send real data when there’s no test header. I made this exact mistake on my first Zapier integration and wasted hours debugging before I figured out test requests need different handling.

ur sending data during Zapier’s test phase, which confuses it. When u see the x-zapier-test header, just return a 200 status with an empty response - don’t send any real user data. Zapier will unsubscribe if it gets unexpected data during testing.

I encountered a similar problem with my webhook setup recently. It seems that when you respond to the initial subscription with data, Zapier interprets this as a test failure. The x-zapier-test: true header indicates that the webhook is still in testing mode, and sending actual data can lead to the unexpected unsubscribe behavior. Instead, store the webhook details and send data only when the real trigger event occurs. Follow this sequence: accept the subscription request, store the webhook URL, send a simple acknowledgment, and then respond to actual events as they come. This way, you avoid triggering an automatic unsubscribe.