Skip to content
ChinaB2BSites

ChinaB2BSites API · v1

Submit inquiries and run website checks from anywhere, read published guides, and sync leads and projects with your CRM or internal tools.

BASE https://chinab2bsites.com/api/v1

Authentication

Public endpoints (inquiries, website checks, guides) need no key and are rate-limited per visitor. Private endpoints need an API key created in the admin area under API keys.

Authorization: Bearer sw_live_…

Each key has scopes. Requests without the required scope get 403.

leads:readleads:writeprojects:readprojects:writecontent:read

Errors return JSON: { "error": "validation_error", "issues": [...] }. Rate-limited requests return 429 with a Retry-After header. The raw OpenAPI 3.1 document is at /api/v1/openapi.json.

Inquiries

post/api/v1/inquiries

Submit an inquiry

Creates a lead from the contact form or another website. At least one of email, phone or WeChat is required. Limited to 5 requests per 10 minutes per visitor.

Request body

namestring
companystring
emailstring · email
phonestring
wechatstring
websitestring
services"export-website" | "google-seo" | "google-ads" | "other"[]
messagestring
locale"zh" | "en"
pagestring
referrerstring
utmobject
company_websitestringHoneypot. Leave empty.

Response 201

id*string
received*true

Example

curl -X POST "https://chinab2bsites.com/api/v1/api/v1/inquiries" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","company":"string","email":"string","phone":"string","wechat":"string","website":"string","services":["export-website"],"message":"string","locale":"zh","page":"string"}'

201 · Inquiry received400 · Invalid input429 · Too many requests

Website check

post/api/v1/audits

Run a website check

Fetches the given website and checks speed, mobile, security, SEO basics, trust signals and English copy. Takes 5–60 seconds. Limited to 6 checks per hour per visitor.

Request body

url*string
locale"zh" | "en"

Response 201

id*string
url*string
finalUrl*string | null
score*integer | null
status*"done" | "error"
error*string | null
checks*AuditCheck[]
createdAt*string

Example

curl -X POST "https://chinab2bsites.com/api/v1/api/v1/audits" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.yourfactory.com","locale":"zh"}'

201 · Check finished422 · The site could not be checked429 · Too many requests

get/api/v1/audits/{id}

Get a website check

Parameters

id (path)*string

Response 200

id*string
url*string
finalUrl*string | null
score*integer | null
status*"done" | "error"
error*string | null
checks*AuditCheck[]
createdAt*string

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/audits/:id"

200 · The check404 · Not found

post/api/v1/audits/{id}/lead

Request the full report

Leaves contact details against a finished check so the team can send the full report and recommendations.

Parameters

id (path)*string

Request body

namestring
companystring
wechatstring
phonestring
emailstring · email
locale"zh" | "en"

Response 201

id*string
received*true

Example

curl -X POST "https://chinab2bsites.com/api/v1/api/v1/audits/:id/lead" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","company":"string","wechat":"string","phone":"string","email":"string","locale":"zh"}'

201 · Request received404 · Check not found429 · Too many requests

Content

get/api/v1/guides

List published guides

Parameters

locale (query)"zh" | "en"

Response 200

data*GuideSummary[]

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/guides"

200 · Guides

get/api/v1/guides/{slug}

Get a guide

Parameters

slug (path)*string
locale (query)"zh" | "en"

Response 200

object

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/guides/:slug"

200 · Guide with markdown body404 · Not found

Leads

get/api/v1/leadsAPI KEY

List leads

Newest first. Use `before` with the `createdAt` of the last item to page. Scope: `leads:read`.

Parameters

status (query)"new" | "contacted" | "quoted" | "won" | "lost" | "spam"
limit (query)integer
before (query)stringISO date-time cursor

Response 200

data*Lead[]
nextBefore*string | null

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/leads" \
  -H "Authorization: Bearer $CBS_API_KEY"

200 · Leads401 · Missing or invalid key

post/api/v1/leadsAPI KEY

Create a lead

Adds a lead from another system (CRM, trade show app, WeChat tooling). Scope: `leads:write`.

