---
title: "Create Harbor"
method: POST
path: "/api/harbors"
tags: ["Harbors"]
---

# Create Harbor

`POST /api/harbors`

Creates a managed or customer-managed Harbor in the caller's current organization.

`generate_api_key` defaults to `true`. Polytomic returns a new plaintext credential only in this response. Set it to `false` to create the Harbor without a credential.

For `customer_managed`, `backing_connection_id` must identify a queryable Connection that your credential can access.

## Headers

- `X-Polytomic-Version` string

## Request body

- CreateHarborRequest
  - `backing_connection_id` string, uuid — Existing queryable Connection used by a customer-managed Harbor. Required only when backing_mode is customer_managed.
  - `backing_mode` string, required — How the Harbor's queryable data store is provided. Valid values are managed and customer_managed.
  - `description` string — Short description of the Harbor. Maximum 1,000 characters.
  - `generate_api_key` boolean, nullable — Whether to generate a profile credential. Defaults to true.
  - `name` string, required — Human-readable Harbor name.

## Response `200`

OK

- CreateHarborEnvelope
  - `data` CreateHarborResponse
    - `api_key` HarborAPIKeyCreatedResponse
      - `created_at` string, date-time — When the credential was created.
      - `id` string, uuid — Unique identifier of the credential.
      - `mode` string — Credential authorization mode.
      - `value` string — Plaintext credential. This value is returned only once.
    - `harbor` HarborResponse
      - `backing_connection_id` string, uuid — Connection that provides the Harbor's queryable data store.
      - `backing_mode` string — How the Harbor's queryable data store is provided.
      - `created_at` string, date-time — When the Harbor was created.
      - `description` string — Short description of the Harbor.
      - `id` string, uuid — Unique identifier of the Harbor.
      - `mcp_server_url` string — MCP server URL for the Harbor.
      - `name` string — Human-readable Harbor name.
      - `organization_id` string, uuid — Organization that owns the Harbor.
      - `updated_at` string, date-time — When the Harbor was last updated.

## Other responses

- `403` — Forbidden
- `409` — Conflict
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/polytomic/apis/polytomic-api.md) · [All operations](https://skmtc.net/polytomic/apis/polytomic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polytomic/polytomic-api/revisions/00c653316d35/schema)
