You need to enable JavaScript to run this app.
TrafficRoute DNS Suite

TrafficRoute DNS Suite

Copy page
Download PDF
DNS Record APIs
CreateRecord
Copy page
Download PDF
CreateRecord

Creates a DNS record for a domain.

Usage

  • Rate limit: 10 calls per second.

Request

  • Method: POST
  • URL: https://private-zone.volcengineapi.com/?Action=CreateRecord?Version=2022-06-01

Request parameters

In addition to the following parameters, you also need to include the authentication parameters.

Query

Name
Type
Required
Example
Description
Action
String
Yes
CreateRecord
The name of the API. The value of this parameter is CreateRecord.
Version
String
Yes
2022-06-01
The version of the API. The value of this parameter is 2022-06-01.

Body

Name
Type
Required
Example
Description
ZID
Integer
Yes
1234
The unique ID that identifies the domain. You can obtain this through the following APIs:
  • CreatePrivateZone API
  • ListPrivateZones API
Host
String
Yes
abc
The domain name prefix of the subdomain.
Value
String
Yes
1.1.1.1
The record value. See Supported DNS Record Types.
Type
String
Yes
A
The record type. For different types of records, see Supported DNS Record Types. The value of this parameter can be:
  • A: A record.
  • AAAA: AAAA record.
  • CNAME: CNAME record.
  • TXT: TXT record.
  • MX: MX record.
  • PTR: PTR record.
Weight
Integer
No
1
The weight of the record value. The weight of the record value only takes effect when load balancing is enabled for the domain. See UpdatePrivateZone API to learn how to enable or disable load balancing for a domain. The default value is 1.
TTL
Integer
No
600
The Time to Live (TTL) of the DNS record. The unit is seconds. The default value is 600.
Line
String
No
default
Line of the record. This parameter can only be set to default.
Remark
String
No
Remark
The remark. Supports UTF-8 encoding. The length should not exceed 16 characters. The default value is an empty string.
ClientToken
String
No
123456abcdef
Used to ensure the idempotence of the request. If you set this parameter, the results returned will be the same under the same request parameters, regardless of how many times this API is called. This parameter only allows ASCII characters and cannot exceed 64 characters.

Response parameters

ResponseMetadata object

Name
Type
Description
RequestId
String
The ID that identifies this request.
Action
String
The value of the Action query parameter.
Version
String
The API version.
Service
String
The service type.
Region
String
The region where the service is located.

Result object

Name
Type
Description
RecordID
String
The unique ID of a record。

Example

Request example

POST https://private-zone.volcengineapi.com/?Action=CreateRecord&Version=2022-06-01

{
    "ZID": 1068,
    "Host": "www",
    "Value": "10.0.0.1",
    "Type": "A",
    "Weight": 10,
    "TTL": 600,
    "Line": "default",
    "Remark":""
}

Response example

{
    "ResponseMetadata": {
        "RequestId": "20221215101225DB0A30AF803D07576779",
        "Action": "CreateRecord",
        "Version": "2022-06-01",
        "Service": "private_zone",
        "Region": "cn-beijing"
    },
    "Result": {
        "RecordID": "9079256848778957482"
    }
}

Common error codes

Refer to Common Error Codes.

Last updated: 2025.11.04 20:47:31