curl --request POST \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer": "<string>",
"host": "<string>",
"ttl": 302550,
"priority": 32767
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records"
payload = {
"answer": "<string>",
"host": "<string>",
"ttl": 302550,
"priority": 32767
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({answer: '<string>', host: '<string>', ttl: 302550, priority: 32767})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answer' => '<string>',
'host' => '<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"
payload := strings.NewReader("{\n \"answer\": \"<string>\",\n \"host\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answer\": \"<string>\",\n \"host\": \"<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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answer\": \"<string>\",\n \"host\": \"<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>"
}Create domain record
Token scope: account · org — read-only tokens refused (not a GET).
Add a DNS record to a bought domain’s zone. Omitted, host is the domain itself and ttl is 300 seconds. Routing (A, AAAA, ANAME, CNAME) and delegation (NS) are refused at a hostname an attach serves — those are the platform’s — and an NS above one, which would delegate it away; attaching a hostname later replaces the routing records at that host.
curl --request POST \
--url https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer": "<string>",
"host": "<string>",
"ttl": 302550,
"priority": 32767
}
'import requests
url = "https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records"
payload = {
"answer": "<string>",
"host": "<string>",
"ttl": 302550,
"priority": 32767
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({answer: '<string>', host: '<string>', ttl: 302550, priority: 32767})
};
fetch('https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answer' => '<string>',
'host' => '<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"
payload := strings.NewReader("{\n \"answer\": \"<string>\",\n \"host\": \"<string>\",\n \"ttl\": 302550,\n \"priority\": 32767\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.instacloud.com/orgs/{orgId}/domains/{domainName}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answer\": \"<string>\",\n \"host\": \"<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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answer\": \"<string>\",\n \"host\": \"<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>).
Body
A, AAAA, ANAME, CNAME, MX, NS, SRV, TXT 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
relative to the domain: "@" for the domain itself, "api" for api.; the full hostname is accepted too
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