---
title: "CreateDocumentPayload"
url: "https://nov18-dev.movespot.fyi/apis/internal-documenthub-admin-api-v2-0/versions/de89c41a-3213-4ea1-ba03-774a702c2f4a/schemas/CreateDocumentPayload"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/internal-documenthub-admin-api-v2-0/versions/de89c41a-3213-4ea1-ba03-774a702c2f4a.md

# CreateDocumentPayload

a document payload

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Internal DocumentHub admin Api v2
  version: 0.0.2
servers:
  - url: http://documenthub.documenthub.svc.cluster.local:4400/v2
    description: Konnect cluster
components:
  schemas:
    Slug:
      description: document slug
      type: string
      example: path-for-seo
      maxLength: 512
      pattern: ^[\w\/-]+$
    PublishStatus:
      description: document publish status. Default to published.
      type: string
      enum:
        - published
        - unpublished
    Metadata:
      description: Contains key value pairs information about entity's metadata.
      type: object
      example:
        owner: John Appleseed
      additionalProperties: true
    CreateDocumentPayload:
      description: a document payload
      type: object
      properties:
        parent_document_id:
          description: parent document id
          type: string
          format: uuid
          example: dd4e1b98-3629-4dd3-acc0-759a726ffee2
        slug:
          $ref: "#/components/schemas/Slug"
        status:
          $ref: "#/components/schemas/PublishStatus"
        title:
          description: document title
          type: string
          example: How to create a document in Konnect DocumentHub
        raw_content:
          description: Must be a base64 encoded string. Either raw_content or
            str_mdr_content are required.
          type: string
          format: byte
          example: YmFzZTY0LWVuY29kZWQgdGV4dCBzdHJpbmc=
        str_md_content:
          description: Markdown content. Either raw_content or str_mdr_content are required.
          type: string
          example: "## My Markdown"
        metadata:
          $ref: "#/components/schemas/Metadata"
        filename:
          description: name of the uploaded file
          type: string
          example: my_doc.md
      required:
        - slug
        - title
        - filename
      title: CreateDocumentPayload
```
