curl --request POST \
--url https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"branch": "<string>",
"group": "<string>"
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach"
payload = {
"hostname": "<string>",
"branch": "<string>",
"group": "<string>"
}
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({hostname: '<string>', branch: '<string>', group: '<string>'})
};
fetch('https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach', 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/projects/{projectId}/domains/{domainName}/attach",
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([
'hostname' => '<string>',
'branch' => '<string>',
'group' => '<string>'
]),
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/projects/{projectId}/domains/{domainName}/attach"
payload := strings.NewReader("{\n \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\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/projects/{projectId}/domains/{domainName}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach")
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 \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\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"
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Attach purchased domain
Token scope: account · org · project — read-only tokens refused (not a GET).
Point one hostname of a bought domain at a compute service of this project. Gated — deploy.
curl --request POST \
--url https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"branch": "<string>",
"group": "<string>"
}
'import requests
url = "https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach"
payload = {
"hostname": "<string>",
"branch": "<string>",
"group": "<string>"
}
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({hostname: '<string>', branch: '<string>', group: '<string>'})
};
fetch('https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach', 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/projects/{projectId}/domains/{domainName}/attach",
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([
'hostname' => '<string>',
'branch' => '<string>',
'group' => '<string>'
]),
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/projects/{projectId}/domains/{domainName}/attach"
payload := strings.NewReader("{\n \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\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/projects/{projectId}/domains/{domainName}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/domains/{domainName}/attach")
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 \"hostname\": \"<string>\",\n \"branch\": \"<string>\",\n \"group\": \"<string>\"\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"
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"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