ads
PUT /v1/ads/connections/{connection_id}/product-analytics
Connect or update the product analytics project (za-190).
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
| Name | Type | Required | What it is |
|---|---|---|---|
connection_id (path) | string | Yes | — |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
region | string<eu, us> | Yes | — |
project_id | string | Yes | — |
api_key | string | Yes | — |
signup_event | string | No | — |
activated_event | string | No | — |
upgraded_event | string | No | — |
active_event | string | No | — |
value_property | string | No | — |
currency | string | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
connection_id | string | Yes | — |
vendor | string<posthog> | Yes | — |
region | string<eu, us> | Yes | — |
project_id | string | Yes | — |
has_key | boolean | Yes | — |
enabled | boolean | Yes | — |
events | object | Yes | The customer's event name per stage ("" = not tracked). |
active_event | string | Yes | The event that proves a person is still using the product (retention). |
value_property | string | Yes | The event property carrying the upgrade value. |
currency | string | Yes | — |
cursor_at | object | Yes | — |
last_attempted_at | object | Yes | — |
last_synced_at | object | Yes | — |
last_failure | string | Yes | The stored failure class of the last sync, "" when it worked. |
failure | VendorFailure | null | Yes | — |
events_read | integer | Yes | — |
created_at | object | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429