Get Campaign
curl --request GET \
--url https://pub-api.conversion.ai/api/v2/campaigns/{campaignId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}', 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://pub-api.conversion.ai/api/v2/campaigns/{campaignId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-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"
"net/http"
"io"
)
func main() {
url := "https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"campaign": {
"id": "b7c8d9e0-f1a2-3456-bcde-f01234567890",
"name": "Q3 Field Events",
"type": {
"id": "3c9d2b1a-8e4f-4a6b-9c0d-2e3f4a5b6c7d",
"name": "Field Event",
"systemType": "CUSTOM",
"statuses": [
{
"id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
"name": "Registered",
"isSuccess": false
},
{
"id": "8f9a0b1c-2d3e-4f4a-9b5c-6d7e8f9a0b1c",
"name": "Attended",
"isSuccess": true
}
]
},
"sfdcCampaignId": "701Ho00000AbCdEfGH",
"memberCount": 42,
"createdAt": "2026-05-01T12:00:00Z",
"updatedAt": "2026-06-11T09:30:00Z",
"description": "Events run by the field team"
}
}
}{
"error": {
"code": "unauthorized",
"message": "API key is required"
}
}{
"error": {
"code": "campaign_not_found",
"message": "campaign not found"
}
}{
"error": {
"code": "internal_error",
"message": "failed to load campaign"
}
}Campaigns
Get Campaign
Get a custom campaign by id, including its description and its campaign type’s member statuses as type.statuses. Statuses are returned in the type’s configured progression order. Archived campaigns return 404.
GET
/
v2
/
campaigns
/
{campaignId}
Get Campaign
curl --request GET \
--url https://pub-api.conversion.ai/api/v2/campaigns/{campaignId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}', 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://pub-api.conversion.ai/api/v2/campaigns/{campaignId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-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"
"net/http"
"io"
)
func main() {
url := "https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pub-api.conversion.ai/api/v2/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"campaign": {
"id": "b7c8d9e0-f1a2-3456-bcde-f01234567890",
"name": "Q3 Field Events",
"type": {
"id": "3c9d2b1a-8e4f-4a6b-9c0d-2e3f4a5b6c7d",
"name": "Field Event",
"systemType": "CUSTOM",
"statuses": [
{
"id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
"name": "Registered",
"isSuccess": false
},
{
"id": "8f9a0b1c-2d3e-4f4a-9b5c-6d7e8f9a0b1c",
"name": "Attended",
"isSuccess": true
}
]
},
"sfdcCampaignId": "701Ho00000AbCdEfGH",
"memberCount": 42,
"createdAt": "2026-05-01T12:00:00Z",
"updatedAt": "2026-06-11T09:30:00Z",
"description": "Events run by the field team"
}
}
}{
"error": {
"code": "unauthorized",
"message": "API key is required"
}
}{
"error": {
"code": "campaign_not_found",
"message": "campaign not found"
}
}{
"error": {
"code": "internal_error",
"message": "failed to load campaign"
}
}Authorizations
Your Conversion API key. Found in Settings > Integrations in the dashboard. Format: sk_live_<key_id>_<secret>.
Path Parameters
The Conversion campaign id, as returned by GET /v2/campaigns.
Response
Campaign retrieved successfully.
Show child attributes
Show child attributes
Was this page helpful?
⌘I