Articles
Create an article
AuthorizationBearer <token>
In: header
help_center_idinteger
brand_idinteger
title?string
content?string
HTML content of the article, passed as a plain JSON string.
Supported tags: <p>, <h1>–<h6>, <ul>, <ol>, <li>, <a>, <strong>, <em>, <img>, <video>, <iframe> (YouTube), <table>, <code>, <blockquote>
Images: use src with an https:// URL or a data:image/...;base64,... string.
YouTube: embed iframes (youtube.com/embed/ID) are converted to native YouTube nodes.
Note: <script> tags and event attributes (onclick, onerror, etc.) are stripped for security.
publish?boolean
When true, publishes the article after creating the draft. Requires collection_id and is_public.
collection_id?integer
Required when publish is true.
is_public?boolean
Required when publish is true. true = publicly visible, false = private.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://app.sparrowdesk.com/v1/articles" \ -H "Content-Type: application/json" \ -d '{ "help_center_id": 994, "brand_id": 1 }'{
"id": 1001,
"status": "DRAFT"
}{
"error": {
"message": "Missing required scope or feature is not enabled"
}
}{
"error": {
"message": "Invalid request body"
}
}{
"error": {
"message": "An error occurred while creating the article"
}
}