Capture leads

Submit API

Every capture method ends up at one endpoint. Use it directly for server-side forms, mobile apps or imports.

Endpoint

POST https://leadvane.cowebofficial.workers.dev/v1/submit/{siteKey}

Request body

Send JSON (as application/json or text/plain), application/x-www-form-urlencoded or multipart/form-data (file fields are ignored). The body may be up to 32 KB.

Envelope format (recommended)

{
  "form": "contact",
  "id": "a6c4f1c2-6f7e-4f53-9c1d-1d1f0f6f2b11",
  "data": { "name": "Priya Menon", "email": "priya@acmecorp.in", "message": "Offsite for 45 people" },
  "meta": { "page_url": "https://yourbusiness.com/contact?utm_source=google", "referrer": "https://www.google.com/" },
  "consent": true
}
FieldDescription
dataRequired. The submitted fields. Any keys; strings are trimmed to 5,000 characters.
formForm name. Defaults to default.
idIdempotency key. Repeating a request with the same id returns the original lead instead of creating a new one.
metapage_url, referrer and utm for attribution. UTM tags are also read from page_url.
consentTruthy when the visitor agreed to be contacted.
turnstile, hpTurnstile token and honeypot value.

Flat format

Plain form posts send fields at the top level. Use _form, _id, _consent, _hp, _redirect and cf-turnstile-response for the special values.

Example

curl -X POST https://leadvane.cowebofficial.workers.dev/v1/submit/pk_your_site_key \
  -H 'Origin: https://yourbusiness.com' \
  -H 'Content-Type: application/json' \
  -d '{"form":"callback","data":{"name":"Raj","phone":"+91 98765 43210"}}'
Server-side calls need an Origin header

When a website has allowed domains, requests without a matching Origin are rejected. Send your own domain as the Origin from your server.

Responses

StatusBodyMeaning
200{"ok":true,"id":"ld_…"}Saved. Scoring and notifications continue in the background.
303—Plain HTML form posts that accept HTML are redirected back with ?lead=ok.
400invalid_body, empty_submission, captcha_failed, consent_requiredFix the request; retrying won't help.
403origin_not_allowedThe Origin isn't in the website's allowed domains.
404unknown_siteSite key not found.
429rate_limitedMore than 10 submissions a minute from one visitor to one website. Retry later.

A submission caught by the honeypot returns {"ok":true,"id":null} so bots can't tell it was dropped.

What is stored with each lead

Exports

From the dashboard's Leads page, Export downloads the current filtered view as CSV (streamed, opens in any spreadsheet) or Excel (built in your browser). Columns include score, tier, status, owner, value, follow-up, tags, attribution and one column per form field.