Publish or unpublish an article

Publishes a draft or returns a published article to draft. Needs the `articles:publish` scope, which is granted separately from `articles:write`, so a key can create and edit drafts without being able to publish them. Returns the updated article.

POST
/articles/{slug}/status

Publishes a draft or returns a published article to draft. Needs the articles:publish scope, which is granted separately from articles:write, so a key can create and edit drafts without being able to publish them. Returns the updated article.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

ArticlesQ API key sent as Authorization: Bearer aq_live_.... Each key is scoped to a single project.

In: header

Path Parameters

slug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

import ArticlesQ from "@articlesq/sdk";const articlesq = new ArticlesQ({ apiKey: process.env.ARTICLESQ_API_KEY });// See SDK docs: https://articlesq.com/docs/sdk
{
  "article": {
    "id": "clx1abc234...",
    "slug": "best-crm-for-startups",
    "title": "Best CRM for Startups in 2026",
    "keyword": "best crm for startups",
    "metaDescription": "A practical guide to choosing the right CRM when you're under 50 employees.",
    "content": "# Introduction\n\nIf you're a startup founder...",
    "coverImage": "https://cdn.articlesq.com/images/proj_abc/best-crm-for-startups/cover.jpeg",
    "faq": [
      {
        "q": "What is the best CRM for early-stage startups?",
        "a": "For teams under 20 people, lightweight tools like HubSpot Free or Folk are usually a better fit than enterprise CRMs."
      }
    ],
    "status": "draft",
    "datePublished": "2026-05-23T00:00:00.000Z",
    "dateModified": "2026-06-01T00:00:00.000Z"
  }
}
{
  "error": {
    "title": "Unauthorized",
    "status": 401,
    "code": "missing_auth",
    "message": "Missing Authorization header",
    "instance": "/api/v1/articles",
    "details": {
      "property1": {},
      "property2": {}
    }
  }
}

{
  "error": {
    "title": "Unauthorized",
    "status": 401,
    "code": "missing_auth",
    "message": "Missing Authorization header",
    "instance": "/api/v1/articles"
  }
}

{
  "error": {
    "title": "Forbidden",
    "status": 403,
    "code": "insufficient_scope",
    "message": "Missing required scope: articles:publish",
    "instance": "/api/v1/articles/{slug}/status"
  }
}
{
  "error": {
    "title": "Not Found",
    "status": 404,
    "code": "not_found",
    "message": "Article not found",
    "instance": "/api/v1/articles/best-crm-for-startups/status"
  }
}