---
title: "Create Harbor Context"
method: POST
path: "/api/harbors/{harbor_id}/contexts"
tags: ["Harbors"]
---

# Create Harbor Context

`POST /api/harbors/{harbor_id}/contexts`

Creates and attaches a context document to a Harbor.

The new document belongs only to this Harbor. Context documents cannot be attached to multiple Harbors.

## Path parameters

- `harbor_id` string, uuid, required — Unique identifier of the Harbor.

## Headers

- `X-Polytomic-Version` string

## Request body

- CreateHarborContextRequest
  - `content` string, required — Plain-text context content. Maximum 20,000 characters.
  - `description` string — Short summary of the context document. Maximum 1,000 characters.
  - `title` string, required — Human-readable context title. Maximum 200 characters.

## Response `200`

OK

- HarborContextEnvelope
  - `data` HarborContextResponse
    - `content` string — Complete plain-text context content.
    - `created_at` string, date-time — When the context document was created.
    - `description` string — Short summary of the context document.
    - `id` string, uuid — Unique identifier of the context document.
    - `title` string — Human-readable context title.
    - `updated_at` string, date-time — When the context document was last updated.

## Other responses

- `403` — Forbidden
- `404` — Not Found
- `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)
