Start for $1
  • $1 for a 7-day trial. When the 7 days end, your card is charged from $95 a month for one site, and the plan renews every month until you cancel.
  • Cancel any time with our ready-made cancel email. No reason needed.
  • Your first paid month can be refunded within 7 days of paying it. Write to hello@blogautopost.com.

Shopify articleCreate: publish blog posts

CMS publishingPublished 2026-10-19

One mutation creates a blog article in Shopify. Here is what goes into it, how it fails, and what the access token behind it has to be allowed to do.

Last updated

What articleCreate does

Shopify's GraphQL Admin API creates a blog article with the articleCreate mutation. Its reference describes an article as a content piece with a title, body text and author information. You can publish it at once or schedule it with a publish date, choose its URL handle, apply a custom template, and add tags, an image and metafields. The mutation checks the content and makes sure the article is tied to a blog.

It takes two arguments. article is required and holds the article itself. blog is optional and holds the properties of a new blog, for the case where the article should create its own blog. Most integrations skip that second argument and point at an existing blog by ID.

The input that matters

FieldTypeNotes from the reference
titleString, requiredThe title of the article.
authorAuthorInput, requiredThe author, given either as a name or as a user ID.
blogIdIDThe blog that holds the article.
bodyHTMLThe article text, complete with HTML markup.
handleStringA unique, human-friendly string used in the article URL. Generated from the title when you leave it out.
summaryHTMLUsed by the online store theme to show the article on other pages, such as the main blog page.
tagsList of stringsShort descriptors attached to the article.
isPublishedBooleanWhether the article should be visible.
publishDateDateTimeWhen the article should become visible, in ISO 8601 format.
image, metafields, templateSuffixVariousAn article image, extra metafield values, and a template suffix. An empty suffix means the default article template.
The mutation, asking only for what a publisher stores
mutation CreateArticle($article: ArticleCreateInput!) {
  articleCreate(article: $article) {
    article { id handle }
    userErrors { code field message }
  }
}
Variables for a valid request (sample values)
{
  "article": {
    "blogId": "gid://shopify/Blog/389767568",
    "title": "Choosing a pour-over grinder",
    "author": {
      "name": "Studio team"
    },
    "handle": "choosing-a-pour-over-grinder",
    "body": "<p>Burr size matters more than price.</p>",
    "isPublished": true,
    "publishDate": "2026-10-19T09:00:00Z"
  }
}

How it fails

Failures that come from your input arrive in userErrors, each with a code, a field and a message. The reference lists the possible codes, among them BLOG_REFERENCE_REQUIRED, AMBIGUOUS_AUTHOR, AUTHOR_FIELD_REQUIRED, INVALID_PUBLISH_DATE, BLANK, TAKEN, TOO_LONG and UPLOAD_FAILED. The table runs six sample requests through the rules the reference states and shows the code each one would earn.

Sample requestDocumented error codes
All required parts presentnone
No blogId and no new blogBLOG_REFERENCE_REQUIRED
Author name and user ID both sentAMBIGUOUS_AUTHOR
Author left outAUTHOR_FIELD_REQUIRED
Published flag on with a future dateINVALID_PUBLISH_DATE
Empty titleBLANK

The TAKEN code means an input value is already taken. Since a handle is meant to be unique, a handle that another article already uses is the likely cause.

Which scope the token needs

The reference says articleCreate requires any of the write_content or write_online_store_pages access scopes. The scopes page describes write_online_store_pages as covering article, blog, comment and page mutations and as accepted in place of write_content. In the admin's permission list, the content scope is described as viewing or managing articles, blogs, comments, pages and redirects. Reading blogs back, for example to find a blog ID, needs read_content or read_online_store_pages.

Custom app tokens today

Requests go to your store's GraphQL endpoint with the token in the X-Shopify-Access-Token header. Shopify's documentation on admin-created custom apps now carries a caution: you can no longer create new apps of that kind, while existing ones keep working. New apps use the Dev Dashboard or the Shopify CLI. For an existing custom app, three facts from that page are worth planning around.

  • The token is shown only once, when it is generated, so store it in a secret manager at that moment.
  • You cannot rotate the key or secret. A new token comes from uninstalling and reinstalling the app, and requests fail until your code holds the new one.
  • Do not delete the app itself: Shopify says a deleted app cannot be replaced by a new admin-created custom app.

Shopify's page on access tokens adds that offline tokens, the default kind, are opaque strings beginning with shpat_, and that a token carries only the scopes it was granted.

For the steps on the BlogAutoPost side, see the Shopify connection guide and the Shopify integration page. After an article goes live, the indexability checker shows whether its URL can be crawled.

Frequently asked questions

Can articleCreate make the blog too?

Yes, through the optional blog argument. But the error list includes AMBIGUOUS_BLOG, which means you cannot create a blog from input and also supply a blog ID, so use one or the other.

Can I mark an article published and give it a future date?

No. The reference lists INVALID_PUBLISH_DATE for exactly that: setting isPublished to true while also setting a future publish date. Leave the flag off and set the date for a scheduled article.

Which API version do the examples use?

The pages we read show the 2026-10 version as the latest. Shopify versions its Admin API, so check the version in the endpoint path before you copy a request.

Does the author have to be a staff member?

No. The author can be given as a plain name. Shopify also accepts a user ID instead, but not both, and one of the two must be present.

Sources

Put BlogAutoPost on your blog

Start a 7-day trial, connect your WordPress, Shopify or Webflow blog and approve the first draft yourself.

  • $1 for a 7-day trial. When the 7 days end, your card is charged from $95 a month for one site, and the plan renews every month until you cancel.
  • Cancel any time with our ready-made cancel email. No reason needed.
  • Your first paid month can be refunded within 7 days of paying it. Write to hello@blogautopost.com.