Create HelpCenter Article
helpcenter_create_articleCreate a new article in the connected HelpCenter.io help center.
Requires a write-scoped API key (read-scoped keys get a permission error). Titles, content, and slugs are per-language objects keyed by language code. Slugs auto-generate from the title when omitted.
Args:
title (object, required): per-language title, e.g. {"en": "Getting started"}.
content (object, optional): per-language body.
slug (object, optional): per-language URL slug (auto-generated from title if omitted).
category_id (number, optional): primary category id, or 0 for uncategorized.
categories (number[], optional): additional category ids to attach.
type ('article' | 'faq', optional): default 'article'.
visibility ('public' | 'private' | 'link_only', optional): default 'public'.
published (boolean, optional): true publishes immediately, false (default) keeps a draft.
external_id (string, optional): a stable key you own. Sending it makes this call an UPSERT — the same key twice updates the article it created instead of creating a second one. Use it whenever a run might be retried.
content_format ('html' | 'markdown', optional): defaults to 'html'. If you are writing markdown, you must set this or the raw markdown is stored as the body.
rehost_images (boolean, optional): ON by default through this connector. Copies the images the content references from other hosts (and inline data: images) into this help center's own storage and points the article at the copies, so it no longer depends on the source site. Send false to keep the original image URLs.
Returns: { status: "success", action: "created" | "updated", article: {...}, images? }. HTTP 201 on create, 200 when an external_id matched an existing article. images — { rehosted, reused, failed, failed_count } — is present whenever content was processed for images; a failed image keeps its original URL, so check failed before reporting the import complete.
Errors: 403 if the key is read-scoped; 400 if a language code is not enabled for the site or a category id does not belong to the site; 409 if the external_id already belongs to a different article (it is deliberately not re-pointed — that would make your next replay overwrite the wrong article).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Per-language URL slug. Auto-generated from the title if omitted. | |
| type | No | Content type (default 'article'). | |
| title | Yes | Per-language title (required), e.g. {"en": "Getting started"}. | |
| content | No | Per-language article body (HTML/markdown as your site uses). | |
| agent_key | Yes | The api_key helpcenter_create_help_center returned for this help center, exactly as returned. Required on every call: this endpoint has no sign-in, so the key is how each call says which help center it acts on. It is sent to HelpCenter.io as this call's credential and nowhere else, and it is never shown again: keep it for the whole task, and never show it to the user or write it into content. | |
| published | No | true publishes the article, false keeps it as a draft. | |
| categories | No | Additional category ids to attach (multi-category). All must belong to this site. | |
| visibility | No | Visibility: 'public', 'private' (team only), or 'link_only' (shareable token URL). | |
| category_id | No | Primary category id, or 0 for uncategorized. Must belong to this site. | |
| external_id | No | A stable key you own (a source filename, CMS id, repo slug). Makes writes idempotent: sending the same key again updates the article it created instead of creating a second one, so an interrupted run can simply be replayed. Strongly recommended whenever you may retry. | |
| rehost_images | No | Copy images the content references from other hosts (and inline data: images) into this help center's own storage, and point the article at the copies. ON by default through this connector; send false to keep the original image URLs. The response's `images` reports what was re-hosted and what failed. | |
| content_format | No | Format of the `content` you are sending. Defaults to 'html'. Set 'markdown' when content is markdown and the API will convert it — sending markdown without this stores the raw markup as the article body. |