---
title: "Test the connection: write a small file with the stored keys."
method: POST
path: "/v1/organizations/current/warehouse/destinations/{id}/test"
tags: ["events"]
---

# Test the connection: write a small file with the stored keys.

`POST /v1/organizations/current/warehouse/destinations/{id}/test`

## Request

- Base URL: `https://api.50heads.com`
- URL: `https://api.50heads.com/v1/organizations/current/warehouse/destinations/{id}/test`
- Auth: HTTP bearer

Organization admins, signed in. Answers 200 whether or not the write worked; `test.ok` says which, with the bucket's error code. Behind the `warehouseExport` flag (and the organizations flag): 404 `not_found` until it is on for your organization. Each run writes JSON lines under `<prefix><dataset>/dt=<date>/<run>-<n>.jsonl` and then a manifest at `<prefix>manifests/<time>-<run>.json` listing the files, their rows and SHA-256; load the files a manifest lists (a file with no manifest is from a run that failed and is written again). Parquet is not written. Keys are stored encrypted and never returned.

## Path parameters

- `id` string, required

## Response `200`

OK

- WarehouseDestinationTestResponse
  - `test` object, required
    - `ok` boolean, required
    - `status` integer, nullable, required
    - `code` 'access_denied' | 'no_such_bucket' | 'invalid_credentials' | 'wrong_region' | 'unreachable' | 'bucket_error', nullable, required
    - `message` string, required
    - `key` string, required

## Other responses

- `401`: No key or token, or it expired or was revoked.
- `403`: The key or token lacks the scope (`insufficient_scope`), or the action is not allowed.
- `404`: No such question, endpoint or delivery on this account.
- `429`: Too many requests; wait for Retry-After.

---

[API](https://skmtc.dev/50heads/apis/50heads-api.md) · [All operations](https://skmtc.dev/50heads/apis/50heads-api/llms.txt) · [OpenAPI document](https://skmtc.dev/50heads/apis/50heads-api/revisions/edbfecb1e360?raw)
