# Test destination

> Uploads a small probe object to the given path with the stored credentials, so a misconfigured bucket is found here rather than on a real task.

Uploads a small WEBP probe to `path` with the credentials on file and answers
`204`. Call it after creating a destination or rotating its secret: a wrong
key or a missing permission shows up here as `502 DESTINATION_TEST_FAILED`,
not on a generation you already paid for. Delete the probe afterwards.

`POST /destinations/{id}/test`

**Auth:** API key or OAuth token

## Path parameters

- `id` (required, string) — The destination to test. Example `"dst_01KE7XWWEQ4MCGWKBQKJ1G47RP"`.

## Request body

- `path` (required, string) — Destination path for the test upload. Used verbatim, not templated. ≥ 1 characters, ≤ 2048 characters.

## Response

### 204 — Destination test completed

No body.

## Request samples

### cURL

```bash
curl -X POST https://api.mynth.io/destinations/dst_01KE7XWWEQ4MCGWKBQKJ1G47RP/test \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "string"
  }'
```

### JavaScript

```ts
const response = await fetch("https://api.mynth.io/destinations/dst_01KE7XWWEQ4MCGWKBQKJ1G47RP/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MYNTH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "path": "string"
  }),
});

const { data } = await response.json();
```

The full schema for this endpoint is in the [OpenAPI document](https://api.mynth.io/openapi.json).
