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

# Create article

> Create a new draft article. Slug is generated from title with collision retry.



## OpenAPI

````yaml /api-reference/openapi.json post /api/content/articles
openapi: 3.1.0
info:
  title: Tedro API
  version: 1.0.0
  description: REST API for the Tedro communication operations platform.
servers:
  - url: https://api.tedro.io
    description: Production
security:
  - sessionCookie: []
    workspaceId: []
paths:
  /api/content/articles:
    post:
      tags:
        - Content
      summary: Create article
      description: >-
        Create a new draft article. Slug is generated from title with collision
        retry.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateArticleBody'
      responses:
        '201':
          description: Article created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticleResponse'
        '400':
          description: Bad Request - invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - missing or invalid session cookie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - insufficient role (admin required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - sessionCookie: []
          workspaceId: []
components:
  schemas:
    CreateArticleBody:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 200
        body:
          type: string
        description:
          type: string
          maxLength: 500
        visibility:
          type: string
          enum:
            - public
            - internal
        collectionIds:
          type: array
          items:
            type: string
            format: uuid
      required:
        - title
      additionalProperties: false
      description: Create a knowledge base article. Slug is generated from title.
      example:
        title: Shipping policy
        body: |-
          # Policy
          ...
        visibility: internal
    ArticleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - article
        title:
          type: string
        slug:
          type: string
        body:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        visibility:
          type: string
          enum:
            - public
            - internal
        status:
          type: string
          enum:
            - draft
            - published
        workspaceId:
          type: string
          format: uuid
        publishedAt:
          type:
            - string
            - 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - type
        - title
        - slug
        - body
        - description
        - visibility
        - status
        - workspaceId
        - createdAt
        - updatedAt
      additionalProperties: {}
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
      required:
        - error
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Session cookie set by Better Auth on sign-in.
    workspaceId:
      type: apiKey
      in: header
      name: x-workspace-id
      description: Workspace UUID. Required on all /api/* endpoints.

````