Update a domain
curl --request PATCH \
--url https://biq.li/api/v1/domain/{domain} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_default_redirect": true,
"default_redirect_url": "<string>",
"use_not_found_redirect": true,
"not_found_redirect_url": "<string>",
"use_expired_redirect": true,
"expired_redirect_url": "<string>"
}
'import requests
url = "https://biq.li/api/v1/domain/{domain}"
payload = {
"use_default_redirect": True,
"default_redirect_url": "<string>",
"use_not_found_redirect": True,
"not_found_redirect_url": "<string>",
"use_expired_redirect": True,
"expired_redirect_url": "<string>"
}
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({
use_default_redirect: true,
default_redirect_url: '<string>',
use_not_found_redirect: true,
not_found_redirect_url: '<string>',
use_expired_redirect: true,
expired_redirect_url: '<string>'
})
};
fetch('https://biq.li/api/v1/domain/{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://biq.li/api/v1/domain/{domain}",
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([
'use_default_redirect' => true,
'default_redirect_url' => '<string>',
'use_not_found_redirect' => true,
'not_found_redirect_url' => '<string>',
'use_expired_redirect' => true,
'expired_redirect_url' => '<string>'
]),
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://biq.li/api/v1/domain/{domain}"
payload := strings.NewReader("{\n \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\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://biq.li/api/v1/domain/{domain}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biq.li/api/v1/domain/{domain}")
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 \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"domain": {
"id": "<string>",
"host": "go.example.com",
"url": "<string>",
"status": "pending_dns",
"dns_status": "pending",
"ssl_status": "pending",
"dns_verified": true,
"active": true,
"is_subdomain": true,
"links_count": 1,
"claim_expires_at": "2023-11-07T05:31:56Z",
"dns_last_checked_at": "2023-11-07T05:31:56Z",
"dns_verified_at": "2023-11-07T05:31:56Z",
"ssl_last_checked_at": "2023-11-07T05:31:56Z",
"use_default_redirect": true,
"default_redirect_url": "<string>",
"use_not_found_redirect": true,
"not_found_redirect_url": "<string>",
"use_expired_redirect": true,
"expired_redirect_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"status": "success"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}Domains
Update a domain
Surgically update redirect behavior for a custom domain.
PATCH
/
v1
/
domain
/
{domain}
Update a domain
curl --request PATCH \
--url https://biq.li/api/v1/domain/{domain} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_default_redirect": true,
"default_redirect_url": "<string>",
"use_not_found_redirect": true,
"not_found_redirect_url": "<string>",
"use_expired_redirect": true,
"expired_redirect_url": "<string>"
}
'import requests
url = "https://biq.li/api/v1/domain/{domain}"
payload = {
"use_default_redirect": True,
"default_redirect_url": "<string>",
"use_not_found_redirect": True,
"not_found_redirect_url": "<string>",
"use_expired_redirect": True,
"expired_redirect_url": "<string>"
}
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({
use_default_redirect: true,
default_redirect_url: '<string>',
use_not_found_redirect: true,
not_found_redirect_url: '<string>',
use_expired_redirect: true,
expired_redirect_url: '<string>'
})
};
fetch('https://biq.li/api/v1/domain/{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://biq.li/api/v1/domain/{domain}",
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([
'use_default_redirect' => true,
'default_redirect_url' => '<string>',
'use_not_found_redirect' => true,
'not_found_redirect_url' => '<string>',
'use_expired_redirect' => true,
'expired_redirect_url' => '<string>'
]),
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://biq.li/api/v1/domain/{domain}"
payload := strings.NewReader("{\n \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\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://biq.li/api/v1/domain/{domain}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biq.li/api/v1/domain/{domain}")
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 \"use_default_redirect\": true,\n \"default_redirect_url\": \"<string>\",\n \"use_not_found_redirect\": true,\n \"not_found_redirect_url\": \"<string>\",\n \"use_expired_redirect\": true,\n \"expired_redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"domain": {
"id": "<string>",
"host": "go.example.com",
"url": "<string>",
"status": "pending_dns",
"dns_status": "pending",
"ssl_status": "pending",
"dns_verified": true,
"active": true,
"is_subdomain": true,
"links_count": 1,
"claim_expires_at": "2023-11-07T05:31:56Z",
"dns_last_checked_at": "2023-11-07T05:31:56Z",
"dns_verified_at": "2023-11-07T05:31:56Z",
"ssl_last_checked_at": "2023-11-07T05:31:56Z",
"use_default_redirect": true,
"default_redirect_url": "<string>",
"use_not_found_redirect": true,
"not_found_redirect_url": "<string>",
"use_expired_redirect": true,
"expired_redirect_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"status": "success"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_token",
"message": "<string>",
"details": {}
},
"request_id": "<string>"
}Partially update one domain’s fallback redirect behavior. Only supplied fields
change. The host and DNS identity are intentionally immutable; connect a new
domain instead of renaming an existing claim.
Sending a non-null URL without its
To disable it and clear the stored URL:
All URLs must use HTTP or HTTPS and be at most 255 characters. The endpoint
requires at least one supported field and rejects unknown fields such as
Authentication, permission, and plan
Requires Custom domains: Write (custom_domains.update) and the workspace
plan feature for custom-domain redirect settings.
curl --request PATCH \
--url https://biq.li/api/v1/domain/biq_dom_01M18D4A8QRJY5G6K3N2W7X9TZ \
--header 'Authorization: Bearer biqli_your_workspace_api_key' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"use_default_redirect": true,
"default_redirect_url": "https://example.com"
}'
Mutable fields
| Field | Type | Behavior |
|---|---|---|
use_default_redirect | boolean | Redirect requests for the bare custom domain. |
default_redirect_url | HTTP(S) URL or null | Destination for the bare-domain redirect. |
use_not_found_redirect | boolean | Redirect unknown aliases instead of showing the not-found response. |
not_found_redirect_url | HTTP(S) URL or null | Destination for unknown aliases. |
use_expired_redirect | boolean | Redirect expired links to a domain-level destination. |
expired_redirect_url | HTTP(S) URL or null | Destination for expired links. |
use_... flag automatically enables that
redirect. Sending null without the flag disables it. Enabling a redirect
without an existing or supplied URL returns 422 validation_error.
To disable a redirect while preserving its URL for later:
{"use_not_found_redirect": false}
{
"use_not_found_redirect": false,
"not_found_redirect_url": null
}
host, global, numeric resource IDs, favicon internals, and workspace IDs.
Response
A successful update returns200 OK with the same complete domain resource as
Retrieve a domain. Repeating the same PATCH is
safe and leaves the domain in the same state.
| HTTP status | Error code | Meaning |
|---|---|---|
403 | insufficient_scope | The key or user cannot update this workspace domain. |
403 | upgrade_required | The plan does not include redirect settings. |
404 | resource_not_found | The public ID is malformed or unavailable here. |
422 | validation_error | A URL, boolean, field, or field combination is invalid. |
Shared API behavior
Authentication is workspace-scoped; see Authentication. Errors use the standard envelope and request IDs described in Errors, and requests are subject to Rate limits.Authorizations
A workspace API key beginning with biqli_.
Path Parameters
Public custom-domain ID. Numeric IDs and hosts are not accepted.
Pattern:
^biq_dom_[0-9A-HJKMNP-TV-Z]{26}$Body
application/json

