---
title: "Create API Product Document"
method: POST
path: "/v2/api-products/{apiProductId}/documents"
tags: ["API Product Documentation"]
---

# Create API Product Document

`POST /v2/api-products/{apiProductId}/documents`

Creates a document for an API product.

## Request body

- CreateAPIProductDocumentDTO — a document payload
  - `parent_document_id` string, uuid, nullable — parent document id
  - `slug` string, required — document slug. must be unique accross documents belonging to an api product
  - `status` 'published' | 'unpublished', required
  - `title` string, required — document title
  - `content` string, nullable — Can be markdown string content or base64 encoded string
  - `metadata` object — metadata of the document

## Response `201`

API product document

- APIProductDocument — an api product document
  - `id` string, uuid, required
  - `parent_document_id` string, uuid, nullable, required
  - `title` string, required
  - `slug` string, required
  - `status` 'unpublished' | 'published', required
  - `metadata` object, required
  - `content` string, required — The unencoded markdown string of the api product document.
  - `created_at` string, date-time, required — An ISO-8601 timestamp representation of entity creation date.
  - `updated_at` string, date-time, required — An ISO-8601 timestamp representation of entity update date.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict - `slug` property must be unique
- `415` — Unsupported Media Type

## Changes

> 52 revisions in range; 2 could not be searched.

- **2025-10-29** `19e869275e28` — 1 warning
  - added the new `type` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2025-08-22** `96118a9cd7f4` — 6 breaking, 2 info
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterChoiceItem]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterDependentItem]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMaximumLength]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMinimumLength]/source` became nullable for the status `400`
  - …4 more
- **2025-02-10** `d833d4dbb1fa` — 1 warning
  - added the new `missing_reference` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- …earlier changes not shown

[Full history](https://skmtc.dev/kong/apis/konnect-api/changes/v2/api-products/:apiProductId/documents/post.md)

---

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