PATCH
/
v1
/
domains
/
{domain_id}
/
dns-records
/
{record_id}
Update a DNS record
curl --request PATCH \
  --url https://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "v=spf1 include:sendgrid.net include:_spf.google.com ~all"
}
'
import requests

url = "https://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}"

payload = { "content": "v=spf1 include:sendgrid.net include:_spf.google.com ~all" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'v=spf1 include:sendgrid.net include:_spf.google.com ~all'})
};

fetch('https://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}', 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://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => 'v=spf1 include:sendgrid.net include:_spf.google.com ~all'
]),
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://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}"

payload := strings.NewReader("{\n \"content\": \"v=spf1 include:sendgrid.net include:_spf.google.com ~all\"\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"v=spf1 include:sendgrid.net include:_spf.google.com ~all\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.jobbit.uk/v1/domains/{domain_id}/dns-records/{record_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"v=spf1 include:sendgrid.net include:_spf.google.com ~all\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "372e67aa4dfa4e0b9c1b53f2a0d86e11",
  "type": "TXT",
  "name": "kentphysio.co.uk",
  "content": "v=spf1 include:sendgrid.net include:_spf.google.com ~all",
  "ttl": 1,
  "proxied": false,
  "proxiable": false,
  "priority": null,
  "comment": "",
  "managed": false,
  "managed_by": null,
  "supported": true
}
{
"error": {
"code": "invalid_request",
"message": "Enter a valid IPv4 address",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "domain_not_found",
"message": "Domain not found",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "conflict",
"message": "DNS records are managed by external nameservers",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "invalid_request",
"message": "the request is not valid",
"details": [
{
"location": [
"body",
"name"
],
"message": "String should match pattern '^[a-z0-9][a-z0-9-]*$'",
"type": "string_pattern_mismatch"
}
],
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}

Authorizations

Authorization
string
header
required

An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…

Path Parameters

domain_id
string
required

The domain id from GET /v1/domains.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$
record_id
string
required

The record id from the list.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]+$

Body

application/json

Send only the fields to change; the others keep their value.

type
enum<string>

Record type.

Available options:
A,
AAAA,
CNAME,
TXT,
MX
Maximum string length: 10
name
string

The record name: @ or empty for the domain itself, a label such as www, or a full name under the domain.

Maximum string length: 253
content
string

The value: an IPv4 address for A, IPv6 for AAAA, a host name for CNAME and MX, text for TXT (up to 4,096 characters).

Maximum string length: 4096
proxied
boolean
default:false

Send traffic through Jobbit's proxy. Only for A, AAAA and CNAME.

priority
integer
default:10

Priority for MX records.

Required range: 0 <= x <= 65535
comment
string

A note, up to 100 characters. The prefix jobbit-managed: is reserved.

Maximum string length: 100
ttl
integer

Seconds, 60 to 86,400, or 1 for automatic.

Required range: 1 <= x <= 86400

Response

The record.

id
string
required

The record id.

type
enum<string>
required

Record type.

Available options:
A,
AAAA,
CNAME,
TXT,
MX
name
string
required

The full record name.

content
string
required

The record value.

ttl
integer

Time to live in seconds; 1 means automatic.

proxied
boolean

Whether traffic goes through Jobbit's proxy (A, AAAA and CNAME only).

proxiable
boolean

Whether the record can be proxied.

priority
integer | null

Priority, for MX records.

comment
string

A note on the record.

managed
boolean

True for records Jobbit wrote for an app or for mail. They cannot be edited.

managed_by
enum<string> | null

app or mail for managed records.

Available options:
app,
mail,
null
supported
boolean

Whether this API can edit this type of record.