Get a campaign
curl --request GET \
--url https://galinum.com/api/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://galinum.com/api/v1/campaigns/{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://galinum.com/api/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://galinum.com/api/v1/campaigns/{id}"
req, _ := http.NewRequest("GET", 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.get("https://galinum.com/api/v1/campaigns/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"campaign": {
"id": "cmp_3ce6dba5-7f36-41f5-9327-d5cc3099ab77",
"name": "Launch: CSV export",
"status": "draft",
"effectiveStatus": "draft",
"channel": "web_inapp",
"goalId": "<string>",
"createdBy": "api",
"createdAt": 1784067764978,
"startedAt": 123,
"endedAt": 123,
"deliverFrom": 123,
"deliverUntil": 123,
"audience": {
"kind": "all"
},
"targeting": {
"traits": {
"plan": "free"
},
"events": {
"seen": [
"activated_workspace"
],
"not_seen": [
"used_csv_export"
]
}
},
"pages": [
"/dashboard",
"/settings/*"
],
"stats": {
"sent": 123,
"frequencyCapped": 123,
"delivered": 123,
"shown": 123,
"opened": 123,
"clicked": 123,
"dismissed": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123,
"converted": 123
},
"variants": [
{
"id": "var_37705a49-52c6-4577-aeed-665099a1e13d",
"name": "A",
"weight": 1,
"isControl": true,
"content": {
"presentation": "toast",
"title": "CSV export is here 📊",
"body": "Export any table to CSV from the toolbar.",
"cta": {
"label": "Try it",
"destination": {
"kind": "website",
"url": "https://app.example.com/exports"
}
},
"media": {
"url": "https://galinum.example/media/projects/prj_123/media/9c2f0b7e-4d11-4c2a-a3d1-1c9a1a2b3c4d.png",
"alt": "Screenshot of the new analytics dashboard",
"decorative": false
}
},
"stats": {
"sent": 123,
"frequencyCapped": 123,
"delivered": 123,
"shown": 123,
"opened": 123,
"clicked": 123,
"dismissed": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123,
"converted": 123
}
}
],
"sourceChanges": {
"revision": "<string>",
"changes": [
{
"sourceId": "<string>",
"kind": "commit",
"sha": "<string>"
}
]
},
"push": {
"appId": "<string>",
"selection": {
"kind": "last_active"
},
"ttlSeconds": 1209600,
"replacementKey": "<string>"
}
},
"evaluatedAt": 123
}{
"error": "Unauthorized"
}{
"error": "Campaign not found"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Campaigns
Get a campaign
Returns one campaign with its variants and per-variant delivery stats.
GET
/
api
/
v1
/
campaigns
/
{id}
Get a campaign
curl --request GET \
--url https://galinum.com/api/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://galinum.com/api/v1/campaigns/{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://galinum.com/api/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://galinum.com/api/v1/campaigns/{id}"
req, _ := http.NewRequest("GET", 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.get("https://galinum.com/api/v1/campaigns/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"campaign": {
"id": "cmp_3ce6dba5-7f36-41f5-9327-d5cc3099ab77",
"name": "Launch: CSV export",
"status": "draft",
"effectiveStatus": "draft",
"channel": "web_inapp",
"goalId": "<string>",
"createdBy": "api",
"createdAt": 1784067764978,
"startedAt": 123,
"endedAt": 123,
"deliverFrom": 123,
"deliverUntil": 123,
"audience": {
"kind": "all"
},
"targeting": {
"traits": {
"plan": "free"
},
"events": {
"seen": [
"activated_workspace"
],
"not_seen": [
"used_csv_export"
]
}
},
"pages": [
"/dashboard",
"/settings/*"
],
"stats": {
"sent": 123,
"frequencyCapped": 123,
"delivered": 123,
"shown": 123,
"opened": 123,
"clicked": 123,
"dismissed": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123,
"converted": 123
},
"variants": [
{
"id": "var_37705a49-52c6-4577-aeed-665099a1e13d",
"name": "A",
"weight": 1,
"isControl": true,
"content": {
"presentation": "toast",
"title": "CSV export is here 📊",
"body": "Export any table to CSV from the toolbar.",
"cta": {
"label": "Try it",
"destination": {
"kind": "website",
"url": "https://app.example.com/exports"
}
},
"media": {
"url": "https://galinum.example/media/projects/prj_123/media/9c2f0b7e-4d11-4c2a-a3d1-1c9a1a2b3c4d.png",
"alt": "Screenshot of the new analytics dashboard",
"decorative": false
}
},
"stats": {
"sent": 123,
"frequencyCapped": 123,
"delivered": 123,
"shown": 123,
"opened": 123,
"clicked": 123,
"dismissed": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123,
"converted": 123
}
}
],
"sourceChanges": {
"revision": "<string>",
"changes": [
{
"sourceId": "<string>",
"kind": "commit",
"sha": "<string>"
}
]
},
"push": {
"appId": "<string>",
"selection": {
"kind": "last_active"
},
"ttlSeconds": 1209600,
"replacementKey": "<string>"
}
},
"evaluatedAt": 123
}{
"error": "Unauthorized"
}{
"error": "Campaign not found"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Authorizations
secretKeyhostedAgentKey
Your project's secret key (pk_…, without the pub segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.
Path Parameters
Maximum string length:
128