tencent cloud

APIs

CreateZone

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-11-25 16:57:57

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

EdgeOne offers three access methods: CNAME, NS, and domainless access. You need to finalize site creation through this API first. For CNAME and NS connected site scenarios, see Quickly access EdgeOne from scratch. For domainless access scenarios, see Quickly enable layer 4 proxy service.

It is recommended to call this API to create a site when a package already exists under the account. Please input PlanId in the parameter to directly bind the site to the package. If PlanId is not input, the created site will be inactive and unable to provide normal services. You need to complete package binding through BindZoneToPlan before the site can provide services normally. If you currently have no bindable package, go to the console to purchase a package to finalize site creation.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateZone.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
Type No String Site access type. If this parameter is not input, the default value partial is used. Valid values of this parameter are as follows:
  • partial: CNAME access;
  • full: NS access;
  • noDomainAccess: access with no domain name.
  • dnsPodAccess: DNSPod managed access. To use this access mode, your domain name should have been hosted on DNSPod;
  • ai: Edge reasoning integration.
  • ZoneName No String Site name. For CNAME/NS access, pass in the second-level domain (example.com) as the site name. For domainless access, leave this value empty.
    Area No String Acceleration region of the layer-7 domain name when Type is partial/full. The following are the values for this parameter. If left empty, the default value is overseas. When Type is noDomainAccess, retain this value as empty:
  • global: global availability zone;
  • mainland: Chinese mainland availability zone;
  • overseas: global availability zone (excluding the Chinese mainland).
  • PlanId No String ID of the target bundle to bind. If your account already has a bundle, you can fill in this parameter to bind the site to it directly. If you currently have no bindable bundle, you can purchase one through CreatePlan.
    Note: If this parameter is not specified, a site in the "init" state will be created. The site is inactive and will not be displayed in the console. You can access BindZoneToPlan to bind a package and activate the site. After activation, the site can provide services properly.

    AliasZoneName No String Identical site identifier. Only numbers, English letters, ".", "-", and "_" are allowed, up to 200 characters. For details, see Identical Site Identifier. If this usage scenario does not apply, just leave this field empty.
    Tags.N No Array of Tag Tag. This parameter is used for authority control and cost allocation of the site. You need to go to the tag console to create the corresponding tag before you can input the corresponding tag key and tag value here.

    3. Output Parameters

    Parameter Name Type Description
    ZoneId String Zone ID.
    OwnershipVerification OwnershipVerification Site ownership verification information. After site creation is completed, you also need to complete ownership verification before the site can run properly.

    When Type = partial, you need to refer to site/domain ownership verification, go to your DNS service provider to add a TXT record or go to the root domain name server to add a file, and then call the API VerifyOwnership to complete the verification;

    When Type is full, you need to refer to modify DNS server to switch the DNS server. You can query whether the DNS switchover is successful through the VerifyOwnership API.

    When Type is noDomainAccess, this value is empty and no operation is needed.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Create an NS Access Type Site

    Create an NS access mode site example.com with the service area as Chinese mainland availability zone and bind the plan edgeone-37q0w6qali10. The API will return DNS server information. Go to your domain name registrar to modify it. See Modify DNS Server.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateZone
    <Common request parameters>
    
    {
        "Type": "full",
        "ZoneName": "example.com",
        "Area": "mainland",
        "PlanId": "edgeone-37q0w6qali10"
    }

    Output Example

    {
        "Response": {
            "ZoneId": "zone-27q0p0bali16",
            "OwnershipVerification": {
                "DnsVerification": null,
                "FileVerification": null,
                "NsVerification": {
                    "NameServers": [
                        "ns1.teodns.com",
                        "ns2.teodns.com"
                    ]
                }
            },
            "RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
        }
    }

    Example2 Creating a Site in No Domain Access Mode

    Create a no domain access mode site and bind the package edgeone-37q0w6qali10. The API will return the site ID. For more information about no domain access mode, see Quickly Enable Layer 4 Proxy Service.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateZone
    <Common request parameters>
    
    {
        "Type": "noDomainAccess",
        "PlanId": "edgeone-37q0w6qali10"
    }

    Output Example

    {
        "Response": {
            "ZoneId": "zone-27q0p0bali16",
            "RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
        }
    }

    Example3 Creating a CNAME-Access Site

    Create a CNAME access type site example.com with the service area as global availability zone and bind the package edgeone-37q0w6qali10. The API will return the site ID and site ownership verification information. You can perform ownership verification for the site. See Site/Domain Ownership Verification.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateZone
    <Common request parameters>
    
    {
        "Type": "partial",
        "ZoneName": "example.com",
        "Area": "global",
        "PlanId": "edgeone-37q0w6qali10"
    }

    Output Example

    {
        "Response": {
            "ZoneId": "zone-27q0p0bali16",
            "OwnershipVerification": {
                "DnsVerification": {
                    "Subdomain": "edgeonereclaim",
                    "RecordType": "TXT",
                    "RecordValue": "reclaim-a24aba2420cf4ce8b7bff7c8be6d337f"
                },
                "FileVerification": {
                    "Path": "/.well-known/teo-verification/vd4ewuqa9n.txt",
                    "Content": "88v24mnnljwbhaohrpfx80f63duhdnjx"
                },
                "NsVerification": null
            },
            "RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    DryRunOperation DryRun operation means the request will be successful, but the DryRun parameter is passed.
    FailedOperation.FailedToCallDNSPod Failed to call DNSPod. Please try again later. If the problem persists, submit a ticket.
    InvalidParameter.InvalidOriginIp Private IP addresses or loopback addresses are not supported as the origin server address.
    InvalidParameter.LengthExceedsLimit The parameter length exceeds the limit.
    InvalidParameter.PlanNotFound The package does not exist.
    InvalidParameter.ZoneHasBeenBound Site has been bound.
    InvalidParameterValue Parameter value error.
    InvalidParameterValue.AccessBlacklist The site domain name is disabled.
    InvalidParameterValue.InvalidTagValue Tag value contains invalid characters.
    InvalidParameterValue.TopLevelDomainNotSupport The current domain suffix is not supported for access. If you need to use it, contact us.
    InvalidParameterValue.ZoneNameInvalid Zone name format is incorrect. Please input a correctly formed domain name.
    InvalidParameterValue.ZoneNameNotSupportPunyCode punycode access is not supported.
    InvalidParameterValue.ZoneNameNotSupportSubDomain Zone does not support subdomain access. Use second-level domains for zone access.
    InvalidParameterValue.ZoneSameAsName The identical site identifier is occupied. Please enter again.
    LimitExceeded.ZoneBindPlan The number of sites that can be bound to the package exceeds the quota.
    OperationDenied Operation denied.
    OperationDenied.ComplianceForbidden The current compliance status is banning.
    OperationDenied.DNSPodUnauthorizedRoleOperation The TEO_QCSLinkedRoleInDnspodAccessEO role is not authorized. Please authorize it and try again.
    OperationDenied.DomainIsBlocked Domain banned. Unable to operate temporarily.
    OperationDenied.RecordIsForbidden DNS record is not allowed to be added.
    ResourceInUse The resource is occupied.
    ResourceInUse.AliasDomain Resource is occupied by the alias domain name of this account.
    ResourceInUse.Cname The resource is occupied by a Cname integration from this account.
    ResourceInUse.Dns Dns resources are occupied.
    ResourceInUse.GenericHost Resource is occupied by a wildcard domain name.
    ResourceInUse.Host Resource is occupied by a subdomain of this account.
    ResourceInUse.NS The resource is occupied by an NS access from this account.
    ResourceInUse.Others Resource is connected by another user.
    ResourceInUse.OthersAliasDomain Resource is occupied by the alias domain name of another account.
    ResourceInUse.OthersCname The resource is occupied by a Cname integration from another account.
    ResourceInUse.OthersHost Resource is occupied by a subdomain of another account.
    ResourceInUse.OthersNS The resource is occupied by an NS access from another account.
    ResourceInUse.SelfAndOthersCname The resource is occupied by simultaneous Cname integrations from this account and another account.
    ResourceNotFound The resource does not exist.
    ResourceNotFound.DNSPodDomainNotInAccount The domain name is not properly accessed via DNSPod. Please try again after DNSPod access.
    UnauthorizedOperation.CamUnauthorized Unauthorized Cam operation.
    UnauthorizedOperation.NoPermission The sub-account does not have operation permissions. Add the required permissions and try again.
    UnauthorizedOperation.Unknown Unknown error occurs on the real server.

    Bantuan dan Dukungan

    Apakah halaman ini membantu?

    masukan