Skip to main content
POST
/
core
/
v1
/
domains
/
{domainName}
:enableAutorenew
Enable Autorenew
curl --request POST \
  --url https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: <content-type>'
import requests

url = "https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew"

headers = {
    "Content-Type": "<content-type>",
    "Authorization": "Basic <encoded-value>"
}

response = requests.post(url, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': '<content-type>', Authorization: 'Basic <encoded-value>'}
};

fetch('https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Basic <encoded-value>",
    "Content-Type: <content-type>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "<content-type>")
	req.Header.Add("Authorization", "Basic <encoded-value>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew")
  .header("Content-Type", "<content-type>")
  .header("Authorization", "Basic <encoded-value>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.dev.name.com/core/v1/domains/{domainName}:enableAutorenew")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "domainName": "example.com",
  "createDate": "2023-01-15T14:30:00Z",
  "expireDate": "2025-01-15T14:30:00Z",
  "autorenewEnabled": true,
  "locked": true,
  "locks": [
    "clientTransferProhibited",
    "clientHold"
  ],
  "transferLockExpiresAt": "2023-03-16T14:30:00Z",
  "privacyEnabled": true,
  "contacts": {
    "admin": {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Example Inc.",
      "address1": "123 Main Street",
      "address2": "Suite 400",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "fax": "+15557654321",
      "isVerified": true,
      "verificationId": 12345
    },
    "billing": {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Example Inc.",
      "address1": "123 Main Street",
      "address2": "Suite 400",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "fax": "+15557654321",
      "isVerified": true,
      "verificationId": 12345
    },
    "registrant": {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Example Inc.",
      "address1": "123 Main Street",
      "address2": "Suite 400",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "fax": "+15557654321",
      "isVerified": true,
      "verificationId": 12345
    },
    "tech": {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Example Inc.",
      "address1": "123 Main Street",
      "address2": "Suite 400",
      "city": "New York",
      "state": "NY",
      "zip": "10001",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "fax": "+15557654321",
      "isVerified": true,
      "verificationId": 12345
    }
  },
  "nameservers": [
    "ns1.example.com",
    "ns2.example.com"
  ],
  "renewalPrice": 12.99
}
{
  "message": "Bad Request",
  "details": "'domainName' cannot be null"
}
{
  "message": "Unauthorized"
}
{
  "message": "Permission denied",
  "details": "Failed authentication"
}
{
  "message": "Not Found",
  "details": "The requested domain does not exist."
}
{
  "message": "Method Not Allowed"
}
{
  "message": "The 'Content-Type' header must be 'application/json' for this request."
}
{
  "message": "Rate Limit Exceeded"
}
{
  "message": "Internal Server Error",
  "details": "Something went wrong."
}
{
  "message": "The server received an invalid response from the upstream server."
}
{
  "message": "The upstream server is taking too long to respond."
}

Authorizations

Authorization
string
header
required

Authenticate via HTTP Basic with your account username and API token. Examples use an explicit 'Authorization: Basic <base64(username:token)>' header; 'curl -u username:token' is equivalent. For sandbox, append "-test" to your username and use your sandbox token on api.dev.name.com.

Headers

Content-Type
enum<string>
required

Required Content-Type Header for POST requests.

Available options:
application/json

Path Parameters

domainName
string
required

DomainName is the domain name to enable autorenew for.

Response

A successful response.

Domain contains all relevant data for a domain.

domainName
string

The punycode-encoded value of the domain name.

Example:

"example.com"

createDate
string<date-time>
read-only

The date and time when the domain was created at the registry.

Example:

"2023-01-15T14:30:00Z"

expireDate
string<date-time>
read-only

The date and time when the domain will expire.

Example:

"2025-01-15T14:30:00Z"

autorenewEnabled
boolean

Indicates whether the domain is set to renew automatically before expiration.

Example:

true

locked
boolean

Indicates if the domain is transfer locked, preventing transfers to another registrar.

Example:

true

locks
string[]
read-only

List of all registry locking statuses currently applied to the domain. Use this to see which locks are active (e.g. clientTransferProhibited, clientHold). Empty when the domain has no locks applied.

Example:
["clientTransferProhibited", "clientHold"]
transferLockExpiresAt
string<date-time>
read-only

When present, the domain has an active ICANN-mandated transfer lock (new registration, transfer-in, or material registrant contact change) that blocks client unlock via the API until this time. When omitted, there is no active policy transfer lock with a known expiry — the domain may still be locked (locked: true) due to a voluntary user lock. Does not represent RegistrarLock, AccountLock, verification holds, trademark-claim locks, or admin TransferLock with no expiry date.

Example:

"2023-03-16T14:30:00Z"

privacyEnabled
boolean

Indicates if Whois Privacy is enabled for this domain.

Example:

true

contacts
object

Contacts stores the contact information for the roles related to domains.

nameservers
string[]

The list of nameservers assigned to this domain. If unspecified, it defaults to the account's default nameservers.

Example:
["ns1.example.com", "ns2.example.com"]
renewalPrice
number<double>
read-only

The cost to renew the domain. This may be required for the RenewDomain operation.

Example:

12.99