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 URL | https://api.hanzo.ai |
| Operations | 5 |
| Auth | Authorization: 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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
platform | path | string | yes | Platform 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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
platform | path | string | yes | Platform 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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
platform | path | string | yes |
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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
platform | path | string | yes | Platform 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.
How is this guide?
Deploy
Package deploy is Hanzo CD: see what each app is running, sync it, and roll back a bad release.
Dev-bridge
Package ai is Hanzo AI — the model API on /v1 (/v1/chat/completions, /v1/messages, /v1/models and the rest of hanzoai/ai's surface) — mounted into a cloud binary with the money, ingest and telemetry…