Save Docs article draft
Save new text as the draft of a Docs article without changing the live article.
POST https://cotlet.dev/api/v1/help-scout/articles/{article_id}/docs-article-draft/save
write
Creates the draft of the article, or updates it if one exists, as the Docs editor autosave does. The published article does not change and no reader sees the draft. Pass the whole article text, as HTML. Returns whether the article has a draft. It reaches nobody and the draft is discarded in one click, so it does not ask for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| article_id string required | string | Article ID from search_docs_articles. |
| text string required | string | Full article text as HTML. |
Request
curl -X POST https://cotlet.dev/api/v1/help-scout/articles/6628f1a2b5d30/docs-article-draft/save \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"<p>Open <strong>Insights</strong> from the top menu, choose a date range and click <strong>Export</strong>.</p>"}' result = client.call("help-scout", "save_docs_article_draft", {"article_id":"6628f1a2b5d30","text":"<p>Open <strong>Insights</strong> from the top menu, choose a date range and click <strong>Export</strong>.</p>"}) const result = await cotlet.call('help-scout', 'save_docs_article_draft', {"article_id":"6628f1a2b5d30","text":"<p>Open <strong>Insights</strong> from the top menu, choose a date range and click <strong>Export</strong>.</p>"}); cotlet call help-scout save_docs_article_draft --data '{"article_id":"6628f1a2b5d30","text":"<p>Open <strong>Insights</strong> from the top menu, choose a date range and click <strong>Export</strong>.</p>"}' Example response
{
"article_id": "6628f1a2b5d30",
"has_draft": true,
"status": "published"
}