> ## Documentation Index
> Fetch the complete documentation index at: https://productlane.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create docs draft

> Propose an article change for review. `kind: edit` edits an existing article, `kind: create` proposes a new article, `kind: delete` proposes removal.



## OpenAPI

````yaml post /docs/drafts
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /docs/drafts:
    post:
      tags:
        - docs
      summary: Create docs draft
      description: >-
        Propose an article change for review. `kind: edit` edits an existing
        article, `kind: create` proposes a new article, `kind: delete` proposes
        removal.
      operationId: docs-createDraft
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - edit
                    - create
                    - delete
                  description: >-
                    `edit` proposes changes to an existing article (requires
                    `article_id` + `content`). `create` proposes a new article
                    (requires `title` + `content`). `delete` proposes removing
                    an existing article (requires `article_id`).
                article_id:
                  type: string
                  description: 'Required for `kind: edit` and `kind: delete`.'
                title:
                  type: string
                  minLength: 1
                  description: >-
                    Required for `kind: create`. Optional for `kind: edit` (sets
                    a new title; omit to keep the current one). Ignored for
                    `kind: delete`.
                content:
                  type: string
                  minLength: 1
                  description: >-
                    Markdown body of the proposed article. Required for `kind:
                    edit` and `kind: create`. Ignored for `kind: delete`.
                group_id:
                  type: string
                  description: >-
                    `kind: create` only. Target group for the new article. The
                    group's portal determines which portal the article belongs
                    to once accepted.
                submit_for_review:
                  type: boolean
                  description: >-
                    `true` (default) creates an OPEN draft visible to reviewers.
                    `false` keeps it as a private DRAFT.
              required:
                - kind
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  kind:
                    type: string
                    enum:
                      - edit
                      - create
                      - delete
                  status:
                    type: string
                    enum:
                      - draft
                      - open
                      - accepted
                      - rejected
                      - superseded
                  article_id:
                    type: string
                    nullable: true
                  group_id:
                    type: string
                    nullable: true
                  portal_instance_id:
                    type: string
                    nullable: true
                  content:
                    type: string
                  title:
                    type: string
                    nullable: true
                  created_by_user_id:
                    type: string
                    nullable: true
                  closed_at:
                    type: string
                    nullable: true
                required:
                  - id
                  - created_at
                  - updated_at
                  - kind
                  - status
                  - article_id
                  - group_id
                  - portal_instance_id
                  - content
                  - title
                  - created_by_user_id
                  - closed_at
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````