Modify a TXT record
curl --request PUT \
--url https://dev.namify.host/api/v1/dns/txt-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"current_value": "v=spf1 include:_spf.google.com ~all",
"new_value": "v=spf1 include:_spf.google.com include:sendgrid.net ~all",
"host": "@"
}
'import requests
url = "https://dev.namify.host/api/v1/dns/txt-record"
payload = {
"order_id": 124680932,
"current_value": "v=spf1 include:_spf.google.com ~all",
"new_value": "v=spf1 include:_spf.google.com include:sendgrid.net ~all",
"host": "@"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: 124680932,
current_value: 'v=spf1 include:_spf.google.com ~all',
new_value: 'v=spf1 include:_spf.google.com include:sendgrid.net ~all',
host: '@'
})
};
fetch('https://dev.namify.host/api/v1/dns/txt-record', 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://dev.namify.host/api/v1/dns/txt-record",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => 124680932,
'current_value' => 'v=spf1 include:_spf.google.com ~all',
'new_value' => 'v=spf1 include:_spf.google.com include:sendgrid.net ~all',
'host' => '@'
]),
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://dev.namify.host/api/v1/dns/txt-record"
payload := strings.NewReader("{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://dev.namify.host/api/v1/dns/txt-record")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/dns/txt-record")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Record modified successfully"
}DNS
Modify TXT
Modifies an existing TXT record on the domain’s DNS zone.
PUT
/
api
/
v1
/
dns
/
txt-record
Modify a TXT record
curl --request PUT \
--url https://dev.namify.host/api/v1/dns/txt-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"current_value": "v=spf1 include:_spf.google.com ~all",
"new_value": "v=spf1 include:_spf.google.com include:sendgrid.net ~all",
"host": "@"
}
'import requests
url = "https://dev.namify.host/api/v1/dns/txt-record"
payload = {
"order_id": 124680932,
"current_value": "v=spf1 include:_spf.google.com ~all",
"new_value": "v=spf1 include:_spf.google.com include:sendgrid.net ~all",
"host": "@"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: 124680932,
current_value: 'v=spf1 include:_spf.google.com ~all',
new_value: 'v=spf1 include:_spf.google.com include:sendgrid.net ~all',
host: '@'
})
};
fetch('https://dev.namify.host/api/v1/dns/txt-record', 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://dev.namify.host/api/v1/dns/txt-record",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => 124680932,
'current_value' => 'v=spf1 include:_spf.google.com ~all',
'new_value' => 'v=spf1 include:_spf.google.com include:sendgrid.net ~all',
'host' => '@'
]),
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://dev.namify.host/api/v1/dns/txt-record"
payload := strings.NewReader("{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://dev.namify.host/api/v1/dns/txt-record")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/dns/txt-record")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": 124680932,\n \"current_value\": \"v=spf1 include:_spf.google.com ~all\",\n \"new_value\": \"v=spf1 include:_spf.google.com include:sendgrid.net ~all\",\n \"host\": \"@\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Record modified successfully"
}Authorizations
A personal access token. Obtain one from the dashboard under Settings > API Key. Include it in the Authorization header as Bearer <token>. Unauthenticated requests to protected routes return 401 Unauthorized.
Body
application/json
Order ID of the domain.
Example:
124680932
The existing text content of the record to modify.
Example:
"v=spf1 include:_spf.google.com ~all"
The replacement text content.
Example:
"v=spf1 include:_spf.google.com include:sendgrid.net ~all"
Subdomain label relative to the zone. Use @ or omit for the apex, or a specific label for targeted records (e.g. _dmarc, google._domainkey).
Example:
"@"
TTL in seconds. Minimum 300. Omit to use the zone default.
Example:
300
⌘I