curl --request POST \
--url https://api.kealinks.com/api/links \
--header 'Content-Type: application/json' \
--data '
{
"destination": "https://example.com/spring-menu",
"slug": "m4rq7bd",
"domain_id": "dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
}
'import requests
url = "https://api.kealinks.com/api/links"
payload = {
"destination": "https://example.com/spring-menu",
"slug": "m4rq7bd",
"domain_id": "dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
destination: 'https://example.com/spring-menu',
slug: 'm4rq7bd',
domain_id: 'dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa'
})
};
fetch('https://api.kealinks.com/api/links', 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.kealinks.com/api/links",
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([
'destination' => 'https://example.com/spring-menu',
'slug' => 'm4rq7bd',
'domain_id' => 'dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa'
]),
CURLOPT_HTTPHEADER => [
"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.kealinks.com/api/links"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.kealinks.com/api/links")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kealinks.com/api/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}"
response = http.request(request)
puts response.read_body{
"id": "lnk_2YgQk1p8fT3mN7wCxRvBdLsHjZa",
"slug": "m4rq7bd",
"destination": "https://example.com/spring-menu",
"host": null,
"status": 1
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "<string>",
"price": "<string>",
"currency": "<string>",
"pay": [
"mpp",
"x402"
],
"docs": "<string>"
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}Create a permanent link
Mints a code that never stops resolving. Send an API key to create it on your account, or send no credentials at all to get a 402 machine-payment challenge and buy a single permanent link outright.
Every link is created in quarantine, which forces a live safety check on each resolution until it earns release. That is a property of the link, not of who paid for it — a quarantined link resolves normally.
curl --request POST \
--url https://api.kealinks.com/api/links \
--header 'Content-Type: application/json' \
--data '
{
"destination": "https://example.com/spring-menu",
"slug": "m4rq7bd",
"domain_id": "dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
}
'import requests
url = "https://api.kealinks.com/api/links"
payload = {
"destination": "https://example.com/spring-menu",
"slug": "m4rq7bd",
"domain_id": "dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
destination: 'https://example.com/spring-menu',
slug: 'm4rq7bd',
domain_id: 'dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa'
})
};
fetch('https://api.kealinks.com/api/links', 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.kealinks.com/api/links",
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([
'destination' => 'https://example.com/spring-menu',
'slug' => 'm4rq7bd',
'domain_id' => 'dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa'
]),
CURLOPT_HTTPHEADER => [
"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.kealinks.com/api/links"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.kealinks.com/api/links")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kealinks.com/api/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": \"https://example.com/spring-menu\",\n \"slug\": \"m4rq7bd\",\n \"domain_id\": \"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa\"\n}"
response = http.request(request)
puts response.read_body{
"id": "lnk_2YgQk1p8fT3mN7wCxRvBdLsHjZa",
"slug": "m4rq7bd",
"destination": "https://example.com/spring-menu",
"host": null,
"status": 1
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "<string>",
"price": "<string>",
"currency": "<string>",
"pay": [
"mpp",
"x402"
],
"docs": "<string>"
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}Body
Where the code resolves to. http/https only; localhost, private ranges and cloud metadata endpoints are refused. Stored normalised, so HTTPS://Example.COM and https://example.com/ are the same link.
1"https://example.com/spring-menu"
The path segment the code resolves on. Drawn from an unambiguous alphabet (no 0/O, no 1/l/I) because people type these off printed material. Omit on create and one is allocated for you.
"m4rq7bd"
A verified custom domain to mint the code on. Requires a subscription.
"dom_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
Response
The link was created. A key-authenticated call gets Link; a call that paid gets PaidLink, which adds the printable short URL and — on the first paid link of a new machine account — the API key to repoint it.
- Option 1
- Option 2
A permanent link. Once issued, it never stops resolving.
"lnk_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
The path segment the code resolves on. Drawn from an unambiguous alphabet (no 0/O, no 1/l/I) because people type these off printed material. Omit on create and one is allocated for you.
"m4rq7bd"
Where the code resolves to. http/https only; localhost, private ranges and cloud metadata endpoints are refused. Stored normalised, so HTTPS://Example.COM and https://example.com/ are the same link.
1"https://example.com/spring-menu"
The custom domain this link resolves on, or null for the default domain.
null
0 = active, 1 = quarantine, 2 = abuse. Every link is created in quarantine, which forces a live safety check on each resolution until the link earns release: three clean checks once it is at least seven days old. Quarantine is a property of the link, never of the account — it is not a paywall and a quarantined link still resolves.
1