ads

PUT /v1/ads/tracking-hub

Change the hub's tag ids and conversion ids.

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.

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 PUT https://api.zinndigital.com/v1/ads/tracking-hub \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

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-logged (ads.tracking_hub_updated). tags and conversions each REPLACE the stored map when present (a blank id removes it). Each tag id is checked against its network's format; a wrong one is a 422 (refusal.adsconnect.trackingHub.*) naming the field, e.g. tags.ga4. The version goes up by one and the cached script of every site tag of the organisation is rewritten.

Request body

NameTypeRequiredWhat it is
org_idstringNo—
tagsobjectNo—
conversionsobjectNoNetwork -> {outcome kind: conversion id}. A LinkedIn conversion id is numeric and an X event id is tw-PIXEL-EVENT (for example tw-o1abc-o1xyz); any other shape for those two is…

Response

NameTypeRequiredWhat it is
org_idstringYes—
tagsobjectYesNetwork -> its browser tag id (google_ads, ga4, microsoft_uet, meta_pixel, tiktok_pixel, linkedin_insight, x_pixel, pinterest_tag, amazon_tag, chatgpt_pixel).
conversionsobjectYesNetwork -> outcome kind -> conversion id (a Google Ads label, a Meta custom conversion, a TikTok event …).
server_keysobject[]Yes—
server_routesobjectYesNetwork -> how its server-side conversions travel.
server_sendsobjectYesKey kind -> what that key really sent (docs/1006 §122), computed from the per-outcome delivery receipts. Only outcomes whose source reported ad_user_data consent GRANTED are sent,…
networksstring[]Yes—
kindsstring[]Yes—
versionintegerYes0 when no hub has been saved yet.
updated_atstringYes—

Errors this endpoint can return

401 · 403 · 404 · 422