Requires Any of write_content, write_online_store_pages access scopes.

Creates an article.


Anchor to article
article
required

The properties of the new article.

The properties of the new blog.


Was this section helpful?

Anchor to ArticleCreatePayload.article
article

The article that was created.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation articleCreate($article: ArticleCreateInput!) {
  articleCreate(article: $article) {
    article {
      # Article fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "article": {
    "author": {
      "name": "<your-name>",
      "userId": "gid://shopify/<objectName>/10079785100"
    },
    "blogId": "gid://shopify/<objectName>/10079785100",
    "body": "<p>Grey cotton knit sweater.</p>",
    "handle": "<your-handle>",
    "image": {
      "altText": "<your-altText>",
      "url": "<your-url>"
    },
    "isPublished": true,
    "metafields": [
      {
        "description": "<your-description>",
        "id": "gid://shopify/<objectName>/10079785100",
        "key": "<your-key>",
        "namespace": "<your-namespace>",
        "type": "<your-type>",
        "value": "<your-value>"
      }
    ],
    "publishDate": "2019-09-07T15:50:00Z",
    "summary": "<p>Grey cotton knit sweater.</p>",
    "tags": [
      "<your-tags>"
    ],
    "templateSuffix": "<your-templateSuffix>",
    "title": "<your-title>"
  },
  "blog": {
    "title": "<your-title>"
  }
}
input ArticleCreateInput {
  author: AuthorInput!
  blogId: ID
  body: HTML
  handle: String
  image: ArticleImageInput
  isPublished: Boolean
  metafields: [MetafieldInput!]
  publishDate: DateTime
  summary: HTML
  tags: [String!]
  templateSuffix: String
  title: String!
}

input AuthorInput {
  name: String
  userId: ID
}

input ArticleImageInput {
  altText: String
  url: String
}

input MetafieldInput {
  description: String
  id: ID
  key: String
  namespace: String
  type: String
  value: String
}

input ArticleBlogInput {
  title: String!
}