Campaigns
Create Share Link
Create or fetch the campaign’s public view-in-browser link
POST
/
api
/
v1
/
campaigns
/
{campaignId}
/
share-link
Create Share Link
curl --request POST \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link', 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.sequenzy.com/api/v1/campaigns/{campaignId}/share-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sequenzy.com/api/v1/campaigns/{campaignId}/share-link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"shareUrl": "https://sequenzy.com/view/campaign/8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"shareToken": "8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"created": true
}
{
"error": "Only email campaigns have a browser view to share."
}
{
"error": "Invalid API key"
}
{
"error": "Campaign not found"
}
Create a public, shareable “view in browser” link for the campaign. The hosted page renders an anonymized copy - a sample contact instead of subscriber data, an inert unsubscribe link, and no open or click tracking - so you can forward the URL to anyone.
The call is idempotent: if a link is already active, the same URL is returned with
This endpoint does not accept a request body.
created: false instead of rotating it, so copies you have already shared keep working. Revoke it with Revoke Share Link. The current link is also reported as shareUrl on Get Campaign (null when none is active).
Email campaigns only - SMS campaigns have no browser view.
Request
string
required
Campaign ID.
curl -X POST "https://api.sequenzy.com/api/v1/campaigns/camp_abc123/share-link" \
-H "Authorization: Bearer YOUR_API_KEY"
Responses
{
"success": true,
"shareUrl": "https://sequenzy.com/view/campaign/8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"shareToken": "8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"created": true
}
{
"error": "Only email campaigns have a browser view to share."
}
{
"error": "Invalid API key"
}
{
"error": "Campaign not found"
}
⌘I
Create Share Link
curl --request POST \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link', 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.sequenzy.com/api/v1/campaigns/{campaignId}/share-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sequenzy.com/api/v1/campaigns/{campaignId}/share-link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/share-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"shareUrl": "https://sequenzy.com/view/campaign/8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"shareToken": "8f2kL9qWm3ZxYv71TnB4c5RdVaEuGh0s",
"created": true
}
{
"error": "Only email campaigns have a browser view to share."
}
{
"error": "Invalid API key"
}
{
"error": "Campaign not found"
}