Passer au contenu principal
PATCH
/
custom-domains
/
{id}
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.customDomains.update("id", {});
}
main();
{
  "custom_domain_id": "cd_0000000000000001",
  "domain": "login.mycompany.com",
  "primary": false,
  "status": "ready",
  "type": "self_managed_certs",
  "verification": {
    "methods": [
      {
        "name": "txt",
        "record": "auth0-domain-verification=...",
        "domain": "_cf-custom-hostname.login.mycompany.com"
      }
    ],
    "status": "verified",
    "error_msg": "<string>",
    "last_verified_at": "<string>"
  },
  "is_default": false,
  "custom_client_ip_header": "<string>",
  "tls_policy": "recommended",
  "domain_metadata": {},
  "certificate": {
    "status": "provisioning",
    "error_msg": "<string>",
    "certificate_authority": "letsencrypt",
    "renews_before": "<string>"
  },
  "relying_party_identifier": "<string>"
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

The id of the custom domain to update

Corps

tls_policy
enum<string>
défaut:recommended

recommended includes TLS 1.2

Options disponibles:
recommended
custom_client_ip_header
enum<string> | null
défaut:true-client-ip

The HTTP header to fetch the client's IP address

Options disponibles:
true-client-ip,
cf-connecting-ip,
x-forwarded-for,
x-azure-clientip,
domain_metadata
object

Domain metadata associated with the custom domain, in the form of an object with string values (max 255 chars). Maximum of 10 domain metadata properties allowed.

relying_party_identifier
string<hostname> | null

Relying Party ID (rpId) to be used for Passkeys on this custom domain. Set to null to remove the rpId and fall back to using the full domain.

Maximum string length: 255

Réponse

Custom domain updated.

custom_domain_id
string
défaut:cd_0000000000000001
requis

ID of the custom domain.

domain
string
défaut:login.mycompany.com
requis

Domain name.

primary
boolean
défaut:false
requis

Whether this is a primary domain (true) or not (false).

status
enum<string>
défaut:ready
requis

Custom domain configuration status. Can be failed, pending_verification, or ready.

Options disponibles:
pending_verification,
ready,
failed
type
enum<string>
défaut:self_managed_certs
requis

Custom domain provisioning type. Can be auth0_managed_certs or self_managed_certs.

Options disponibles:
auth0_managed_certs,
self_managed_certs
verification
object
requis

Domain verification settings.

is_default
boolean
défaut:false

Whether this is the default custom domain (true) or not (false).

custom_client_ip_header
string | null

The HTTP header to fetch the client's IP address

tls_policy
string
défaut:recommended

The TLS version policy

domain_metadata
object

Domain metadata associated with the custom domain, in the form of an object with string values (max 255 chars). Maximum of 10 domain metadata properties allowed.

certificate
object

Certificate information. This object is relevant only for Custom Domains with Auth0-Managed Certificates.

relying_party_identifier
string<hostname>

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.