Request body

namestring
companystring
emailstring · email
phonestring
wechatstring
websitestring
messagestring
source"api" | "wechat" | "manual"

Response 201

id*string
source*"contact" | "audit" | "api" | "wechat" | "manual"
status*"new" | "contacted" | "quoted" | "won" | "lost" | "spam"
name*string | null
company*string | null
email*string | null
phone*string | null
wechat*string | null
website*string | null
services*array | null
message*string | null
locale*string | null
page*string | null
auditId*string | null
createdAt*string · date-time

Example

curl -X POST "https://chinab2bsites.com/api/v1/api/v1/leads" \
  -H "Authorization: Bearer $CBS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","company":"string","email":"string","phone":"string","wechat":"string","website":"string","message":"string","source":"api"}'

201 · Created

get/api/v1/leads/{id}API KEY

Get a lead

Parameters

id (path)*string

Response 200

id*string
source*"contact" | "audit" | "api" | "wechat" | "manual"
status*"new" | "contacted" | "quoted" | "won" | "lost" | "spam"
name*string | null
company*string | null
email*string | null
phone*string | null
wechat*string | null
website*string | null
services*array | null
message*string | null
locale*string | null
page*string | null
auditId*string | null
createdAt*string · date-time

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/leads/:id" \
  -H "Authorization: Bearer $CBS_API_KEY"

200 · Lead404 · Not found

patch/api/v1/leads/{id}API KEY

Update a lead's status

Parameters

id (path)*string

Request body

status*"new" | "contacted" | "quoted" | "won" | "lost" | "spam"

Response 200

id*string
source*"contact" | "audit" | "api" | "wechat" | "manual"
status*"new" | "contacted" | "quoted" | "won" | "lost" | "spam"
name*string | null
company*string | null
email*string | null
phone*string | null
wechat*string | null
website*string | null
services*array | null
message*string | null
locale*string | null
page*string | null
auditId*string | null
createdAt*string · date-time

Example

curl -X PATCH "https://chinab2bsites.com/api/v1/api/v1/leads/:id" \
  -H "Authorization: Bearer $CBS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"new"}'

200 · Updated404 · Not found

Projects

get/api/v1/projectsAPI KEY

List client projects

Response 200

data*Project[]

Example

curl -X GET "https://chinab2bsites.com/api/v1/api/v1/projects" \
  -H "Authorization: Bearer $CBS_API_KEY"

200 · Projects

patch/api/v1/projects/{id}API KEY

Move a project to another stage

The client sees the new stage in their portal immediately. Scope: `projects:write`.

Parameters

id (path)*string

Request body

stage*"brief" | "design" | "build" | "qc" | "launch" | "grow"
stageNotestring

Response 200

id*string
clientId*string
name*string
services*array | null
stage*"brief" | "design" | "build" | "qc" | "launch" | "grow"
stageNote*string | null
siteUrl*string | null
updatedAt*string

Example

curl -X PATCH "https://chinab2bsites.com/api/v1/api/v1/projects/:id" \
  -H "Authorization: Bearer $CBS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stage":"brief","stageNote":"string"}'

200 · Updated404 · Not found

Webhooks

Register a URL in the admin area under Webhooks to receive a POST whenever a lead is created. Event name: lead.created.

Each request carries X-CBS-Event and X-CBS-Signature: sha256=…, an HMAC-SHA256 of the raw body using the webhook secret. Verify it before trusting the payload.

// Node.js
import { createHmac, timingSafeEqual } from "node:crypto";

const expected = "sha256=" + createHmac("sha256", process.env.CBS_WEBHOOK_SECRET)
  .update(rawBody).digest("hex");
const ok = timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers["x-cbs-signature"]));
{
  "event": "lead.created",
  "createdAt": "2026-09-25T08:00:00.000Z",
  "data": { "id": "…", "source": "contact", "name": "…", "wechat": "…", "services": ["export-website"], … }
}
Free check

WeChat

Add us on WeChat

Scan the code or search for our WeChat ID. We usually reply within 2 hours on working days.

WeChat ID

seaward-sz