curl --request PATCH \
--url https://api.kealinks.com/api/links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": "https://example.com/spring-menu"
}
'import requests
url = "https://api.kealinks.com/api/links/{id}"
payload = { "destination": "https://example.com/spring-menu" }
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({destination: 'https://example.com/spring-menu'})
};
fetch('https://api.kealinks.com/api/links/{id}', 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/{id}",
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([
'destination' => 'https://example.com/spring-menu'
]),
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.kealinks.com/api/links/{id}"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/spring-menu\"\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://api.kealinks.com/api/links/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/spring-menu\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kealinks.com/api/links/{id}")
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 \"destination\": \"https://example.com/spring-menu\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"destination": "https://example.com/spring-menu"
}{
"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."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}Repoint a link
Changes where an already-printed code goes. The new destination is re-scanned, the link returns to quarantine and its verification count resets — a check banked against the old destination cannot release the new one. Free accounts can do this; cancelled accounts cannot.
curl --request PATCH \
--url https://api.kealinks.com/api/links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": "https://example.com/spring-menu"
}
'import requests
url = "https://api.kealinks.com/api/links/{id}"
payload = { "destination": "https://example.com/spring-menu" }
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({destination: 'https://example.com/spring-menu'})
};
fetch('https://api.kealinks.com/api/links/{id}', 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/{id}",
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([
'destination' => 'https://example.com/spring-menu'
]),
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.kealinks.com/api/links/{id}"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/spring-menu\"\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://api.kealinks.com/api/links/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/spring-menu\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kealinks.com/api/links/{id}")
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 \"destination\": \"https://example.com/spring-menu\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"destination": "https://example.com/spring-menu"
}{
"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."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}{
"error": "Your subscription is inactive. Existing links keep resolving."
}Authorizations
An API key (klk_...) or a Clerk session token. Both resolve to the same account and behave identically.
Path Parameters
The link id returned when the link was created.
"lnk_2YgQk1p8fT3mN7wCxRvBdLsHjZa"
Body
Repointing a printed code is the product. Any destination change re-runs the safety check and returns the link to quarantine — a new destination is unproven however well the old one behaved.
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"
Response
The destination was changed.
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"