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

Parameters: save_docs_article_draft
NameTypeDescription
article_id string required string Article ID from search_docs_articles.
text string required string Full article text as HTML.

Request

cURL
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>"}'
Python
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>"})
Node.js
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>"});
CLI
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

JSON

{
  "article_id": "6628f1a2b5d30",
  "has_draft": true,
  "status": "published"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.