# Get destination

URL: https://docs.hanzo.ai/docs/openapi/destination/get-destination-by-platform

> Reports one destination's card for the caller's org — its config fields, its connection state, and whether a credential resolves right now.

`GET /v1/destination/{platform}`

> [Destination →](https://docs.hanzo.ai/docs/openapi/destination) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                  |
| ------------- | ------------------------------------------------ |
| **Address**   | `https://api.hanzo.ai/v1/destination/{platform}` |
| **Method**    | `GET`                                            |
| **Operation** | `get_destination_by_platform`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`           |

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.

## Request

1 field.

| Field      | In   | Type   | Required | Description                                                                                                         |
| ---------- | ---- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `platform` | path | string | yes      | Platform is the destination to act on, from the path: ga4 \| meta \| tiktok \| linkedin \| x \| reddit \| insights. |

## Response

| Status    | Body                          | Meaning |
| --------- | ----------------------------- | ------- |
| `200`     | destination.DestinationStatus | ok      |
| `default` | problem-details               | refused |

`200` body — 16 fields.

| Field               | In   | Type                            | Always | Description                                                                                                                                                                                                                   |
| ------------------- | ---- | ------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`           | body | string                          | —      | Account is the operator's own label for the connected account, as supplied on connect.                                                                                                                                        |
| `category`          | body | string                          | —      | groups the card: Analytics \| Advertising                                                                                                                                                                                     |
| `config`            | body | object                          | —      | Config is the org's stored NON-SECRET configuration — the measurement/pixel ids keyed by DestinationField.Key.                                                                                                                |
| `config.*`          | body | string                          | —      |                                                                                                                                                                                                                               |
| `connected`         | body | boolean                         | —      | Connected is true when this org has a stored row for the platform — it has been configured here at least once.                                                                                                                |
| `enabled`           | body | boolean                         | —      | Enabled is whether the fan-out forwards to this destination.                                                                                                                                                                  |
| `fields`            | body | destination.DestinationField\[] | —      | Fields are the non-secret inputs this platform needs, which the console card renders and the connect body fills.                                                                                                              |
| `fields[].example`  | body | string                          | —      | a sample value of the right shape ("G-XXXXXXX"), when one helps                                                                                                                                                               |
| `fields[].key`      | body | string                          | —      | the camelCase key on both the connect body and the stored config                                                                                                                                                              |
| `fields[].label`    | body | string                          | —      | human label for the console card's input                                                                                                                                                                                      |
| `fields[].required` | body | boolean                         | —      | when true, a connect that leaves it empty is refused 400                                                                                                                                                                      |
| `live`              | body | boolean                         | —      | Live is whether a credential resolves RIGHT NOW: a KMS-sealed secret for this org, else the integrations connection named by the platform's Fallback, else no credential needed at all (a public-ingest sink like Analytics). |
| `name`              | body | string                          | —      | the platform's display name ("Google Analytics 4")                                                                                                                                                                            |
| `pixel`             | body | boolean                         | —      | Pixel is whether the hosted tag can inject a browser pixel for this platform, so a console offers a per-SITE pixel input for exactly these.                                                                                   |
| `platform`          | body | string                          | —      | the platform slug, and the path segment every route addresses it by                                                                                                                                                           |
| `secrets`           | body | string\[]                       | —      | Secrets are the KMS secret NAMES this platform custodies for the org — names only, never values.                                                                                                                              |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo destination get <platform>
```

**SDK**

**.ts**

```ts
import { Configuration, DestinationApi } from 'hanzoai';

const api = new DestinationApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDestinationByPlatform({ platform: 'platform' });
```

**.py**

```python
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).get_destination_by_platform(platform='platform')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DestinationAPI.GetDestinationByPlatform(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
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::get_destination_by_platform(&cfg, Default::default()).await?;
```

**.java**

```java
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).getDestinationByPlatform();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/destination/<platform> \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `destination`, op `get_destination_by_platform` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "destination",
         "arguments": {
           "op": "get_destination_by_platform",
           "input": {
             "platform": "<platform>"
           }
         }
       }
     }'
```

---

[Destination API](https://docs.hanzo.ai/docs/openapi/destination) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
