ads

PUT /v1/ads/connections/{connection_id}/product-analytics

Connect or update the product analytics project (za-190).

All ads endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the ads.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/ads/connections/{connection_id}/product-analytics \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "region": <string<eu, us>>, "project_id": <string>, "api_key": <string> }'

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

Gated on ads.manage; audit action ads.product_analytics_connected. The project's personal API key is checked against the vendor once, then kept in Vault only. At least one of the stage event names is required. A vendor refusal answers 422 with failure (which kind of failure, whose key, where to fix it — CLAUDE.md §2.57); nothing is stored.

Parameters

NameTypeRequiredWhat it is
connection_id (path)stringYes—

Request body

NameTypeRequiredWhat it is
regionstring<eu, us>Yes—
project_idstringYes—
api_keystringYes—
signup_eventstringNo—
activated_eventstringNo—
upgraded_eventstringNo—
active_eventstringNo—
value_propertystringNo—
currencystringNo—

Response

NameTypeRequiredWhat it is
idstringYes—
connection_idstringYes—
vendorstring<posthog>Yes—
regionstring<eu, us>Yes—
project_idstringYes—
has_keybooleanYes—
enabledbooleanYes—
eventsobjectYesThe customer's event name per stage ("" = not tracked).
active_eventstringYesThe event that proves a person is still using the product (retention).
value_propertystringYesThe event property carrying the upgrade value.
currencystringYes—
cursor_atobjectYes—
last_attempted_atobjectYes—
last_synced_atobjectYes—
last_failurestringYesThe stored failure class of the last sync, "" when it worked.
failureVendorFailure | nullYes—
events_readintegerYes—
created_atobjectYes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429