API
  • History
  • Introduction
  • API Category
  • Making API Requests
    • Request Structure
    • Common Params
    • Signature v3
    • Signature
    • Responses
  • Site APIs
    • CreateZone
    • DescribeIdentifications
    • ModifyZone
    • DeleteZone
    • ModifyZoneStatus
    • CheckCnameStatus
    • IdentifyZone
    • DescribeZones
    • ExportZoneConfig
    • ImportZoneConfig
    • DescribeZoneConfigImportResult
  • Acceleration Domain Management APIs
    • CreateAccelerationDomain
    • DescribeAccelerationDomains
    • ModifyAccelerationDomain
    • ModifyAccelerationDomainStatuses
    • DeleteAccelerationDomains
    • CreateSharedCNAME
    • DescribeSharedCNAME
    • ModifySharedCNAME
    • BindSharedCNAME
    • DeleteSharedCNAME
  • Site Acceleration Configuration APIs
    • CreateL7AccRules
    • DescribeL7AccRules
    • ModifyL7AccRule
    • DeleteL7AccRules
    • DescribeL7AccSetting
    • ModifyL7AccSetting
    • ModifyL7AccRulePriority
  • Edge Function APIs
    • CreateFunction
    • DescribeFunctions
    • ModifyFunction
    • DeleteFunction
    • CreateFunctionRule
    • DescribeFunctionRules
    • ModifyFunctionRule
    • ModifyFunctionRulePriority
    • DeleteFunctionRules
    • DescribeFunctionRuntimeEnvironment
    • HandleFunctionRuntimeEnvironment
    • ModifyFunctionComponentBindings
    • DescribeFunctionComponentBindings
  • Alias Domain APIs
    • CreateAliasDomain
    • DescribeAliasDomains
    • ModifyAliasDomain
    • ModifyAliasDomainStatus
    • DeleteAliasDomain
  • Security Configuration APIs
    • CreateSecurityIPGroup
    • DescribeSecurityIPGroup
    • ModifySecurityIPGroup
    • DeleteSecurityIPGroup
    • DescribeSecurityTemplateBindings
    • BindSecurityTemplateToEntity
    • DescribeSecurityPolicy
    • ModifySecurityPolicy
    • DescribeSecurityIPGroupInfo
    • DescribeSecurityIPGroupContent
    • CreateSecurityJSInjectionRule
    • DescribeSecurityJSInjectionRule
    • ModifySecurityJSInjectionRule
    • DeleteSecurityJSInjectionRule
    • CreateSecurityClientAttester
    • DescribeSecurityClientAttester
    • ModifySecurityClientAttester
    • DeleteSecurityClientAttester
    • CreateWebSecurityTemplate
    • DeleteWebSecurityTemplate
    • DescribeWebSecurityTemplates
    • ModifyWebSecurityTemplate
    • DescribeDDoSProtection
    • DescribeWebSecurityTemplate
    • ModifyDDoSProtection
  • Layer 4 Application Proxy APIs
    • CreateL4Proxy
    • ModifyL4Proxy
    • ModifyL4ProxyStatus
    • DescribeL4Proxy
    • DeleteL4Proxy
    • CreateL4ProxyRules
    • ModifyL4ProxyRules
    • ModifyL4ProxyRulesStatus
    • DescribeL4ProxyRules
    • DeleteL4ProxyRules
  • Content Management APIs
    • CreatePurgeTask
    • DescribePurgeTasks
    • CreatePrefetchTask
    • DescribePrefetchTasks
    • DescribeContentQuota
    • DescribePrefetchOriginLimit
    • ModifyPrefetchOriginLimit
  • Data Analysis APIs
    • DescribeDDoSAttackData
    • DescribeDDoSAttackEvent
    • DescribeDDoSAttackTopData
    • DescribeOverviewL7Data
    • DescribeTimingL7OriginPullData
    • DescribeTimingL4Data
    • DescribeTimingL7AnalysisData
    • DescribeTopL7AnalysisData
    • DescribeTimingL7CacheData
    • DescribeTopL7CacheData
  • Log Service APIs
    • DownloadL7Logs
    • DownloadL4Logs
    • CreateCLSIndex
    • CreateRealtimeLogDeliveryTask
    • ModifyRealtimeLogDeliveryTask
    • DeleteRealtimeLogDeliveryTask
    • DescribeRealtimeLogDeliveryTasks
  • Billing APIs
    • CreatePlan
    • DescribePlans
    • UpgradePlan
    • RenewPlan
    • ModifyPlan
    • IncreasePlanQuota
    • DestroyPlan
    • CreatePlanForZone
    • BindZoneToPlan
    • DescribeBillingData
    • DescribeAvailablePlans
  • Certificate APIs
    • DescribeDefaultCertificates
    • ModifyHostsCertificate
    • ApplyFreeCertificate
    • CheckFreeCertificateVerification
  • Origin Protection APIs
    • EnableOriginACL
    • ModifyOriginACL
    • DescribeOriginACL
    • ConfirmOriginACLUpdate
    • DisableOriginACL
  • Load Balancing APIs
    • CreateOriginGroup
    • ModifyOriginGroup
    • DeleteOriginGroup
    • DescribeOriginGroup
    • CreateLoadBalancer
    • ModifyLoadBalancer
    • DeleteLoadBalancer
    • DescribeLoadBalancerList
    • DescribeOriginGroupHealthStatus
  • Diagnostic Tool APIs
    • DescribeIPRegion
  • Custom Response Page APIs
    • CreateCustomizeErrorPage
    • DescribeCustomErrorPages
    • ModifyCustomErrorPage
    • DeleteCustomErrorPage
  • Version Management APIs
    • CreateConfigGroupVersion
    • DeployConfigGroupVersion
    • DescribeConfigGroupVersionDetail
    • DescribeConfigGroupVersions
    • DescribeDeployHistory
    • DescribeEnvironments
    • ModifyZoneWorkMode
  • API Security APIs
    • CreateSecurityAPIResource
    • DescribeSecurityAPIResource
    • ModifySecurityAPIResource
    • DeleteSecurityAPIResource
    • CreateSecurityAPIService
    • DescribeSecurityAPIService
    • ModifySecurityAPIService
    • DeleteSecurityAPIService
  • DNS Record APIs
    • CreateDnsRecord
    • DescribeDnsRecords
    • ModifyDnsRecords
    • ModifyDnsRecordsStatus
    • DeleteDnsRecords
  • Content Identifier APIs
    • CreateContentIdentifier
    • DescribeContentIdentifiers
    • ModifyContentIdentifier
    • DeleteContentIdentifier
  • Legacy APIs
    • DescribeOriginProtection
    • CreateRule
    • DescribeRules
    • ModifyRule
    • DeleteRules
    • DescribeZoneSetting
    • ModifyZoneSetting
    • DescribeHostsSetting
    • DescribeRulesSetting
    • CreateApplicationProxy
    • DescribeApplicationProxies
    • ModifyApplicationProxy
    • ModifyApplicationProxyStatus
    • DeleteApplicationProxy
    • CreateApplicationProxyRule
    • ModifyApplicationProxyRule
    • ModifyApplicationProxyRuleStatus
    • DeleteApplicationProxyRule
  • Ownership APIs
    • VerifyOwnership
  • Image and Video Processing APIs
    • CreateJustInTimeTranscodeTemplate
    • DescribeJustInTimeTranscodeTemplates
    • DeleteJustInTimeTranscodeTemplates
  • Multi-Channel Security Gateway APIs
    • ConfirmMultiPathGatewayOriginACL
    • DescribeMultiPathGatewayOriginACL
    • CreateMultiPathGateway
    • DescribeMultiPathGateways
    • DescribeMultiPathGateway
    • ModifyMultiPathGateway
    • ModifyMultiPathGatewayStatus
    • DeleteMultiPathGateway
    • DescribeMultiPathGatewayRegions
    • CreateMultiPathGatewaySecretKey
    • DescribeMultiPathGatewaySecretKey
    • ModifyMultiPathGatewaySecretKey
    • RefreshMultiPathGatewaySecretKey
    • CreateMultiPathGatewayLine
    • DescribeMultiPathGatewayLine
    • ModifyMultiPathGatewayLine
    • DeleteMultiPathGatewayLine
  • KV Storage APIs
    • ModifyEdgeKVNamespace
    • EdgeKVPut
    • EdgeKVList
    • EdgeKVGet
    • EdgeKVDelete
    • DescribeEdgeKVNamespaces
    • DeleteEdgeKVNamespace
    • CreateEdgeKVNamespace
  • Data Types
  • Error Codes

