---
title: "Save or update existing articles. The article will be automatically used for chatbot training based on the AI Chatbot settings and the types of articles configured for training."
method: POST
path: "/kb/articles"
tags: ["Knowledge Base"]
---

# Save or update existing articles. The article will be automatically used for chatbot training based on the AI Chatbot settings and the types of articles configured for training.

`POST /kb/articles`

## Request

- Base URL: `https://api.charla.com/v1`
- URL: `https://api.charla.com/v1/kb/articles`
- Auth: API key in header `X-Api-Key`

## Request body

- KbArticlePublicApiResource
  - `id` integer
  - `title` string, nullable
  - `slug` string, nullable
  - `description` string, nullable
  - `article` string, nullable
  - `categories` KbCategoryPublicApiResource[], nullable
    - `id` integer: Category id, required when saving new articles.
    - `name` string, nullable: Name of the category
    - `parent` KbCategoryPublicApiResource (recursive)
  - `status` string, nullable: Status of the article, either Draft or Published
  - `visibility` string, nullable: Visibility of the article, either Private or Public
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable
  - `trained_at` string, date-time, nullable

## Response `200`

OK

- KbArticlePublicApiResource
  - `id` integer
  - `title` string, nullable
  - `slug` string, nullable
  - `description` string, nullable
  - `article` string, nullable
  - `categories` KbCategoryPublicApiResource[], nullable
    - `id` integer: Category id, required when saving new articles.
    - `name` string, nullable: Name of the category
    - `parent` KbCategoryPublicApiResource (recursive)
  - `status` string, nullable: Status of the article, either Draft or Published
  - `visibility` string, nullable: Visibility of the article, either Private or Public
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable
  - `trained_at` string, date-time, nullable

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/charla/apis/charla-public-api.md) · [All operations](https://skmtc.dev/charla/apis/charla-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charla/apis/charla-public-api/revisions/671d88242ad4?raw)
