メインコンテンツへスキップ
POST
/
custom-domains
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.customDomains.create({
        domain: "domain",
        type: "auth0_managed_certs",
    });
}
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>"
}

承認

Authorization
string
header
必須

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

ボディ

domain
string
必須

Domain name.

Pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$
type
enum<string>
必須

Custom domain provisioning type. Must be auth0_managed_certs or self_managed_certs.

利用可能なオプション:
auth0_managed_certs,
self_managed_certs
verification_method
enum<string>
デフォルト:txt

Custom domain verification method. Must be txt.

利用可能なオプション:
txt
tls_policy
enum<string>
デフォルト:recommended

Custom domain TLS policy. Must be recommended, includes TLS 1.2.

利用可能なオプション:
recommended
custom_client_ip_header
enum<string> | null
デフォルト:true-client-ip

The HTTP header to fetch the client's IP address

利用可能なオプション:
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>

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

Maximum string length: 255

レスポンス

Custom domain successfully created (verification is pending).

custom_domain_id
string
デフォルト:cd_0000000000000001
必須

ID of the custom domain.

domain
string
デフォルト:login.mycompany.com
必須

Domain name.

primary
boolean
デフォルト:false
必須

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

status
enum<string>
デフォルト:ready
必須

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

利用可能なオプション:
pending_verification,
ready,
failed
type
enum<string>
デフォルト:self_managed_certs
必須

Custom domain provisioning type. Can be auth0_managed_certs or self_managed_certs.

利用可能なオプション:
auth0_managed_certs,
self_managed_certs
verification
object
必須

Domain verification settings.

is_default
boolean
デフォルト: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
デフォルト: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.