Hanzo

Destinations

Package destinations is your events forwarded to the ad and analytics tools you use.

Package destinations is your events forwarded to the ad and analytics tools you use.

Base URLhttps://api.hanzo.ai
Operations5
AuthAuthorization: Bearer $HANZO_API_KEY

destinations

POST /v1/destinations/{platform}/test

Sends ONE synthetic pageview through the connected destination end to end and reports what the platform said. A send the platform refuses is reported as data — {"ok": false, "error": …} at 200 — so the console shows the platform's own words rather than an error about Hanzo. It requires org admin.

ParameterInTypeRequiredDescription
platformpathstringyesPlatform is the destination to act on, from the path: ga4 | meta | tiktok | linkedin | x | reddit | posthog | umami.

GET /v1/destinations/{platform}

Reports one destination's card for the caller's org — its config fields, its connection state, and whether a credential resolves right now. A platform this deployment does not carry is not found.

ParameterInTypeRequiredDescription
platformpathstringyesPlatform is the destination to act on, from the path: ga4 | meta | tiktok | linkedin | x | reddit | posthog | umami.

POST /v1/destinations/{platform}

Connect one conversion destination for your org, or update the one you have

Stores the addressed platform's non-secret ids (its measurement, pixel or dataset ids) and seals its API credential into KMS under a path scoped to the caller's own org, then answers the same status card the read routes do — with live telling you whether the credential actually resolves right now. The body's property NAMES are the platform's own: each field the platform declares, plus each secret under its camelCase name, so the accepted keys differ per platform and a missing REQUIRED field is refused. Connecting is an ORG ADMIN action — a validated member without the admin bit gets 403 — and it fails closed with 503 when the KMS master key is unavailable rather than persisting a destination whose secret was never sealed. The secret itself never appears in the response, in the store, or in a log line; only its NAME is ever published. Set enabled to false to keep the connection but stop the analytics fan-out to it.

ParameterInTypeRequiredDescription
platformpathstringyes

DELETE /v1/destinations/{platform}

Forgets a destination for the caller's org: every credential held in KMS, then the stored config. Idempotent, and it requires org admin.

ParameterInTypeRequiredDescription
platformpathstringyesPlatform is the destination to act on, from the path: ga4 | meta | tiktok | linkedin | x | reddit | posthog | umami.

GET /v1/destinations

Reports every destination this deployment can forward to, each with the caller org's connection state: whether it is connected, whether it is enabled, whether a credential resolves right now, and the config fields the console renders for it.


All Hanzo APIs · Interactive reference

How is this guide?

On this page