409 on successive PUTS to universal login template

Hi! I’m enjoying learning about auth0 and using it for our product. I’m trying to script CI around a page template, and I notice that a repeated PUT to /api/v2/branding/templates/universal-login will return a 409 after the first request.

The HTTP spec says PUT is intended to be idempotent, meaning replaying the same request should not have an effect. In this context, I think replacing the existing template every time would be the desired behavior, instead of an error.

As it is now, on any template changes, we have to first DELETE the current template in order to PUT successfully with the following request. If I were to script a DELETE before a PUT, it might introduce a bit of downtime to users in the small time between 2 requests, so this behavior is adding some complexity to all users of the API.

That indeed seems unexpected or at least I also share your opinion; will report internally and update here once I have some feedback.

1 Like

A quick update; our engineering team is checking this situation as apparently there’s been a regression so hopefully this can be addressed in the sort term.

1 Like

Thanks for following up on that and the update @jmangelo!

No worries, as another FYI it seems that initial investigation found that the possible reason for the regression crosses product team boundaries so hopefully my initial opinion that this could be addressed in the short term will still hold. :slight_smile: