Test destination

Sends ONE synthetic conversion through the connected destination end to end and reports what the platform said.

POST /v1/destination/{platform}/test

Addresshttps://api.hanzo.ai/v1/destination/{platform}/test
MethodPOST
Operationpost_destination_by_platform_test
AuthAuthorization: Bearer $HANZO_API_KEY

Sends ONE synthetic conversion through the connected destination end to end and reports what the platform said. Where the platform can check one without recording it, it is a lead and nothing is kept: GA4 answers from its validation server, Google Ads validates without importing, and Meta files it under the connection's Test Event Code (and is refused without one). Anywhere else it is a page view. 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.

Request

1 field.

FieldInTypeRequiredDescription
platformpathstringyesPlatform is the destination to act on, from the path: ga4 | meta | tiktok | linkedin | x | reddit | insights.

Response

StatusBodyMeaning
200destination.destinationTestok
defaultproblem-detailsrefused

200 body — 4 fields.

FieldInTypeAlwaysDescription
errorbodystring—Error is the platform's rejection, present only on a failed send.
messagebodystring—Message is the platform's own note about the send, present only on success.
okbodyboolean—OK is true when the platform accepted the synthetic event.
sentbodyinteger (int64)—Sent is how many events the platform accepted, present only on success.

Failure carries the platform error shape — see Errors.

Examples

hanzo destination test <platform>
import { Configuration, DestinationApi } from 'hanzoai';

const api = new DestinationApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDestinationByPlatformTest({ platform: 'platform' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DestinationApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DestinationApi(client).post_destination_by_platform_test(platform='platform')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DestinationAPI.PostDestinationByPlatformTest(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, destination_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = destination_api::post_destination_by_platform_test(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DestinationApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DestinationApi(client).postDestinationByPlatformTest();
curl -X POST https://api.hanzo.ai/v1/destination/<platform>/test \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches destination through the destination tool, which names its 4 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_destinations"
         }
       }
     }'

Destination API · All Hanzo APIs · Interactive reference

Was this page useful?