tenancy
POST /v1/me/acquisition-touch
Record where the signed-in customer came from (the app's landing capture).
Authentication
Send an API key as a bearer token. This endpoint checks no specific permission, so any key for your organisation can call it.
Where your organisation id goes
This endpoint takes org_id as a field in the JSON body.
Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/me/acquisition-touch \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "touch": <object> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
The dashboard captures utm_*, ref, zd_vid (the product sites' visit id), the referring host and the landing page BEFORE the sign-in hop, and sends them here on the first signed-in page load. This is the only way an app sign-up can be attributed: self-registration provisions the organization inside authentication, which never sees the landing URL (docs/750). Unknown keys are dropped, values are capped, and the landing page is host and path only. Recorded only against an organization the caller OWNS — a member of someone else's account did not bring it to us — and never under impersonation. A MEMBER who is not the owner (staff, an invited team member) gets 200 with recorded: false, reason: not_owner and nothing is written; 403 only for an organization the caller does not belong to at all. The first touch is written once and never overwritten; the last touch is overwritten each time. A capture with nothing attributable (no campaign, affiliate code, visit id or foreign referrer) records nothing and answers recorded: false, reason: empty — except the app's DIRECT first visit (entry: direct), which is recorded as a first touch only, when the org has none, so the owner's alert reads "Direct" instead of "Unknown"; it never overwrites a source. The app sends that marker once per organization when it has nothing pending (a browser that already reported another account's landing). On an organization more than a day old it records nothing and answers reason: late, so an old "Unknown" sign-up is never relabelled "Direct". Before recording a direct marker on an org with no first touch, the engine asks Keycloak for the caller's REGISTER event: the app's register redirect URI carries the campaign (zd_acq), so a sign-up finished in another browser (the verify-email link) keeps its source, which is then recorded instead of "Direct".
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
org_id | string | No | The org to record against; optional when the caller owns exactly one. |
touch | object | Yes | Captured on landing. Kept keys: utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, gbraid, wbraid, fbclid, ttclid, msclkid, twclid (a malformed twclid is… |
latest | object | No | The campaign the visitor landed with most recently (the marketing edge's zinn_camp slot: the UTM parameters and landing_page), sent when it differs from touch. touch can still… |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
recorded | boolean | Yes | — |
reason | string<, empty, impersonation, late, not_owner> | Yes | — |
org_id | string | No | — |
Errors this endpoint can return
401 · 403 · 422