JavaScript
import AIInbx from 'aiinbx';
const client = new AIInbx({
apiKey: process.env['AI_INBX_API_KEY'], // This is the default and can be omitted
});
const domains = await client.domains.list();
console.log(domains.domains);import os
from aiinbx import AIInbx
client = AIInbx(
api_key=os.environ.get("AI_INBX_API_KEY"), # This is the default and can be omitted
)
domains = client.domains.list()
print(domains.domains)curl --request GET \
--url https://api.aiinbx.com/api/v1/domains \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiinbx.com/api/v1/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aiinbx.com/api/v1/domains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiinbx.com/api/v1/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiinbx.com/api/v1/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domains": [
{
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"domain": "<string>",
"verifiedAt": "<string>",
"isManagedDefault": true,
"dnsRecords": [
{
"name": "<string>",
"value": "<string>",
"priority": 123,
"isVerified": true,
"lastCheckedAt": "<string>"
}
]
}
]
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Domains
List domains
List all domains belonging to the API key’s organization
GET
/
domains
JavaScript
import AIInbx from 'aiinbx';
const client = new AIInbx({
apiKey: process.env['AI_INBX_API_KEY'], // This is the default and can be omitted
});
const domains = await client.domains.list();
console.log(domains.domains);import os
from aiinbx import AIInbx
client = AIInbx(
api_key=os.environ.get("AI_INBX_API_KEY"), # This is the default and can be omitted
)
domains = client.domains.list()
print(domains.domains)curl --request GET \
--url https://api.aiinbx.com/api/v1/domains \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiinbx.com/api/v1/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aiinbx.com/api/v1/domains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiinbx.com/api/v1/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiinbx.com/api/v1/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domains": [
{
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"domain": "<string>",
"verifiedAt": "<string>",
"isManagedDefault": true,
"dnsRecords": [
{
"name": "<string>",
"value": "<string>",
"priority": 123,
"isVerified": true,
"lastCheckedAt": "<string>"
}
]
}
]
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Was this page helpful?
⌘I