Connect The Client Ocean to your website, Zapier, Make, Google Sheets, Facebook Lead Ads or your own code. There are three ways in:
All requests use HTTPS and JSON. Values below in <angle brackets> are yours to fill in.
Base URL https://firestore.googleapis.com/v1/projects/my-project-1509538563016/databases/(default)/documents API key AIzaSyD47sNtRooSLOE8QyOBTvfWABNkNA1WD-g (public web key — access is controlled by security rules, not by this key)
In the app open Settings → API & integrations → Create my lead-capture endpoint and copy your URL. Anyone with the URL can add leads to your account only, so keep it private; you can replace it at any time.
POST/capture/<YOUR_TOKEN>/leads?key=<API_KEY>
| Field | Required | Notes |
|---|---|---|
| business | yes | Business name, 1–200 characters |
| website | URL (max 500) | |
| Business email (max 200) | ||
| phone | Phone / WhatsApp | |
| city, country | country = 2-letter code, e.g. ae, de | |
| niche | e.g. Real estate agencies | |
| dm, role | Decision maker and their role | |
| notes | Max 5,000 characters | |
| source | e.g. Website form, Facebook Lead Ads | |
| lang | Client language code, e.g. de, ar, ur | |
| value | Expected deal value (text or number as text) | |
| tags | Comma-separated, e.g. "VIP, Dubai" |
Each value is sent as {"stringValue": "..."}. Unknown fields are rejected.
curl -X POST "https://firestore.googleapis.com/v1/projects/my-project-1509538563016/databases/(default)/documents/capture/<YOUR_TOKEN>/leads?key=<API_KEY>" \
-H "Content-Type: application/json" \
-d '{"fields":{"business":{"stringValue":"Palm Realty"},"email":{"stringValue":"owner@palmrealty.ae"},"city":{"stringValue":"Dubai"},"source":{"stringValue":"Website form"}}}'
const URL = "https://firestore.googleapis.com/v1/projects/my-project-1509538563016/databases/(default)/documents/capture/<YOUR_TOKEN>/leads?key=<API_KEY>";
const s = (v) => ({ stringValue: String(v || "") });
await fetch(URL, { method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ fields: { business: s(form.company.value), email: s(form.email.value), phone: s(form.phone.value), notes: s(form.message.value), source: s("Website form") } }) });
import requests
s = lambda v: {"stringValue": str(v)}
requests.post(URL, json={"fields": {"business": s("Palm Realty"), "email": s("owner@palmrealty.ae"), "source": s("Python")}})
stringValues.200 — the created document (JSON). 403 PERMISSION_DENIED — wrong/old token, missing business, a field that isn't allowed, or a value that's too long. 429 — slow down.
POSThttps://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=<API_KEY>
{"email":"you@example.com","password":"<your password>","returnSecureToken":true}
The response contains idToken (valid 1 hour), refreshToken and localId (your user id, <UID>). Send Authorization: Bearer <idToken> with every request. Refresh: POSThttps://securetoken.googleapis.com/v1/token?key=<API_KEY> with grant_type=refresh_token&refresh_token=<refreshToken>. Your email must be confirmed and your account active.
GET/users/<UID>/leads?pageSize=300 — list leads (use nextPageToken for more)
GET/users/<UID>/leads/<LEAD_ID> — one lead
PATCH/users/<UID>/leads/<LEAD_ID> — create or replace a lead
DELETE/users/<UID>/leads/<LEAD_ID> — delete a lead
Each lead document has two fields: j (the lead as a JSON string) and u (last-updated time in milliseconds). The app keeps the newest version, so always send a current u.
curl -X PATCH "<BASE>/users/<UID>/leads/api123?key=<API_KEY>" \
-H "Authorization: Bearer <idToken>" -H "Content-Type: application/json" \
-d '{"fields":{"j":{"stringValue":"{\"id\":\"api123\",\"business\":\"Palm Realty\",\"status\":\"NEW\",\"created\":\"2026-11-17\",\"email\":\"owner@palmrealty.ae\",\"findings\":[],\"history\":[]}"},"u":{"integerValue":"1795000000000"}}}'
j)| Key | Meaning |
|---|---|
| id, created | Same id as the document; created date YYYY-MM-DD |
| business, website, email, phone, wa, city, country, niche, dm, role, source, lang | Contact and context |
| status | NEW · PITCHED · BOUNCED · FOLLOWED-UP · REPLIED · HOT · CALL · PROPOSAL · AGREEMENT · WON · ACTIVE · LOST · LATER · DNC |
| value, price, pkg, setupFee, closeBy, owner, tags[] | Deal details |
| tasks[] | {id, t, due, time, done, key, act, auto} |
| meetings[] | {id, title, start (ISO), dur, link, gid, status} |
| findings[], history[], notes | Audit findings, activity log, notes |
| sent, fu, fuStage, subject, invoice, invNo, paid, start | Pitch, follow-up and invoice dates |
GET/users/<UID>/crm/meta — your profile, business details, settings (field j, JSON). Write with PATCH like leads.
GET/config/plans?key=<API_KEY> — packages & prices (field j, JSON).
POST/messages?key=<API_KEY> — contact form. Fields: name (2–80), email, message (10–5000), optional subject, company, topic; plus status: "new" and createdAt (ISO string).
| Service | Used for | Key |
|---|---|---|
| Google Firebase (Auth, Firestore, Hosting) | Accounts, data, website | built in |
| Serper.dev | Live Google search results | each user's own |
| Google PageSpeed Insights | Speed audits | own or shared |
| Google Cloud Translation / MyMemory | Client-language translation | own Google key, or free MyMemory |
| Google Calendar & Meet | Meetings and invites | user signs in with Google |
| OpenStreetMap (Nominatim, Overpass) | Live business lists | none |
| crt.sh, Common Crawl, GDELT | New domains, free-builder sites, news | none |
| Google website translator | App interface languages | none |
| open.er-api.com | Live exchange rates | none |
Questions? Contact us.