List campaigns
curl --request GET \
--url https://galinum.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/campaigns"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/campaigns")
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{
"campaigns": [
{
"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
},
"push": {
"appId": "<string>",
"selection": {
"kind": "last_active"
},
"ttlSeconds": 1209600,
"replacementKey": "<string>"
}
}
],
"total": 42,
"page": 1,
"pageCount": 1,
"evaluatedAt": 123
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Campaigns
List campaigns
Returns the project’s newest campaigns first in deterministic createdAt-then-id descending order, with delivery stats. Defaults to the first 100 campaigns, matching the previous unpaginated maximum.
GET
/
api
/
v1
/
campaigns
List campaigns
curl --request GET \
--url https://galinum.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/campaigns"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/campaigns")
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{
"campaigns": [
{
"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
},
"push": {
"appId": "<string>",
"selection": {
"kind": "last_active"
},
"ttlSeconds": 1209600,
"replacementKey": "<string>"
}
}
],
"total": 42,
"page": 1,
"pageCount": 1,
"evaluatedAt": 123
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"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.
Query Parameters
Only return campaigns with this effective status. scheduled and expired derive from the delivery window; running excludes campaigns whose window hasn't opened or has ended, and paused excludes those whose window has ended.
Available options:
draft, scheduled, running, paused, expired, ended Case-insensitive substring match on the campaign name.
Maximum string length:
200Page number.
Required range:
x >= 1Items per page (max 100).
Required range:
1 <= x <= 100Response
The project's campaigns.