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.

/

Contacts

Create and list contacts via /api/v2/contacts (also aliased at /api/contacts).

1

POST Create Contact

Requires phone_number + name. workspace_id (via x-workspace-id header or body) is required unless the API key is workspace-bound.

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

cURL

curl -X POST 'https://api.greenbubble.io/api/v2/contacts' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"phone_number":"+919876543210","name":"John Doe","email":"john@example.com"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/contacts', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "phone_number": "+919876543210",
  "name": "John Doe",
  "email": "john@example.com"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/v2/contacts"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "phone_number": "+919876543210",
  "name": "John Doe",
  "email": "john@example.com"
}

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/contacts');
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, '{"phone_number":"+919876543210","name":"John Doe","email":"john@example.com"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
2

GET List Contacts

GET https://api.greenbubble.io/api/v2/contacts?page=1&limit=25

cURL

curl -X GET 'https://api.greenbubble.io/api/v2/contacts?page=1&limit=25' \
  -H 'x-api-key: YOUR_API_KEY'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/v2/contacts?page=1&limit=25', {
  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/contacts?page=1&limit=25"
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/contacts?page=1&limit=25');
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

GET Get Contact by ID

GET https://api.greenbubble.io/api/contacts/CONTACT_ID

cURL

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

JavaScript

const res = await fetch('https://api.greenbubble.io/api/contacts/CONTACT_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/contacts/CONTACT_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/contacts/CONTACT_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;
4

PUT Update Contact

PUT https://api.greenbubble.io/api/contacts/CONTACT_ID

cURL

curl -X PUT 'https://api.greenbubble.io/api/contacts/CONTACT_ID' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"John Doe","email":"john.updated@example.com"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/contacts/CONTACT_ID', {
  method: 'PUT',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "John Doe",
  "email": "john.updated@example.com"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/contacts/CONTACT_ID"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "John Doe",
  "email": "john.updated@example.com"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/contacts/CONTACT_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"John Doe","email":"john.updated@example.com"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
5

DELETE Bulk Delete Contacts

DELETE https://api.greenbubble.io/api/contacts/delete

cURL

curl -X DELETE 'https://api.greenbubble.io/api/contacts/delete' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"ids":["CONTACT_ID_1","CONTACT_ID_2"]}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/contacts/delete', {
  method: 'DELETE',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "ids": [
    "CONTACT_ID_1",
    "CONTACT_ID_2"
  ]
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/contacts/delete"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
    "CONTACT_ID_1",
    "CONTACT_ID_2"
  ]
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/contacts/delete');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"ids":["CONTACT_ID_1","CONTACT_ID_2"]}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
6

POST Import Contacts (CSV)

POST https://api.greenbubble.io/api/contacts/import

cURL

curl -X POST 'https://api.greenbubble.io/api/contacts/import' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@/path/to/file'

JavaScript

const formData = new FormData();

// formData.append('file', fileInput.files[0]);

const res = await fetch('https://api.greenbubble.io/api/contacts/import', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
  body: formData,
});

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

Python

import requests

url = "https://api.greenbubble.io/api/contacts/import"
headers = { "x-api-key": "YOUR_API_KEY" }
files = { "file": open("/path/to/file", "rb") }
data = {

}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/contacts/import');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$postFields = [

];
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
7

POST Export Contacts

POST https://api.greenbubble.io/api/contacts/export

cURL

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

JavaScript

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