Skip to main content
PUT
/
api
/
v1
/
zones
/
{zone}
/
dns-records
/
{id}
edit dns record
curl --request PUT \
  --url https://dns-service.iran.liara.ir/api/v1/zones/{zone}/dns-records/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "<string>",
  "ttl": 123,
  "contents": [
    {}
  ]
}
'
{
  "status": "<string>",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "type": "<string>",
    "ttl": 123,
    "contents": [
      {}
    ]
  }
}

Authorizations

Authorization
string
header
required

Enter the token with the Bearer: prefix, e.g. "Bearer abcde12345". #

Path Parameters

zone
string
required

The name of the zone to edit dns record

id
string
required

The id of dns record to edit its data

Body

application/json
name
string

The name of dns record, "@" for zone name(root level), "*" for wild card and any valid value with RFC 1123

type
string

The type of dns record, valid values: [A, AAAA, TXT, CNAME, ALIAS, MX, SRV, SPF, PTR]

ttl
number

The ttl of dns record, is not required, valid values: [120, 180, 300, 600, 900, 1800, 3600, 7200, 18000, 43200, 86400, 172800, 432000]

contents
object[]

Array of content of dns record, change base on type of dns record

Response

Successful operation

status
string

success

data
object