Added validation for webhook subscription URLs
about 2 hours ago by Gusto Developer Relations
When you create a webhook subscription at POST /v1/webhook_subscriptions, Gusto Embedded now validates the url as publicly-routable before saving the subscription. If the URL doesn't pass validation, the request fails with 422 and an error on url instead of 201 Created, no subscription is persisted, and we don't POST a verification token to your endpoint. If DNS lookup fails while we validate (for example, if your receiver is briefly down), we still accept the subscription, since delivery re-checks the destination later.
Existing subscriptions aren't retroactively re-validated. If a saved url later fails validation, verification and delivery behave the same as they do for any unreachable endpoint.