CreateZone

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: CreateZone.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
TypeNoStringSite 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.
  • ZoneNameNoStringSite name. For CNAME/NS access, pass in the second-level domain (example.com) as the site name. For domainless access, leave this value empty.
    AreaNoStringAcceleration 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).
  • PlanIdNoStringID 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.

    AliasZoneNameNoStringIdentical 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.NNoArray of TagTag. 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 NameTypeDescription
    ZoneIdStringZone ID.
    OwnershipVerificationOwnershipVerificationSite 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.
    RequestIdStringThe 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 CodeDescription
    DryRunOperationDryRun operation means the request will be successful, but the DryRun parameter is passed.
    FailedOperation.FailedToCallDNSPodFailed to call DNSPod. Please try again later. If the problem persists, submit a ticket.
    InvalidParameter.InvalidOriginIpPrivate IP addresses or loopback addresses are not supported as the origin server address.
    InvalidParameter.LengthExceedsLimitThe parameter length exceeds the limit.
    InvalidParameter.PlanNotFoundThe package does not exist.
    InvalidParameter.ZoneHasBeenBoundSite has been bound.
    InvalidParameterValueParameter value error.
    InvalidParameterValue.AccessBlacklistThe site domain name is disabled.
    InvalidParameterValue.InvalidTagValueTag value contains invalid characters.
    InvalidParameterValue.TopLevelDomainNotSupportThe current domain suffix is not supported for access. If you need to use it, contact us.
    InvalidParameterValue.ZoneNameInvalidZone name format is incorrect. Please input a correctly formed domain name.
    InvalidParameterValue.ZoneNameNotSupportPunyCodepunycode access is not supported.
    InvalidParameterValue.ZoneNameNotSupportSubDomainZone does not support subdomain access. Use second-level domains for zone access.
    InvalidParameterValue.ZoneSameAsNameThe identical site identifier is occupied. Please enter again.
    LimitExceeded.ZoneBindPlanThe number of sites that can be bound to the package exceeds the quota.
    OperationDeniedOperation denied.
    OperationDenied.ComplianceForbiddenThe current compliance status is banning.
    OperationDenied.DNSPodUnauthorizedRoleOperationThe TEO_QCSLinkedRoleInDnspodAccessEO role is not authorized. Please authorize it and try again.
    OperationDenied.DomainIsBlockedDomain banned. Unable to operate temporarily.
    OperationDenied.RecordIsForbiddenDNS record is not allowed to be added.
    ResourceInUseThe resource is occupied.
    ResourceInUse.AliasDomainResource is occupied by the alias domain name of this account.
    ResourceInUse.CnameThe resource is occupied by a Cname integration from this account.
    ResourceInUse.DnsDns resources are occupied.
    ResourceInUse.GenericHostResource is occupied by a wildcard domain name.
    ResourceInUse.HostResource is occupied by a subdomain of this account.
    ResourceInUse.NSThe resource is occupied by an NS access from this account.
    ResourceInUse.OthersResource is connected by another user.
    ResourceInUse.OthersAliasDomainResource is occupied by the alias domain name of another account.
    ResourceInUse.OthersCnameThe resource is occupied by a Cname integration from another account.
    ResourceInUse.OthersHostResource is occupied by a subdomain of another account.
    ResourceInUse.OthersNSThe resource is occupied by an NS access from another account.
    ResourceInUse.SelfAndOthersCnameThe resource is occupied by simultaneous Cname integrations from this account and another account.
    ResourceNotFoundThe resource does not exist.
    ResourceNotFound.DNSPodDomainNotInAccountThe domain name is not properly accessed via DNSPod. Please try again after DNSPod access.
    UnauthorizedOperation.CamUnauthorizedUnauthorized Cam operation.
    UnauthorizedOperation.NoPermissionThe sub-account does not have operation permissions. Add the required permissions and try again.
    UnauthorizedOperation.UnknownUnknown error occurs on the real server.