create share link
curl --request POST \
--url https://api.anam.ai/v1/share-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"personaId": "00000000-0000-0000-0000-000000000000",
"expiresInHours": 168,
"usageLimit": 10
}
'import requests
url = "https://api.anam.ai/v1/share-links"
payload = {
"personaId": "00000000-0000-0000-0000-000000000000",
"expiresInHours": 168,
"usageLimit": 10
}
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({
personaId: '00000000-0000-0000-0000-000000000000',
expiresInHours: 168,
usageLimit: 10
})
};
fetch('https://api.anam.ai/v1/share-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.anam.ai/v1/share-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([
'personaId' => '00000000-0000-0000-0000-000000000000',
'expiresInHours' => 168,
'usageLimit' => 10
]),
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.anam.ai/v1/share-links"
payload := strings.NewReader("{\n \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\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.anam.ai/v1/share-links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/share-links")
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 \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"token": "sh_2kL9pQxYzR4vN8mBwHfJc",
"type": "LINK",
"expiresAt": "2026-04-27T10:00:00.000Z",
"usageLimit": 10,
"usageCount": 0,
"allowedOrigins": [],
"allowAllOrigins": false,
"removeWatermark": false,
"enabled": true,
"isPrimary": false,
"createdAt": "2026-04-20T10:00:00.000Z"
}create share link
Create a new share link
POST
/
v1
/
share-links
create share link
curl --request POST \
--url https://api.anam.ai/v1/share-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"personaId": "00000000-0000-0000-0000-000000000000",
"expiresInHours": 168,
"usageLimit": 10
}
'import requests
url = "https://api.anam.ai/v1/share-links"
payload = {
"personaId": "00000000-0000-0000-0000-000000000000",
"expiresInHours": 168,
"usageLimit": 10
}
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({
personaId: '00000000-0000-0000-0000-000000000000',
expiresInHours: 168,
usageLimit: 10
})
};
fetch('https://api.anam.ai/v1/share-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.anam.ai/v1/share-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([
'personaId' => '00000000-0000-0000-0000-000000000000',
'expiresInHours' => 168,
'usageLimit' => 10
]),
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.anam.ai/v1/share-links"
payload := strings.NewReader("{\n \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\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.anam.ai/v1/share-links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/share-links")
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 \"personaId\": \"00000000-0000-0000-0000-000000000000\",\n \"expiresInHours\": 168,\n \"usageLimit\": 10\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"token": "sh_2kL9pQxYzR4vN8mBwHfJc",
"type": "LINK",
"expiresAt": "2026-04-27T10:00:00.000Z",
"usageLimit": 10,
"usageCount": 0,
"allowedOrigins": [],
"allowAllOrigins": false,
"removeWatermark": false,
"enabled": true,
"isPrimary": false,
"createdAt": "2026-04-20T10:00:00.000Z"
}Authorizations
Body
application/json
Persona to issue a share link for, plus optional lifetime and usage limits. A share link with no expiresInHours defaults to 168 (one week); with no usageLimit it defaults to 10.
Response
Successfully created share link
A shareable link to a persona. Can be used as a direct URL or embedded via the widget.

