> ## 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.

# Update an article

Updates article properties. Publishing an article generates a social banner and processes content. Collection assignments can be modified - new collections are added, removed collections trigger sort order updates. If the article URL changes (slug or collections), internal references are updated. Changes to content or slug update the AI data store if enabled.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json patch /knowledge/articles/{id}
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/{id}:
    patch:
      tags:
        - Knowledge Articles
      summary: Update an article
      description: >-
        Updates article properties. Publishing an article generates a social
        banner and processes content. Collection assignments can be modified -
        new collections are added, removed collections trigger sort order
        updates. If the article URL changes (slug or collections), internal
        references are updated. Changes to content or slug update the AI data
        store if enabled.
      operationId: updateArticle
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the article to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 250
                  description: Display title of the article (optional).
                seo_title:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: SEO-optimized title (optional).
                slug:
                  type: string
                  maxLength: 250
                  pattern: ^[a-z0-9_-]+$
                  description: URL-safe slug (optional, must be unique).
                previous_url:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: Previous URL for migration tracking (optional).
                description:
                  type: string
                  maxLength: 250
                  nullable: true
                  description: Brief description for SEO (optional).
                content:
                  type: string
                  maxLength: 16000000
                  nullable: true
                  description: HTML content with images (optional).
                collections:
                  type: array
                  items:
                    type: integer
                    nullable: true
                  nullable: true
                  description: >-
                    Array of collection IDs (optional, at least one if
                    provided).
                published:
                  type: boolean
                  description: Publication status (optional).
                visibility:
                  type: string
                  maxLength: 10
                  enum:
                    - public
                    - chat
                    - chat_auth
                  nullable: true
                  description: Visibility setting (optional).
      responses:
        '200':
          description: Article updated 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
        '404':
          description: Article not found.
          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

````