curl --request PATCH \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"autorenew": true,
"locked": true
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}"
payload = {
"autorenew": True,
"locked": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({autorenew: true, locked: true})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}', 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.instacloud.com/orgs/{orgId}/domains/{domainName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'autorenew' => true,
'locked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}"
payload := strings.NewReader("{\n \"autorenew\": true,\n \"locked\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"autorenew\": true,\n \"locked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"autorenew\": true,\n \"locked\": true\n}"
response = http.request(request)
puts response.read_body{
"domainName": "<string>",
"status": "registered",
"hostnames": [
{
"hostname": "<string>",
"state": "pending",
"service": "<string>",
"reason": "<string>"
}
],
"registeredAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"autorenew": true,
"privacy": true,
"locked": true,
"nameservers": [
"<string>"
],
"delegated": true,
"custody": "registrar",
"transferLockExpiresAt": "2023-11-07T05:31:56Z",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update purchased domain
Token scope: account · org — read-only tokens refused (not a GET).
Turn renewal or the transfer lock on or off for a domain this org bought. A field left out keeps its value. (admin+ for the lock)
curl --request PATCH \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"autorenew": true,
"locked": true
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}"
payload = {
"autorenew": True,
"locked": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({autorenew: true, locked: true})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}', 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.instacloud.com/orgs/{orgId}/domains/{domainName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'autorenew' => true,
'locked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}"
payload := strings.NewReader("{\n \"autorenew\": true,\n \"locked\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"autorenew\": true,\n \"locked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"autorenew\": true,\n \"locked\": true\n}"
response = http.request(request)
puts response.read_body{
"domainName": "<string>",
"status": "registered",
"hostnames": [
{
"hostname": "<string>",
"state": "pending",
"service": "<string>",
"reason": "<string>"
}
],
"registeredAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"autorenew": true,
"privacy": true,
"locked": true,
"nameservers": [
"<string>"
],
"delegated": true,
"custody": "registrar",
"transferLockExpiresAt": "2023-11-07T05:31:56Z",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).
Body
Response
Default Response
detached: every service its hostnames named is gone — attach it again
registered, attaching, active, attach_failed, detached Show child attributes
Show child attributes
the registrar transfer lock: while it is on, no other registrar can pull the domain away. Turn it off to move the domain out. What the last write reported, or what registration asked for — nothing reads it back
what the registrar holds. Empty means never written — only a nameserver write fills it in
the zone is answered by nameservers InstaCloud cannot write to (custody foreign), so nothing published resolves and an attach is refused. A MANAGED delegation reads false: the platform still publishes there
who answers the domain's zone: the registrar's own nameservers, a managed InstaCloud zone (delegated, still platform-published), or somewhere the platform cannot write
registrar, managed, foreign ICANN 60-day lock after registration: no transfer out before this, whatever locked says