Create a short link
curl --request POST \
--url https://{domain}/api/v1/biolinks/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"destination": "https://example.com/autumn-sale",
"title": "<string>",
"slug": "sale",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"password": "<string>",
"clear_password": true,
"forward_query": true,
"http_status": 302,
"sensitive_content": true,
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"pixels": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://{domain}/api/v1/biolinks/links"
payload = {
"destination": "https://example.com/autumn-sale",
"title": "<string>",
"slug": "sale",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"password": "<string>",
"clear_password": True,
"forward_query": True,
"http_status": 302,
"sensitive_content": True,
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"pixels": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
destination: 'https://example.com/autumn-sale',
title: '<string>',
slug: 'sale',
domain: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
settings: {
password: '<string>',
clear_password: true,
forward_query: true,
http_status: 302,
sensitive_content: true,
utm: {source: '<string>', medium: '<string>', campaign: '<string>'},
pixels: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://{domain}/api/v1/biolinks/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://{domain}/api/v1/biolinks/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/autumn-sale',
'title' => '<string>',
'slug' => 'sale',
'domain' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'settings' => [
'password' => '<string>',
'clear_password' => true,
'forward_query' => true,
'http_status' => 302,
'sensitive_content' => true,
'utm' => [
'source' => '<string>',
'medium' => '<string>',
'campaign' => '<string>'
],
'pixels' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://{domain}/api/v1/biolinks/links"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{domain}/api/v1/biolinks/links")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"revision": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"title": "<string>",
"destination": "<string>",
"status": "active",
"disabled": true,
"has_password": true,
"settings": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Short links
Create a short link
New links are created paused.
Required permission: biolinks:links:write
POST
/
links
Create a short link
curl --request POST \
--url https://{domain}/api/v1/biolinks/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"destination": "https://example.com/autumn-sale",
"title": "<string>",
"slug": "sale",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"password": "<string>",
"clear_password": true,
"forward_query": true,
"http_status": 302,
"sensitive_content": true,
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"pixels": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://{domain}/api/v1/biolinks/links"
payload = {
"destination": "https://example.com/autumn-sale",
"title": "<string>",
"slug": "sale",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {
"password": "<string>",
"clear_password": True,
"forward_query": True,
"http_status": 302,
"sensitive_content": True,
"utm": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>"
},
"pixels": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
destination: 'https://example.com/autumn-sale',
title: '<string>',
slug: 'sale',
domain: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
settings: {
password: '<string>',
clear_password: true,
forward_query: true,
http_status: 302,
sensitive_content: true,
utm: {source: '<string>', medium: '<string>', campaign: '<string>'},
pixels: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://{domain}/api/v1/biolinks/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://{domain}/api/v1/biolinks/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/autumn-sale',
'title' => '<string>',
'slug' => 'sale',
'domain' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'settings' => [
'password' => '<string>',
'clear_password' => true,
'forward_query' => true,
'http_status' => 302,
'sensitive_content' => true,
'utm' => [
'source' => '<string>',
'medium' => '<string>',
'campaign' => '<string>'
],
'pixels' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://{domain}/api/v1/biolinks/links"
payload := strings.NewReader("{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{domain}/api/v1/biolinks/links")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": \"https://example.com/autumn-sale\",\n \"title\": \"<string>\",\n \"slug\": \"sale\",\n \"domain\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {\n \"password\": \"<string>\",\n \"clear_password\": true,\n \"forward_query\": true,\n \"http_status\": 302,\n \"sensitive_content\": true,\n \"utm\": {\n \"source\": \"<string>\",\n \"medium\": \"<string>\",\n \"campaign\": \"<string>\"\n },\n \"pixels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"revision": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"title": "<string>",
"destination": "<string>",
"status": "active",
"disabled": true,
"has_password": true,
"settings": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
bearerAuthapiKeyHeader
A workspace API key: Authorization: Bearer osk_...
Headers
8–200 letters, digits, ., _, : or -. Retry with the same key and exact same body to get the original response.
Required string length:
8 - 200Body
application/json
Response
201 - application/json
Created
Show child attributes
Show child attributes