Get Campaign List
curl --request GET \
--url https://api.campaigncleaner.com/v1/get_campaign_listimport requests
url = "https://api.campaigncleaner.com/v1/get_campaign_list"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campaigncleaner.com/v1/get_campaign_list', 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.campaigncleaner.com/v1/get_campaign_list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.campaigncleaner.com/v1/get_campaign_list"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.campaigncleaner.com/v1/get_campaign_list")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campaigncleaner.com/v1/get_campaign_list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campaign_list": [
{
"id": "e8c8af95-c033-11ed-9848-003048d8d536",
"campaign_name": "Test Campaign 1",
"status": "completed",
"date_added": "2023-02-23T12:02:46-05:00"
},
{
"id": "a8c8af95-c033-11ed-9848-003048d8d537",
"campaign_name": "Test Campaign 2",
"status": "completed",
"date_added": "2023-02-25T22:26:15-05:00"
}
]
}API Endpoints
Get Campaign List
The get_campaign_list API endpoint allows you to get the status of all the campaigns you have saved on Campaign Cleaner.
Header:
X-CC-API-Key: Your API Key
Response:
campaign_list:
- id: The campaign id that will be used in other API calls.
- campaign_name: The name of the campaign.
- status: The status will be either processing, completed, or paused
- date_added: The date and time your campaign was saved or submitted to Campaign Cleaner.
If the status is completed, you will be able to retrieve the campaign via the get_campaign API
In the event of an error, you will get an “error:” response, with a description of the reason
GET
/
v1
/
get_campaign_list
Get Campaign List
curl --request GET \
--url https://api.campaigncleaner.com/v1/get_campaign_listimport requests
url = "https://api.campaigncleaner.com/v1/get_campaign_list"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campaigncleaner.com/v1/get_campaign_list', 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.campaigncleaner.com/v1/get_campaign_list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.campaigncleaner.com/v1/get_campaign_list"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.campaigncleaner.com/v1/get_campaign_list")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campaigncleaner.com/v1/get_campaign_list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campaign_list": [
{
"id": "e8c8af95-c033-11ed-9848-003048d8d536",
"campaign_name": "Test Campaign 1",
"status": "completed",
"date_added": "2023-02-23T12:02:46-05:00"
},
{
"id": "a8c8af95-c033-11ed-9848-003048d8d537",
"campaign_name": "Test Campaign 2",
"status": "completed",
"date_added": "2023-02-25T22:26:15-05:00"
}
]
}Headers
Response
200 - application/json
OK
The response is of type object.

