Legacy (v0)
Create domain
Connects a new custom domain to the company and starts certificate and DNS provisioning. The new domain starts in an early provisioning state; poll Retrieve a domain or Check CNAME propagation to follow it. Send the fields at the top level or wrapped in domain. Returns 422 when the hostname is invalid or already taken. Requires a company admin user or company API token with the domains update permission.
POST
/
api
/
domains
Create domain
curl --request POST \
--url https://api.fluid.app/api/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "www.dundermifflin.com",
"primary": false,
"wildcard_subdomain": false
}
'import requests
url = "https://api.fluid.app/api/domains"
payload = {
"hostname": "www.dundermifflin.com",
"primary": False,
"wildcard_subdomain": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: 'www.dundermifflin.com', primary: false, wildcard_subdomain: false})
};
fetch('https://api.fluid.app/api/domains', 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://api.fluid.app/api/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hostname' => 'www.dundermifflin.com',
'primary' => false,
'wildcard_subdomain' => false
]),
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://api.fluid.app/api/domains"
payload := strings.NewReader("{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}"
response = http.request(request)
puts response.read_body{
"domain": {
"id": 48219,
"hostname": "www.dundermifflin.com",
"apex_domain": "dundermifflin.com",
"verification_status": "pending_cname",
"primary": false,
"wildcard_subdomain": false,
"redirection_domain_id": null,
"certificate_domain_id": null,
"company_id": 1405,
"verifying_cname": false,
"created_at": "2026-09-21T09:12:44Z",
"updated_at": "2026-09-21T09:12:44Z",
"redirection_domain_hostname": null,
"dns_config": {},
"payment_account": null,
"dns_fluid_verified": "pending",
"has_subdomains": true,
"connected": false,
"cert_created": false
},
"meta": {
"request_id": "3f9c1a7e-5b2d-4c8e-9a61-2d7f0b4e8c13",
"timestamp": "2026-09-21T09:12:45Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "Registration submission in progress; try again in a few minutes",
"errors": {
"type": "registration_submission_in_progress"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}Body
application/json
⌘I
Create domain
curl --request POST \
--url https://api.fluid.app/api/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "www.dundermifflin.com",
"primary": false,
"wildcard_subdomain": false
}
'import requests
url = "https://api.fluid.app/api/domains"
payload = {
"hostname": "www.dundermifflin.com",
"primary": False,
"wildcard_subdomain": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: 'www.dundermifflin.com', primary: false, wildcard_subdomain: false})
};
fetch('https://api.fluid.app/api/domains', 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://api.fluid.app/api/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hostname' => 'www.dundermifflin.com',
'primary' => false,
'wildcard_subdomain' => false
]),
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://api.fluid.app/api/domains"
payload := strings.NewReader("{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostname\": \"www.dundermifflin.com\",\n \"primary\": false,\n \"wildcard_subdomain\": false\n}"
response = http.request(request)
puts response.read_body{
"domain": {
"id": 48219,
"hostname": "www.dundermifflin.com",
"apex_domain": "dundermifflin.com",
"verification_status": "pending_cname",
"primary": false,
"wildcard_subdomain": false,
"redirection_domain_id": null,
"certificate_domain_id": null,
"company_id": 1405,
"verifying_cname": false,
"created_at": "2026-09-21T09:12:44Z",
"updated_at": "2026-09-21T09:12:44Z",
"redirection_domain_hostname": null,
"dns_config": {},
"payment_account": null,
"dns_fluid_verified": "pending",
"has_subdomains": true,
"connected": false,
"cert_created": false
},
"meta": {
"request_id": "3f9c1a7e-5b2d-4c8e-9a61-2d7f0b4e8c13",
"timestamp": "2026-09-21T09:12:45Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "Registration submission in progress; try again in a few minutes",
"errors": {
"type": "registration_submission_in_progress"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}