curl --request PATCH \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"answer": "<string>",
"ttl": 302550,
"priority": 32767
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}"
payload = {
"host": "<string>",
"answer": "<string>",
"ttl": 302550,
"priority": 32767
}
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({host: '<string>', answer: '<string>', ttl: 302550, priority: 32767})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}', 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}/records/{recordId}",
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([
'host' => '<string>',
'answer' => '<string>',
'ttl' => 302550,
'priority' => 32767
]),
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}/records/{recordId}"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\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}/records/{recordId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}")
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 \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"type": "A",
"host": "<string>",
"fqdn": "<string>",
"answer": "<string>",
"ttl": 123,
"managed": true,
"priority": 123,
"hostname": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update domain record
Token scope: account · org — read-only tokens refused (not a GET).
Change a DNS record; a field left out keeps its value. A managed record is refused.
curl --request PATCH \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"answer": "<string>",
"ttl": 302550,
"priority": 32767
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}"
payload = {
"host": "<string>",
"answer": "<string>",
"ttl": 302550,
"priority": 32767
}
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({host: '<string>', answer: '<string>', ttl: 302550, priority: 32767})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}', 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}/records/{recordId}",
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([
'host' => '<string>',
'answer' => '<string>',
'ttl' => 302550,
'priority' => 32767
]),
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}/records/{recordId}"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\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}/records/{recordId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records/{recordId}")
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 \"host\": \"<string>\",\n \"answer\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"type": "A",
"host": "<string>",
"fqdn": "<string>",
"answer": "<string>",
"ttl": 123,
"managed": true,
"priority": 123,
"hostname": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).
Path Parameters
the id from the records list
^[0-9]{1,18}$Body
A, AAAA, ANAME, CNAME, MX, NS, SRV, TXT relative to the domain: "@" for the domain itself, "api" for api.; the full hostname is accepted too
an IPv4 (A) or IPv6 (AAAA) address; a hostname (CNAME, ANAME, NS, MX); " " (SRV); text (TXT). "." is the null MX and the no-service SRV target
seconds
300 <= x <= 604800required for MX and SRV, refused for every other type
0 <= x <= 65535Response
Default Response
the registrar's id for the record; the handle every write takes
A, AAAA, ANAME, CNAME, MX, NS, SRV, TXT relative to the domain: "@" is the domain itself, "api" is api.
seconds
published by InstaCloud: read-only while hostname names the attached hostname it serves; without one, a leftover no hostname claims, which may be deleted
MX and SRV only
the attached hostname a managed record serves