Targenix inbound webhook

Public reference for the endpoint that accepts leads from your own landing page and routes them onward to a CRM, Telegram, Google Sheets or a CPA network.

If your form does not live on Facebook or Instagram — a Tilda page, a Creatium funnel, a Next.js landing, a Zapier step — you can still push the lead into the same delivery pipeline. One endpoint, no signature, no API-key header.

The endpoint

POST https://app.targenix.uz/api/webhooks/ingest/<token>
Content-Type: application/json

application/x-www-form-urlencoded is accepted too, so a plain HTML <form action="…"> works with no JavaScript at all.

The token identifies exactly one webhook source in your account and is the only secret involved — treat the whole URL as a credential. CORS is open (Access-Control-Allow-Origin: *) because landing pages usually submit cross-origin from the browser; no cookies are ever read on this route.

Request

Any flat JSON object. There is no fixed schema: you map your own field names to lead fields once, inside the app.

{
  "name": "Aziz",
  "phone": "+998901234567",
  "product": "Formula S",
  "utm_source": "instagram"
}

Responses

Always fast, always JSON. Tilda marks a URL unavailable if it does not answer within roughly five seconds, so the endpoint replies immediately and does the delivery work behind it.

BodyMeaning
{"ok":true,"status":"lead_received"}Accepted as a lead and queued for delivery.
{"ok":true,"status":"sample_captured"}No field mapping saved yet. The keys were stored so you can map them in the app — no lead was created.
{"ok":true,"status":"ok"}Handshake ping. No lead.
{"ok":false,"error":"unknown_token"}404 — the token does not resolve to a source.
{"ok":false,"error":"internal_error"}200 on purpose, so your visitor never sees an error caused by our side. Logged for us to chase.

Read that last row twice: a 200 does not mean a lead was created. Branch on status, not on the HTTP code.

Examples

curl -X POST https://app.targenix.uz/api/webhooks/ingest/YOUR_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{"name":"Aziz","phone":"+998901234567"}'
await fetch('https://app.targenix.uz/api/webhooks/ingest/YOUR_TOKEN', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ name, phone }),
});
<form action="https://app.targenix.uz/api/webhooks/ingest/YOUR_TOKEN" method="POST">
  <input name="name" required>
  <input name="phone" type="tel" required>
  <button type="submit">Yuborish</button>
</form>

Why we ask you to check the body

We learned this from the other side of the wire. When Targenix delivers a lead onward to a partner API, a 200 frequently carries the failure inside the body — {"ok": false, "error": "duplicate phone"}. Counting status codes produces a delivery rate that looks excellent and matches nothing the operator actually sees on their phone. We parse the body instead, and we ask the same of anyone calling us.

Where this fits

The webhook is one lead source among several. Facebook and Instagram Lead Ads arrive over Meta's own webhook with a polling backup; this endpoint covers everything else. From there the routing is identical: validation, per-destination delivery, retry classification and reporting.

The full destination list — CRMs, Telegram, Google Sheets, SMS and the Uzbek CPA networks — is at targenix.uz/integrations. The service is free to use, with the reasoning at targenix.uz/pricing.