---
title: "Shopify articleCreate: publish blog posts"
url: "https://blogautopost.com/blog/shopify-blog-article-graphql.md"
canonical_url: "https://blogautopost.com/blog/shopify-blog-article-graphql"
last_updated: "2026-10-19"
type: "guide"
summary: "How the Shopify articleCreate GraphQL mutation builds a blog article, which input fields are required, the error codes, and the token scope it needs."
related: ["https://blogautopost.com/blog.md", "https://blogautopost.com/blog/webflow-cms-items-field-map.md", "https://blogautopost.com/blog/wordpress-application-password-rest-api.md"]
---

# Shopify articleCreate: publish blog posts

> **For AI agents:** the complete index of BlogAutoPost pages is [llms.txt](https://blogautopost.com/llms.txt). Every page is also served as markdown at its URL plus .md.

How the Shopify articleCreate GraphQL mutation builds a blog article, which input fields are required, the error codes, and the token scope it needs.

## 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

| Field | Type | Notes from the reference |
| --- | --- | --- |
| `title` | String, required | The title of the article. |
| `author` | AuthorInput, required | The author, given either as a name or as a user ID. |
| `blogId` | ID | The blog that holds the article. |
| `body` | HTML | The article text, complete with HTML markup. |
| `handle` | String | A unique, human-friendly string used in the article URL. Generated from the title when you leave it out. |
| `summary` | HTML | Used by the online store theme to show the article on other pages, such as the main blog page. |
| `tags` | List of strings | Short descriptors attached to the article. |
| `isPublished` | Boolean | Whether the article should be visible. |
| `publishDate` | DateTime | When the article should become visible, in ISO 8601 format. |
| `image`, `metafields`, `templateSuffix` | Various | An 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

```graphql
mutation CreateArticle($article: ArticleCreateInput!) {
  articleCreate(article: $article) {
    article { id handle }
    userErrors { code field message }
  }
}
```

Variables for a valid request (sample values)

```json
{
  "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 request | Documented error codes |
| --- | --- |
| All required parts present | none |
| No blogId and no new blog | `BLOG_REFERENCE_REQUIRED` |
| Author name and user ID both sent | `AMBIGUOUS_AUTHOR` |
| Author left out | `AUTHOR_FIELD_REQUIRED` |
| Published flag on with a future date | `INVALID_PUBLISH_DATE` |
| Empty title | `BLANK` |

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](https://blogautopost.com/docs/connect-shopify.md) and the [Shopify integration page](https://blogautopost.com/integrations/shopify.md). After an article goes live, the [indexability checker](https://blogautopost.com/tools/indexability-checker.md) 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

- [articleCreate, GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleCreate), read 2026-10-19
- [ArticleCreateInput, GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ArticleCreateInput), read 2026-10-19
- [ArticleCreateUserErrorCode, GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql/latest/enums/ArticleCreateUserErrorCode), read 2026-10-19
- [Access scopes, Shopify API usage](https://shopify.dev/docs/api/usage/access-scopes), read 2026-10-19
- [Generate access tokens for admin-created custom apps](https://shopify.dev/docs/apps/build/authentication-authorization/access-token-types/generate-app-access-tokens-admin), read 2026-10-19
- [Access tokens, Shopify app authentication](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens), read 2026-10-19

## Related

- [The BlogAutoPost blog](https://blogautopost.com/blog.md)
- [Map posts to Webflow CMS collection fields](https://blogautopost.com/blog/webflow-cms-items-field-map.md)
- [Publish to WordPress through the REST API](https://blogautopost.com/blog/wordpress-application-password-rest-api.md)
