Greenbubble Docs
Greenbubble Docs Reviewed 11 August 2026

How to use the platform

Step-by-step guides for connecting channels, sending messages, and integrating with the Developer API.

/

Campaigns - Insights & Recurring

Campaign analytics and recurring scheduling.

1

GET Campaign Insights

GET https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/insights

cURL

curl -X GET 'https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/insights' \
  -H 'x-api-key: YOUR_API_KEY'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/insights', {
  method: 'GET',
  headers: { 'x-api-key': 'YOUR_API_KEY' }
});

const data = await res.json();
console.log(data);

Python

import requests

url = "https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/insights"
headers = { "x-api-key": "YOUR_API_KEY" }

response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())

PHP

$ch = curl_init('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/insights');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
2

GET Campaign Report

GET https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/report

cURL

curl -X GET 'https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/report' \
  -H 'x-api-key: YOUR_API_KEY'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/report', {
  method: 'GET',
  headers: { 'x-api-key': 'YOUR_API_KEY' }
});

const data = await res.json();
console.log(data);

Python

import requests

url = "https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/report"
headers = { "x-api-key": "YOUR_API_KEY" }

response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())

PHP

$ch = curl_init('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/report');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
3

POST Publish Campaign

POST https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/publish

cURL

curl -X POST 'https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/publish' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/publish', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({})
});

const data = await res.json();
console.log(data);

Python

import requests

url = "https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/publish"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {}

response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())

PHP

$ch = curl_init('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/publish');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
4

POST Setup Recurring Campaign

POST https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/setup-recurring

cURL

curl -X POST 'https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/setup-recurring' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"is_recurring":true,"recurring_pattern":"daily"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/setup-recurring', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "is_recurring": true,
  "recurring_pattern": "daily"
})
});

const data = await res.json();
console.log(data);

Python

import requests

url = "https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/setup-recurring"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "is_recurring": true,
  "recurring_pattern": "daily"
}

response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())

PHP

$ch = curl_init('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/setup-recurring');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"is_recurring":true,"recurring_pattern":"daily"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;

Still need help?

Use one clear test before contacting support.

Include workspace, channel, exact time, what you expected, what happened, and the error with private details hidden.

Troubleshoot