PUT
/
v1
/
apps
/
{name}
/
domain
Set a custom domain
curl --request PUT \
  --url https://platform.jobbit.uk/v1/apps/{name}/domain \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "kentphysio.co.uk"
}
'
import requests

url = "https://platform.jobbit.uk/v1/apps/{name}/domain"

payload = { "domain": "kentphysio.co.uk" }
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({domain: 'kentphysio.co.uk'})
};

fetch('https://platform.jobbit.uk/v1/apps/{name}/domain', 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/apps/{name}/domain",
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([
'domain' => 'kentphysio.co.uk'
]),
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/apps/{name}/domain"

payload := strings.NewReader("{\n \"domain\": \"kentphysio.co.uk\"\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://platform.jobbit.uk/v1/apps/{name}/domain")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"kentphysio.co.uk\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.jobbit.uk/v1/apps/{name}/domain")

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 \"domain\": \"kentphysio.co.uk\"\n}"

response = http.request(request)
puts response.read_body
{
  "app": "kent-physio-site",
  "domain": "kentphysio.co.uk",
  "dns": [
    {
      "type": "A",
      "name": "kentphysio.co.uk",
      "value": "203.0.113.25"
    }
  ],
  "message": "Point an A record at 203.0.113.25"
}
{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "plan_required",
"message": "custom domains need a paid plan",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "not_found",
"message": "not found",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "domain_taken",
"message": "this domain is already used by another app",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "invalid_domain",
"message": "Jobbit's own domains cannot be attached to apps",
"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

name
string
required

The app name.

Required string length: 1 - 100
Pattern: ^[A-Za-z0-9][A-Za-z0-9-]*$

Body

application/json
domain
string
required

A host name such as www.kentphysio.co.uk, without https:// or a path. Jobbit's own domains are refused.

Required string length: 4 - 254

Response

The record to create.

app
string
required

The app.

domain
string
required

The domain set.

dns
object[]
required

DNS records to create.

message
string | null

A note about what to do next.