API Product Documentation

Create API Product Document

Changed on

Creates a document for an API product.

post/v2/api-products/{apiProductId}/documents

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

apiProductId, string uuid required
Example:d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

Request body

CreateAPIProductDocumentDTO required

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

Example request

{
  "parent_document_id": "dd4e1b98-3629-4dd3-acc0-759a726ffee2",
  "slug": "path-for-seo",
  "title": "How to create a document in Konnect DocumentHub",
  "content": "## My Markdown",
  "metadata": {
    "author": "John Doe"
  }
}

Response

API product document

APIProductDocument required

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.

Example response

{
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Changes

    • breaking

      added to the invalid_parameters/items response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status

    • warning

      added the new unique enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status