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.

/

Authentication (session)

JWT session auth used by the app. External integrators should prefer API keys instead of scraped session tokens.

1

POST Register

POST https://api.greenbubble.io/api/auth/register

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/register' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Jane Doe","email":"jane@example.com","phone":"9812345678","countryCode":"+91","password":"your-password"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/register', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Jane Doe",
  "email": "jane@example.com",
  "phone": "9812345678",
  "countryCode": "+91",
  "password": "your-password"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/register"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Jane Doe",
  "email": "jane@example.com",
  "phone": "9812345678",
  "countryCode": "+91",
  "password": "your-password"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/register');
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":"Jane Doe","email":"jane@example.com","phone":"9812345678","countryCode":"+91","password":"your-password"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
2

POST Login

POST https://api.greenbubble.io/api/auth/login

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/login' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"identifier":"jane@example.com","password":"your-password"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/login', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "identifier": "jane@example.com",
  "password": "your-password"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/login"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "identifier": "jane@example.com",
  "password": "your-password"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/login');
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, '{"identifier":"jane@example.com","password":"your-password"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
3

POST Verify OTP

POST https://api.greenbubble.io/api/auth/verify-otp

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/verify-otp' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"jane@example.com","otp":"123456"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/verify-otp', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "email": "jane@example.com",
  "otp": "123456"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/verify-otp"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "email": "jane@example.com",
  "otp": "123456"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/verify-otp');
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, '{"email":"jane@example.com","otp":"123456"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
4

POST Resend OTP

POST https://api.greenbubble.io/api/auth/resend-otp

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/resend-otp' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"jane@example.com"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/resend-otp', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "email": "jane@example.com"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/resend-otp"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "email": "jane@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/auth/resend-otp');
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, '{"email":"jane@example.com"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
5

POST Forgot Password

POST https://api.greenbubble.io/api/auth/forgot-password

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/forgot-password' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"jane@example.com"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/forgot-password', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "email": "jane@example.com"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/forgot-password"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "email": "jane@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/auth/forgot-password');
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, '{"email":"jane@example.com"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
6

POST Reset Password

POST https://api.greenbubble.io/api/auth/reset-password

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/reset-password' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"jane@example.com","new_password":"new-password"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/reset-password', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "email": "jane@example.com",
  "new_password": "new-password"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/reset-password"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "email": "jane@example.com",
  "new_password": "new-password"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/reset-password');
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, '{"email":"jane@example.com","new_password":"new-password"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
7

GET Get Profile

Resolves user id, name, email, role for a valid key. Used by MCP for identity resolution.

GET https://api.greenbubble.io/api/auth/profile

cURL

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

JavaScript

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

PUT Update Profile

PUT https://api.greenbubble.io/api/auth/profile

cURL

curl -X PUT 'https://api.greenbubble.io/api/auth/profile' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Jane Doe","phone":"9812345678"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/profile', {
  method: 'PUT',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "Jane Doe",
  "phone": "9812345678"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/profile"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "name": "Jane Doe",
  "phone": "9812345678"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/profile');
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":"Jane Doe","phone":"9812345678"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
9

GET My Permissions

GET https://api.greenbubble.io/api/auth/my-permissions

cURL

curl -X GET 'https://api.greenbubble.io/api/auth/my-permissions' \
  -H 'x-api-key: YOUR_API_KEY'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/my-permissions', {
  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/auth/my-permissions"
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/auth/my-permissions');
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 Change Password

POST https://api.greenbubble.io/api/auth/change-password

cURL

curl -X POST 'https://api.greenbubble.io/api/auth/change-password' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"current_password":"old-password","new_password":"new-password"}'

JavaScript

const res = await fetch('https://api.greenbubble.io/api/auth/change-password', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "current_password": "old-password",
  "new_password": "new-password"
})
});

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

Python

import requests

url = "https://api.greenbubble.io/api/auth/change-password"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
  "current_password": "old-password",
  "new_password": "new-password"
}

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

PHP

$ch = curl_init('https://api.greenbubble.io/api/auth/change-password');
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, '{"current_password":"old-password","new_password":"new-password"}');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode . "\n" . $response;
11

POST Logout

POST https://api.greenbubble.io/api/auth/logout

cURL

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

JavaScript

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