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

# Create article



## OpenAPI

````yaml /api-reference/ai-cms/openapi.json post /articles/create
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /articles/create:
    post:
      tags:
        - Articles
      summary: Create article
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - mainTitle
                - content
                - category
              properties:
                mainTitle:
                  type: object
                  description: Main title in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                title2:
                  type: object
                  description: Optional secondary title in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                title3:
                  type: object
                  description: Optional tertiary title in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                slug:
                  type: string
                  description: URL-friendly unique identifier
                summary:
                  type: object
                  description: Short summary in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                content:
                  type: object
                  description: Main article content (HTML allowed)
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                      description: HTML string
                    es:
                      type: string
                      description: HTML string
                thumbnail:
                  type: string
                  format: uri
                  description: Thumbnail image URL
                tags:
                  type: array
                  description: List of tags
                  items:
                    type: string
                category:
                  type: array
                  description: Array of category IDs
                  items:
                    type: string
                    pattern: ^[a-fA-F0-9]{24}$
                subCategory:
                  type: array
                  description: Array of sub-category IDs
                  items:
                    type: string
                    pattern: ^[a-fA-F0-9]{24}$
                author:
                  type: string
                  description: Author ID. Defaults to the authenticated user when omitted
                  pattern: ^[a-fA-F0-9]{24}$
                gallery:
                  type: array
                  description: Optional gallery image URLs
                  items:
                    type: string
                    format: uri
                publishDate:
                  type: string
                  format: date-time
                  description: Publish date in ISO 8601
                isPublished:
                  type: boolean
                  description: Publish state
                isPrivate:
                  type: boolean
                  description: If true, restricts visibility
                language:
                  type: string
                  description: Preferred language for immediate rendering/preview
                  enum:
                    - en
                    - es
                autoSummarize:
                  type: boolean
                  description: If true, backend may auto-create a summary
            examples:
              Create Article:
                value:
                  mainTitle:
                    en: Hello World
                    es: Hola Mundo
                  title2:
                    en: Subheadline
                    es: Subtítulo
                  title3:
                    en: Additional Section Title
                    es: Título de Sección Adicional
                  slug: hello-world
                  summary:
                    en: Short summary of the article for readers.
                    es: Breve resumen del artículo para los lectores.
                  content:
                    en: <p>This is the main HTML body of the article.</p>
                    es: <p>Este es el cuerpo principal en HTML del artículo.</p>
                  thumbnail: https://cdn.example.com/img.jpg
                  tags:
                    - news
                    - ai
                  category:
                    - 64b1f2c9a7d4f1a2b3c4d5e6
                  subCategory:
                    - 64b1f2c9a7d4f1a2b3c4d5e7
                  author: 64b1f2c9a7d4f1a2b3c4d5e8
                  language: en
                  gallery:
                    - https://cdn.example.com/g1.jpg
                    - https://cdn.example.com/g2.jpg
                  publishDate: '2025-10-01T12:00:00Z'
                  isPublished: true
                  isPrivate: false
                  autoSummarize: false
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                success: true
                statusCode: 201
                message: Created
                data:
                  id: '{{objectId}}'
                  slug: hello-world
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                success: false
                statusCode: 401
                message: Unauthorized
                data: null
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                success: false
                statusCode: 403
                message: Forbidden
                data: null
        '409':
          description: Conflict (slug exists)
          content:
            application/json:
              example:
                success: false
                statusCode: 409
                message: Slug already exists
                data: null
        '500':
          description: Server error
          content:
            application/json:
              example:
                success: false
                statusCode: 500
                message: Internal server error
                data: null
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````