# Use custom domain in emails enabled through management api/a0deploy

**URL:** <https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273>\
**Category:** Get Help\
**Tags:** emails, management-api\
**Created:** [August 9, 2023, 5:05pm UTC](https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273 "2023-08-09T17:05:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben.davidson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ben.davidson/32/72153_2.png) [@ben.davidson](https://community.auth0.com/u/ben.davidson)\
**Post date:** [August 9, 2023, 5:05pm UTC](https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273/1 "2023-08-09T17:05:23Z")

</div>

I want emails sent by Auth0 to link to our custom domain (i.e reset password or MFA enrollment emails) rather than the tenant domain. I know that in the management portal there is the switch under Branding \> Custom domains \> Settings but I would like to be able to enable this switch using the management API.

We have most of our Auth0 config managed using the a0deploy npm package and I would prefer not needing to manage a setting like this only though the management portal. Is there a way for me to use the a0deploy package to control this or is my only option the management portal?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [August 10, 2023, 12:12am UTC](https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273/3 "2023-08-10T00:12:14Z")

</div>

Hi @ben.davidson,

Welcome to the Auth0 Community!

It looks like you can do this by updating `enable_custom_domain_in_emails` flag to **true** in the tenant settings. See the Management API’s [Update tenant settings endpoint](https://auth0.com/docs/api/management/v2/tenants/patch-settings).

```auto
{
  "flags": {
    "enable_custom_domain_in_emails": true
  }
}

```

I hope this answers your question!

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ben.davidson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ben.davidson/32/72153_2.png) [@ben.davidson](https://community.auth0.com/u/ben.davidson)\
**Post date:** [August 10, 2023, 9:00am UTC](https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273/4 "2023-08-10T09:00:53Z")

</div>

Thanks Ruben thats just what I was looking for!

---

<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:** [August 24, 2023, 9:01am UTC](https://community.auth0.com/t/use-custom-domain-in-emails-enabled-through-management-api-a0deploy/113273/5 "2023-08-24T09:01:18Z")

</div>

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