# Set template for New Universal Login Experience not working anymore

**URL:** <https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [June 6, 2025, 10:11pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712 "2025-06-06T22:11:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bengarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bengarvey/32/36816_2.png) [@bengarvey](https://community.auth0.com/u/bengarvey)\
**Post date:** [June 6, 2025, 10:11pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712/1 "2025-06-06T22:11:09Z")

</div>

In 2022 we setup a custom template for the New Universal Login Experience. It’s pretty simple, just some marketing copy and the required {%- auth0:widget -%} in the body and {%- auth0:head -%} in head of the page. I tried to update it today via the doc form and curl and always get this error:

{  
“statusCode”: 400,  
“error”: “Bad Request”,  
“message”: “Payload validation error: ‘Data does not match any schemas from ‘oneOf’’.”,  
“errorCode”: “invalid\_body”  
}

I even get this if I GET the current template and send it back up. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 6, 2025, 10:33pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712/2 "2025-06-06T22:33:54Z")

</div>

Hi @bengarvey

Welcome to the Auth0 Community!

Thank you for posting your question. I’ve checked our documentation and found this article that addresses the error that you are getting while updating the Universal Login Template → [HTTP 400 when patching /api/v2/branding/templates/universal-login](https://community.auth0.com/t/http-400-when-patching-api-v2-branding-templates-universal-login/99188)

> Verify that the page template is smaller than 102,400 characters.
> 
> There may be other use cases where this error happens due to a JSON payload that doesn’t work well with the [set template API](https://auth0.com/docs/api/management/v2#!/Branding/put_universal_login).
> 
> The best way to recover from this state is to [delete the template](https://auth0.com/docs/api/management/v2#!/Branding/delete_universal_login) and set a new template using an HTML payload. As documented in the API explorer, set template API supports HTML payload using content-type set to text/html.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![bengarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bengarvey/32/36816_2.png) [@bengarvey](https://community.auth0.com/u/bengarvey)\
**Post date:** [June 7, 2025, 2:05pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712/3 "2025-06-07T14:05:13Z")

</div>

Definitely way under 102K characters. It was around 16,000.

“JSON payload that doesn’t work well”  
It’s the same one I set up in 2022.

Would really prefer not to delete it since I have no assurance I can get back to the current state.

---

<div class="post-metadata">

**Author:** ![bengarvey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bengarvey/32/36816_2.png) [@bengarvey](https://community.auth0.com/u/bengarvey)\
**Post date:** [June 7, 2025, 2:24pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712/4 "2025-06-07T14:24:51Z")

</div>

Ok I DID get this to work by using text/html content type and curl.

For example:  
curl -L -i -X PUT ‘AUTH0\_APP\_URL/api/v2/branding/templates/universal-login’   
-H ‘Content-Type: text/html’   
-H ‘Authorization: Bearer AUTH\_TOKEN’  
–data-raw ‘HTML GOES HERE’

There must be some issue with the json parsing here (not surprising since it’s asking you to shove a LOT of html into a json field, but hope this helps someone else because the docs don’t really cover this with a working example.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 21, 2025, 2:25pm UTC](https://community.auth0.com/t/set-template-for-new-universal-login-experience-not-working-anymore/187712/5 "2025-06-21T14:25:00Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
