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

# Create Harbor Context Draft

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

Creates an unpublished context document with its initial mutable draft.

Creates a stable context identity and its initial mutable draft without publishing
content to the Harbor. The response includes `context_id`, which identifies the
draft replacement, promotion, and discard routes.

The initial draft has a null `base_revision_id`. It remains absent from normal
context list/detail, GraphQL, entity lookup, and Harbor MCP reads until promoted.
Use the regular context creation endpoint instead when the initial payload should
be published immediately.

## Path parameters

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

## Headers

- `X-Polytomic-Version` string

## Request body

- CreateHarborContextDraftRequest
  - `change_note` string, nullable — Optional note stored with the draft and copied to published version 1 on promotion.
  - `content` string, required — Complete plain-text draft content. Maximum 20,000 characters.
  - `description` string — Short summary of the draft. Maximum 1,000 characters.
  - `title` string, required — Human-readable draft title. Maximum 200 characters.

## Response `200`

OK

- HarborContextDraftEnvelope
  - `data` HarborContextDraftResponse
    - `base_revision_id` string, uuid, nullable — Published revision on which this draft is based. Null for an unpublished context's initial draft.
    - `change_note` string, nullable — Optional note copied to the published version on promotion.
    - `content` string — Complete plain-text draft content.
    - `context_id` string, uuid — Stable context document identity. Use this ID for draft replacement, promotion, and discard.
    - `created_at` string, date-time — When the draft was created.
    - `created_by` string, uuid, nullable — Actor that created the draft. Null for the system actor.
    - `created_by_type` string — Type of actor that created the draft.
    - `description` string — Draft description.
    - `id` string, uuid — Unique identifier of the mutable draft.
    - `title` string — Draft title.
    - `updated_at` string, date-time — When the draft was most recently replaced.
    - `updated_by` string, uuid, nullable — Actor that most recently replaced the draft. Null for the system actor.
    - `updated_by_type` string — Type of actor that most recently replaced the draft.

## Other responses

- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

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