The most up-to-date documentation for the Cloud Humans APIs is at docs.cloudhumans.com/api-reference. If this article and the reference differ, the reference prevails.
When to use
- You want to create a new article in the Cloud Chat Help Center via API
- You are automating content publishing from another source
- You need a quick reference for the creation endpoint
Prerequisites
-
API Key at hand — see How to find your API Key in Cloud Chat
-
ACCOUNT_IDandPORTAL_SLUG(portal slug, e.g.:cloud-chat) -
Registered
author_idandcategory_id
Endpoint
POST /api/v1/accounts/{id}/portals/{slug}/articles
Headers
| Header | Value |
|---|---|
content-type |
application/json |
api_access_token |
Your API token |
Required fields
| Field | Description |
|---|---|
title |
Article title |
content |
Content in Markdown |
status |
0 (draft) or 1 (published) — we recommend creating it as 0 and publishing it later with a PUT |
author_id |
Author ID |
category_id |
Category ID |
Example
curl --location 'https://cloudchat.cloudhumans.com/api/v1/accounts/{ACCOUNT_ID}/portals/{PORTAL_SLUG}/articles' \
--header 'Content-Type: application/json' \
--header 'api_access_token: SEU_TOKEN' \
--data '{
"title": "TĂtulo do artigo",
"content": "ConteĂşdo em Markdown...",
"status": 0,
"author_id": 1,
"category_id": 1
}'
After creating it as a draft (status=0), publish it by making a PUT with status=1 on the same article_id. See the full flow in How to create, update or delete articles in the Help Center via API.
Notes
-
For the full flow (create + publish + update + delete): How to create, update or delete articles in the Help Center via API
-
Overview of all available APIs: Master Guide — How to access and operate Cloud Chat data via API