# Delete destination

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

> Forgets a destination for the caller's org: every credential held in KMS, then the stored config.

`DELETE /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**    | `DELETE`                                         |
| **Operation** | `delete_destination_by_platform`                 |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`           |

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

## 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.destinationDisconnected | ok      |
| `default` | problem-details                     | refused |

`200` body — 1 field.

| Field          | In   | Type    | Always | Description                                                     |
| -------------- | ---- | ------- | ------ | --------------------------------------------------------------- |
| `disconnected` | body | boolean | —      | Disconnected is true when the credentials and the row are gone. |

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

## Examples

**CLI**

```bash
hanzo destination rm <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.deleteDestinationByPlatform({ 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).delete_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.DeleteDestinationByPlatform(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::delete_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).deleteDestinationByPlatform();
```

**HTTP**

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

**MCP**

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:

```bash
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](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)
