Connect a domain
curl --request POST \
--url https://api.teasy.link/v1/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "links.example.com"
}
'import requests
url = "https://api.teasy.link/v1/domains"
payload = { "hostname": "links.example.com" }
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: 'links.example.com'})
};
fetch('https://api.teasy.link/v1/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.teasy.link/v1/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' => 'links.example.com'
]),
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.teasy.link/v1/domains"
payload := strings.NewReader("{\n \"hostname\": \"links.example.com\"\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.teasy.link/v1/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"links.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teasy.link/v1/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\": \"links.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "dom_4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e",
"object": "domain",
"hostname": "links.example.com",
"status": "pending",
"expires_at": "2026-09-04T10:00:00Z",
"created_at": "2026-08-21T10:00:00Z",
"dns_instructions": [
{
"type": "CNAME",
"name": "links.example.com",
"value": "teasy.link",
"purpose": "Points your hostname at our servers."
}
]
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}Domains
Connect Domain
Add the returned dns_instructions at your DNS provider. We do not check that the hostname resolves: an unverified domain stays pending for 72 hours and then turns failed.
POST
/
v1
/
domains
Connect a domain
curl --request POST \
--url https://api.teasy.link/v1/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "links.example.com"
}
'import requests
url = "https://api.teasy.link/v1/domains"
payload = { "hostname": "links.example.com" }
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: 'links.example.com'})
};
fetch('https://api.teasy.link/v1/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.teasy.link/v1/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' => 'links.example.com'
]),
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.teasy.link/v1/domains"
payload := strings.NewReader("{\n \"hostname\": \"links.example.com\"\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.teasy.link/v1/domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"links.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teasy.link/v1/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\": \"links.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "dom_4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e",
"object": "domain",
"hostname": "links.example.com",
"status": "pending",
"expires_at": "2026-09-04T10:00:00Z",
"created_at": "2026-08-21T10:00:00Z",
"dns_instructions": [
{
"type": "CNAME",
"name": "links.example.com",
"value": "teasy.link",
"purpose": "Points your hostname at our servers."
}
]
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}{
"error": {
"code": "invalid_request",
"message": "Redirect not found.",
"request_id": "req_9f2c5a4b7d4c31a2f86e0d91b3c7aa10",
"details": [
{
"field": "target_url",
"code": "invalid_value",
"message": "target_url must be a valid URL"
}
]
}
}Authorizations
API key issued in the dashboard. Server-side only: never ship it to a browser, and never pass it as a query parameter.
Body
application/json
ASCII hostname. Case and surrounding spaces are normalised; internationalised names are not accepted.
Maximum string length:
253Example:
"links.example.com"
Response
Example:
"dom_4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e"
Available options:
domain Example:
"links.example.com"
Verification state. Links on a domain start working once it is active.
Available options:
pending, ssl_pending, active, failed Verification deadline. Meaningful while the domain is pending; null otherwise.
Example:
"2026-09-04T10:00:00Z"
Example:
"2026-08-21T10:00:00Z"
Records to add at your DNS provider before verification.
Show child attributes
Show child attributes
⌘I