ads
PUT /v1/ads/tracking-hub/keys/{kind}
Store one server-side key (write-only; kept in Vault).
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 query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.
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/keys/{kind} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "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-logged (ads.tracking_hub_key_set, the kind only). The key is written to Vault and never returned, logged or stored in the database; the hub keeps the time it was set and its last four characters. 503 when Vault could not be written (nothing is saved; retry). From then on the key SENDS the organisation's real outcomes server-side (docs/1006 §122): see server_sends on the hub for what it really sent.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
kind (path) | string<meta_capi, tiktok_events, ga4_mp, linkedin_capi, pinterest_capi, openai_capi> | Yes | — |
org_id (query) | string | No | Required when you belong to more than one organisation. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
key | string | Yes | — |
account_id | string | No | pinterest_capi only, and required there: the numeric Pinterest ad account id the conversion token belongs to (the Conversions API posts to /ad_accounts/{id}/events). Any other… |
test_code | string | No | Optional network test code (docs/1006 §122): Meta / TikTok test_event_code, Pinterest test=true, GA4's validation server, OpenAI validate_only for openai_capi (za-335: any value;… |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
org_id | string | Yes | — |
tags | object | Yes | Network -> its browser tag id (google_ads, ga4, microsoft_uet, meta_pixel, tiktok_pixel, linkedin_insight, x_pixel, pinterest_tag, amazon_tag, chatgpt_pixel). |
conversions | object | Yes | Network -> outcome kind -> conversion id (a Google Ads label, a Meta custom conversion, a TikTok event …). |
server_keys | object[] | Yes | — |
server_routes | object | Yes | Network -> how its server-side conversions travel. |
server_sends | object | Yes | Key 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,… |
networks | string[] | Yes | — |
kinds | string[] | Yes | — |
version | integer | Yes | 0 when no hub has been saved yet. |
updated_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 503