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 response = await client.domains.verify('domainId');
console.log(response.domain);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
)
response = client.domains.verify(
"domainId",
)
print(response.domain)curl --request POST \
--url https://api.aiinbx.com/api/v1/domains/{domainId}/verify \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiinbx.com/api/v1/domains/{domainId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{domainId}/verify"
req, _ := http.NewRequest("POST", 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.post("https://api.aiinbx.com/api/v1/domains/{domainId}/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiinbx.com/api/v1/domains/{domainId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domain": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"domain": "<string>",
"verifiedAt": "<string>",
"isManagedDefault": true,
"dnsRecords": [
{
"name": "<string>",
"value": "<string>",
"priority": 123,
"isVerified": true,
"lastCheckedAt": "<string>"
}
]
},
"verification": {
"dns": {
"domainVerification": true,
"spf": true,
"mx": {
"found": true,
"expectedPriority": 123,
"records": [
{
"exchange": "<string>",
"priority": 123
}
]
},
"dkim": {},
"dmarc": {
"present": true
},
"mailFrom": {
"domain": "<string>",
"mx": true,
"spf": true
}
},
"mxConflict": {
"hasConflict": true,
"conflictingRecords": [
{
"exchange": "<string>",
"priority": 123
}
],
"message": "<string>"
},
"ready": true,
"debug": {
"actualVerificationTokens": [
"<string>"
],
"domain": "<string>",
"verificationTokenMatch": true,
"expectedVerificationToken": "<string>"
}
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Domains
Verify domain DNS & SES status
Run verification checks for the domain and update its stored status and DNS record verification flags.
POST
/
domains
/
{domainId}
/
verify
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 response = await client.domains.verify('domainId');
console.log(response.domain);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
)
response = client.domains.verify(
"domainId",
)
print(response.domain)curl --request POST \
--url https://api.aiinbx.com/api/v1/domains/{domainId}/verify \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiinbx.com/api/v1/domains/{domainId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{domainId}/verify"
req, _ := http.NewRequest("POST", 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.post("https://api.aiinbx.com/api/v1/domains/{domainId}/verify")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiinbx.com/api/v1/domains/{domainId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"domain": {
"id": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"domain": "<string>",
"verifiedAt": "<string>",
"isManagedDefault": true,
"dnsRecords": [
{
"name": "<string>",
"value": "<string>",
"priority": 123,
"isVerified": true,
"lastCheckedAt": "<string>"
}
]
},
"verification": {
"dns": {
"domainVerification": true,
"spf": true,
"mx": {
"found": true,
"expectedPriority": 123,
"records": [
{
"exchange": "<string>",
"priority": 123
}
]
},
"dkim": {},
"dmarc": {
"present": true
},
"mailFrom": {
"domain": "<string>",
"mx": true,
"spf": true
}
},
"mxConflict": {
"hasConflict": true,
"conflictingRecords": [
{
"exchange": "<string>",
"priority": 123
}
],
"message": "<string>"
},
"ready": true,
"debug": {
"actualVerificationTokens": [
"<string>"
],
"domain": "<string>",
"verificationTokenMatch": true,
"expectedVerificationToken": "<string>"
}
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"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