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

# Create an article

Creates a new help article. Articles must belong to at least one collection. The slug must be unique and URL-safe. Content can include HTML with images (as URLs or base64 data), which are automatically processed and uploaded to our CDN storage.
When published, the article generates a social banner, processes content images, updates search indexes, and optionally indexes into the AI vector store for chat functionality. SEO title defaults to the regular title if not provided.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json post /knowledge/articles
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /knowledge/articles:
    post:
      tags:
        - Knowledge Articles
      summary: Create an article
      description: >-
        Creates a new help article. Articles must belong to at least one
        collection. The slug must be unique and URL-safe. Content can include
        HTML with images (as URLs or base64 data), which are automatically
        processed and uploaded to our CDN storage.

        When published, the article generates a social banner, processes content
        images, updates search indexes, and optionally indexes into the AI
        vector store for chat functionality. SEO title defaults to the regular
        title if not provided.
      operationId: createArticle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 250
                  description: Display title of the article (required).
                  example: How to get started
                seo_title:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: >-
                    SEO-optimized title for search engines (optional, defaults
                    to title).
                slug:
                  type: string
                  maxLength: 250
                  pattern: ^[a-z0-9_-]+$
                  description: >-
                    URL-safe slug for the article (required, lowercase
                    alphanumeric with dashes/underscores).
                  example: how-to-get-started
                previous_url:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: >-
                    Previous URL if migrating from another help system
                    (optional).
                description:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: >-
                    Brief description of the article for SEO and previews
                    (optional).
                content:
                  type: string
                  maxLength: 16000000
                  nullable: true
                  description: >-
                    HTML content of the article (optional, max 10MB). Images can
                    be base64-encoded or URLs.
                template:
                  type: string
                  maxLength: 250
                  pattern: ^[a-z\-]+$
                  nullable: true
                  description: Template name to load predefined content (optional).
                visibility:
                  type: string
                  maxLength: 10
                  enum:
                    - public
                    - chat
                    - chat_auth
                  default: public
                  description: >-
                    Visibility setting - public (visible to all), chat (only in
                    chat widget), chat_auth (only in chat for authenticated
                    users).
                collections:
                  type: array
                  items:
                    type: integer
                    nullable: true
                  description: >-
                    Array of collection IDs where the article should be placed
                    (required, at least one, can include null for root).
                  example:
                    - 1
                    - 2
                published:
                  type: boolean
                  description: >-
                    Whether the article should be published immediately
                    (required).
              required:
                - title
                - slug
                - collections
                - published
      responses:
        '200':
          description: Article created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Article'
        '400':
          description: Invalid input or slug already in use.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    Article:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the article.
        title:
          type: string
          maxLength: 250
          description: Display title of the article.
          example: How to get started
        seo_title:
          type: string
          maxLength: 250
          description: SEO-optimized title for search engines and meta tags.
          example: Getting Started Guide - Complete Tutorial
        slug:
          type: string
          maxLength: 250
          pattern: ^[a-z0-9_-]+$
          description: URL-safe slug used in the article's URL path.
          example: how-to-get-started
        previous_url:
          type: string
          maxLength: 250
          nullable: true
          description: >-
            Previous URL if the article was migrated from another help system,
            used for redirect tracking.
        description:
          type: string
          maxLength: 250
          nullable: true
          description: Brief description used for SEO meta tags and article previews.
          example: >-
            Learn how to set up your account and start using our platform in
            minutes.
        content:
          type: string
          nullable: true
          description: >-
            Full HTML content of the article including formatted text, images,
            code blocks, and embedded media.
          example: >-
            <p>Welcome to our platform! This guide will help you get
            started...</p>
        created:
          type: string
          format: date-time
          description: Timestamp when the article was originally created.
        last_updated:
          type: string
          format: date-time
          description: Timestamp when the article was last modified.
        published:
          type: boolean
          description: >-
            Whether the article is published and visible to users (unpublished
            articles are drafts).
        get_collections:
          type: array
          items:
            type: object
            properties:
              collection_id:
                type: integer
                nullable: true
                description: >-
                  ID of the collection containing this article (null for root
                  level).
              sort:
                type: integer
                description: Sort position within the collection.
          description: >-
            List of collections this article belongs to with their sort
            positions.
          example:
            - collection_id: 1
              sort: 1
            - collection_id: 3
              sort: 2
        visibility:
          type: string
          maxLength: 10
          enum:
            - public
            - chat
            - chat_auth
          description: >-
            Visibility setting - public (visible to all), chat (only in chat
            widget), chat_auth (only in chat for authenticated users).
          example: public
        get_url:
          type: string
          description: >-
            Full computed URL path to access the article, including collection
            hierarchy.
          example: https://help.piedpiper.com/getting-started/introduction
      x-computed-hash: 3a5b7101545f0f84fa1766bc6cf87a28d4f3c86155db9553cd2be296e36ae71a
      x-last-modified: 1769075325
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````