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
}| Field | Description |
|---|---|
data | Required. The submitted fields. Any keys; strings are trimmed to 5,000 characters. |
form | Form name. Defaults to default. |
id | Idempotency key. Repeating a request with the same id returns the original lead instead of creating a new one. |
meta | page_url, referrer and utm for attribution. UTM tags are also read from page_url. |
consent | Truthy when the visitor agreed to be contacted. |
turnstile, hp | Turnstile 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"}}'When a website has allowed domains, requests without a matching Origin are rejected. Send your own domain as the Origin from your server.
Responses
| Status | Body | Meaning |
|---|---|---|
| 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. |
| 400 | invalid_body, empty_submission, captcha_failed, consent_required | Fix the request; retrying won't help. |
| 403 | origin_not_allowed | The Origin isn't in the website's allowed domains. |
| 404 | unknown_site | Site key not found. |
| 429 | rate_limited | More 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
- The fields you sent, plus the name and email detected from them.
- Page URL, referrer, UTM tags, user agent and country.
- A salted hash of the IP address (never the address itself).
- Consent timestamp, if given.
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.