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.

/

Broadcast Campaigns

Bulk template campaigns via /api/v2/campaigns (Cloud API). Also aliased at /api/campaigns.

1

POST Create Campaign (All Contacts)

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"March Newsletter","waba_id":"1248119146671221","template_name":"newsletter_template","recipient_type":"all_contacts","variables_mapping":{"1":"John","2":"March 2026"}}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "March Newsletter",
  "waba_id": "1248119146671221",
  "template_name": "newsletter_template",
  "recipient_type": "all_contacts",
  "variables_mapping": {
    "1": "John",
    "2": "March 2026"
  }
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "March Newsletter",
  "waba_id": "1248119146671221",
  "template_name": "newsletter_template",
  "recipient_type": "all_contacts",
  "variables_mapping": {
    "1": "John",
    "2": "March 2026"
  }
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"March Newsletter","waba_id":"1248119146671221","template_name":"newsletter_template","recipient_type":"all_contacts","variables_mapping":{"1":"John","2":"March 2026"}}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
2

POST Create Campaign (Specific Contacts)

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Targeted Promo","waba_id":"1248119146671221","template_name":"newsletter_template","recipient_type":"specific_contacts","contact_numbers":["91766787866678","877677687788"],"variables_mapping":{"1":"John","2":"March 2026"}}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Targeted Promo",
  "waba_id": "1248119146671221",
  "template_name": "newsletter_template",
  "recipient_type": "specific_contacts",
  "contact_numbers": [
    "91766787866678",
    "877677687788"
  ],
  "variables_mapping": {
    "1": "John",
    "2": "March 2026"
  }
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Targeted Promo",
  "waba_id": "1248119146671221",
  "template_name": "newsletter_template",
  "recipient_type": "specific_contacts",
  "contact_numbers": [
    "91766787866678",
    "877677687788"
  ],
  "variables_mapping": {
    "1": "John",
    "2": "March 2026"
  }
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Targeted Promo","waba_id":"1248119146671221","template_name":"newsletter_template","recipient_type":"specific_contacts","contact_numbers":["91766787866678","877677687788"],"variables_mapping":{"1":"John","2":"March 2026"}}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
3

POST Create Scheduled Campaign (By Tags)

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Scheduled Reminder","waba_id":"1248119146671221","template_name":"reminder_template","recipient_type":"tags","tag_ids":["64a1b2c3d4e5f6789abcdtag"],"is_scheduled":true,"scheduled_at":"2026-04-15T10:00:00Z"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Scheduled Reminder",
  "waba_id": "1248119146671221",
  "template_name": "reminder_template",
  "recipient_type": "tags",
  "tag_ids": [
    "64a1b2c3d4e5f6789abcdtag"
  ],
  "is_scheduled": true,
  "scheduled_at": "2026-04-15T10:00:00Z"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Scheduled Reminder",
  "waba_id": "1248119146671221",
  "template_name": "reminder_template",
  "recipient_type": "tags",
  "tag_ids": [
    "64a1b2c3d4e5f6789abcdtag"
  ],
  "is_scheduled": true,
  "scheduled_at": "2026-04-15T10:00:00Z"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Scheduled Reminder","waba_id":"1248119146671221","template_name":"reminder_template","recipient_type":"tags","tag_ids":["64a1b2c3d4e5f6789abcdtag"],"is_scheduled":true,"scheduled_at":"2026-04-15T10:00:00Z"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
4

POST Create Campaign with Media

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Media Announcement","waba_id":"1248119146671221","template_name":"media_offer","recipient_type":"all_contacts","media_url":"https://example.com/banner.jpg"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Media Announcement",
  "waba_id": "1248119146671221",
  "template_name": "media_offer",
  "recipient_type": "all_contacts",
  "media_url": "https://example.com/banner.jpg"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Media Announcement",
  "waba_id": "1248119146671221",
  "template_name": "media_offer",
  "recipient_type": "all_contacts",
  "media_url": "https://example.com/banner.jpg"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Media Announcement","waba_id":"1248119146671221","template_name":"media_offer","recipient_type":"all_contacts","media_url":"https://example.com/banner.jpg"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
5

POST Create Campaign with Dynamic Coupon

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Discount Campaign","waba_id":"1248119146671221","template_name":"coupon_offer","recipient_type":"all_contacts","coupon_code":"SPRING20"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Discount Campaign",
  "waba_id": "1248119146671221",
  "template_name": "coupon_offer",
  "recipient_type": "all_contacts",
  "coupon_code": "SPRING20"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Discount Campaign",
  "waba_id": "1248119146671221",
  "template_name": "coupon_offer",
  "recipient_type": "all_contacts",
  "coupon_code": "SPRING20"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Discount Campaign","waba_id":"1248119146671221","template_name":"coupon_offer","recipient_type":"all_contacts","coupon_code":"SPRING20"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
6

POST Create Campaign for Limited Time Offer

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Flash Sale Campaign","waba_id":"1248119146671221","template_name":"flash_sale","recipient_type":"all_contacts","offer_expiration_minutes":60}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Flash Sale Campaign",
  "waba_id": "1248119146671221",
  "template_name": "flash_sale",
  "recipient_type": "all_contacts",
  "offer_expiration_minutes": 60
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Flash Sale Campaign",
  "waba_id": "1248119146671221",
  "template_name": "flash_sale",
  "recipient_type": "all_contacts",
  "offer_expiration_minutes": 60
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Flash Sale Campaign","waba_id":"1248119146671221","template_name":"flash_sale","recipient_type":"all_contacts","offer_expiration_minutes":60}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
7

POST Create Campaign with Product Carousel

POST https://api.greenbubble.io/api/v2/campaigns

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/campaigns' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Catalog Carousel","waba_id":"1248119146671221","template_name":"product_carousel","recipient_type":"all_contacts","carousel_products":[{"product_retailer_id":"prod_1","catalog_id":"cat_1"}]}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Catalog Carousel",
  "waba_id": "1248119146671221",
  "template_name": "product_carousel",
  "recipient_type": "all_contacts",
  "carousel_products": [
    {
      "product_retailer_id": "prod_1",
      "catalog_id": "cat_1"
    }
  ]
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/campaigns"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Catalog Carousel",
  "waba_id": "1248119146671221",
  "template_name": "product_carousel",
  "recipient_type": "all_contacts",
  "carousel_products": [
    {
      "product_retailer_id": "prod_1",
      "catalog_id": "cat_1"
    }
  ]
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/v2/campaigns');
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, '{"name":"Catalog Carousel","waba_id":"1248119146671221","template_name":"product_carousel","recipient_type":"all_contacts","carousel_products":[{"product_retailer_id":"prod_1","catalog_id":"cat_1"}]}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
8

GET List Campaigns

GET https://api.greenbubble.io/api/v2/campaigns

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/campaigns', {
  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/v2/campaigns"
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/v2/campaigns');
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;
9

GET Get Campaign by ID

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

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID', {
  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"
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');
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;
10

POST Send Campaign

Trigger a campaign send (MCP send_campaign maps here).

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

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/send', {
  method: 'POST',
  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/send"
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/send');
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;
11

POST Resend Campaign

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

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/resend', {
  method: 'POST',
  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/resend"
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/resend');
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;
12

POST Duplicate Campaign

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

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/duplicate', {
  method: 'POST',
  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/duplicate"
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/duplicate');
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;
13

POST Pause / Resume Campaign

POST https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/toggle-pause

cURL

curl -X POST 'https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/toggle-pause' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/campaigns/CAMPAIGN_ID/toggle-pause', {
  method: 'POST',
  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/toggle-pause"
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/toggle-pause');
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;

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