The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Requires content access scope.

The Article resource allows your app to create, publish, and edit articles on a shop's blog. Articles belong to a single blog, and can have any number of comments.

Was this section helpful?

Properties

author
The name of the author of the article.

blog_id
The ID of the blog containing the article.

body_html
The text of the body of the article, complete with HTML markup.

created_at
read-only
The date and time (ISO 8601 format) when the article was created.

id
read-only
->id
The ID of the article.

handle
A human-friendly unique string for the article that's automatically generated from the article's title. The handle is used in the article's URL.

image

An image associated with the article. It can have the following properties:


metafields
array
The additional information attached to an Article object. It has the following properties:

published
Whether the article is visible.

published_at
The date and time (ISO 8601 format) when the article was published.

summary_html
A summary of the article, which can include HTML markup. The summary is used by the online store theme to display the article on other pages, such as the home page or the main blog page.

tags
A comma-separated list of tags. Tags are additional short descriptors formatted as a string of comma-separated values.

Was this section helpful?
{}The Article resource
{
  "author": "John",
  "blog_id": 241253187,
  "body_html": "<p>Welcome to my new blog!</p>",
  "created_at": "2008-12-31T19:00:00-05:00",
  "id": 989034056,
  "handle": "hello-world",
  "image": {
    "src": "https://cdn.shopify.com/s/files/1/0000/0001/articles/Red_Cotton.jpg?v=1443721435",
    "created_at": "2008-12-31T19:00:00-05:00"
  },
  "metafields": {
    "key": "new",
    "value": "new value",
    "type": "single_line_text_field",
    "namespace": "global"
  },
  "published": false,
  "published_at": "2008-07-31T20:00:00-04:00",
  "summary_html": "<p>My first blog post!</p>",
  "tags": "tagsational",
  "template_suffix": null,
  "title": "Hello world!",
  "updated_at": "2009-01-31T19:00:00-05:00",
  "user_id": 799407056
}

Was this section helpful?
Path parameters
blogid=241253187
string
required
Request body
article
Article resource
Was this section helpful?
post
/admin/api/2024-10/blogs/241253187/articles.json
Copy
curl -d '{"article":{"title":"My new Article title","author":"John Smith","tags":"This Post, Has Been Tagged","body_html":"<h1>I like articles</h1>\n<p><strong>Yea</strong>, I like posting them through <span class=\"caps\">REST</span>.</p>","published_at":"Thu Mar 24 15:45:47 UTC 2011"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "article": {
    "id": 1051293786,
    "title": "My new Article title",
    "created_at": "2024-09-30T11:14:27-04:00",
    "body_html": "<h1>I like articles</h1>\n<p><strong>Yea</strong>, I like posting them through <span class=\"caps\">REST</span>.</p>",
    "blog_id": 241253187,
    "author": "John Smith",
    "user_id": 548380009,
    "published_at": "2011-03-24T11:45:47-04:00",
    "updated_at": "2024-09-30T11:14:27-04:00",
    "summary_html": null,
    "template_suffix": null,
    "handle": "my-new-article-title",
    "tags": "Has Been Tagged, This Post",
    "admin_graphql_api_id": "gid://shopify/Article/1051293786"
  }
}

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/articles/authors.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/articles/authors.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "authors": [
    "dennis",
    "John",
    "Rob",
    "Dennis"
  ]
}


api_version
string
required

limit
The maximum number of tags to retrieve.

popular
A flag for ordering retrieved tags. If present in the request, then the results will be ordered by popularity, starting with the most popular tag.

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/articles/tags.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/articles/tags.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "tags": [
    "Announcing",
    "Mystery"
  ]
}

Retrieves a list of all articles from a blog. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.

api_version
string
required

blog_id
string
required

author
Filter articles by article author.

created_at_max
Show articles created before date (format: 2014-04-25T16:15:47-04:00).

created_at_min
Show articles created after date (format: 2014-04-25T16:15:47-04:00).

fields
Show only certain fields, specified by a comma-separated list of field names.

handle
Retrieve an article with a specific handle.

limit
≤ 250
default 50
The maximum number of results to retrieve.

published_at_max
Show articles published before date (format: 2014-04-25T16:15:47-04:00).

published_at_min
Show articles published after date (format: 2014-04-25T16:15:47-04:00).

published_status
default any
Retrieve results based on their published status.

since_id
Restrict results to after the specified ID.

Was this section helpful?
Path parameters
blogid=241253187
string
required
Was this section helpful?
get
/admin/api/2024-10/blogs/241253187/articles.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "articles": [
    {
      "id": 1051293780,
      "title": "Welcome to the world of tomorrow!",
      "created_at": "2013-11-06T19:00:00-05:00",
      "body_html": "Good news, everybody!",
      "blog_id": 241253187,
      "author": "dennis",
      "user_id": null,
      "published_at": null,
      "updated_at": "2024-09-30T11:13:29-04:00",
      "summary_html": null,
      "template_suffix": null,
      "handle": "welcome-to-the-world-of-tomorrow",
      "tags": "",
      "admin_graphql_api_id": "gid://shopify/Article/1051293780"
    },
    {
      "id": 989034056,
      "title": "Some crazy article I'm coming up with",
      "created_at": "2008-12-31T19:00:00-05:00",
      "body_html": "I have no idea what to write about, but it's going to rock!",
      "blog_id": 241253187,
      "author": "John",
      "user_id": null,
      "published_at": null,
      "updated_at": "2009-01-31T19:00:00-05:00",
      "summary_html": null,
      "template_suffix": null,
      "handle": "some-crazy-article-im-coming-up-with",
      "tags": "Mystery",
      "admin_graphql_api_id": "gid://shopify/Article/989034056"
    },
    {
      "id": 294160202,
      "title": "Just us bots here",
      "created_at": "2013-11-06T19:00:00-05:00",
      "body_html": "beep boop",
      "blog_id": 241253187,
      "author": "dennis",
      "user_id": null,
      "published_at": null,
      "updated_at": "2024-09-30T11:13:29-04:00",
      "summary_html": null,
      "template_suffix": null,
      "handle": "just-us-bots-here",
      "tags": "",
      "admin_graphql_api_id": "gid://shopify/Article/294160202"
    },
    {
      "id": 134645308,
      "title": "get on the train now",
      "created_at": "2008-07-31T20:00:00-04:00",
      "body_html": "<p>Do <em>you</em> have an <strong>IPod</strong> yet?</p>",
      "blog_id": 241253187,
      "author": "Dennis",
      "user_id": 548380009,
      "published_at": "2008-07-31T20:00:00-04:00",
      "updated_at": "2008-07-31T20:00:00-04:00",
      "summary_html": null,
      "template_suffix": null,
      "handle": "get-on-the-train-now",
      "tags": "Announcing",
      "admin_graphql_api_id": "gid://shopify/Article/134645308",
      "image": {
        "created_at": "2024-09-30T11:13:29-04:00",
        "alt": "iMac",
        "width": 123,
        "height": 456,
        "src": "https://cdn.shopify.com/s/files/1/0005/4838/0009/articles/imac.jpg?v=1727709209"
      }
    }
  ]
}

Retrieves a single article

api_version
string
required

article_id
string
required

blog_id
string
required

fields
Show only certain fields, specifed by a comma-separated list of field names.

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/blogs/241253187/articles/134645308.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles/134645308.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "article": {
    "id": 134645308,
    "title": "get on the train now",
    "created_at": "2008-07-31T20:00:00-04:00",
    "body_html": "<p>Do <em>you</em> have an <strong>IPod</strong> yet?</p>",
    "blog_id": 241253187,
    "author": "Dennis",
    "user_id": 548380009,
    "published_at": "2008-07-31T20:00:00-04:00",
    "updated_at": "2008-07-31T20:00:00-04:00",
    "summary_html": null,
    "template_suffix": null,
    "handle": "get-on-the-train-now",
    "tags": "Announcing",
    "admin_graphql_api_id": "gid://shopify/Article/134645308",
    "image": {
      "created_at": "2024-09-30T11:13:29-04:00",
      "alt": "iMac",
      "width": 123,
      "height": 456,
      "src": "https://cdn.shopify.com/s/files/1/0005/4838/0009/articles/imac.jpg?v=1727709209"
    }
  }
}


api_version
string
required

blog_id
string
required

created_at_max
Count articles created before date (format: 2014-04-25T16:15:47-04:00).

created_at_min
Count articles created after date (format: 2014-04-25T16:15:47-04:00).

published_at_max
Count articles published before date (format: 2014-04-25T16:15:47-04:00).

published_at_min
Count articles published after date (format: 2014-04-25T16:15:47-04:00).

published_status
default any
Count articles with a given published status.

updated_at_max
Count articles last updated before date (format: 2014-04-25T16:15:47-04:00).

updated_at_min
Count articles last updated after date (format: 2014-04-25T16:15:47-04:00).

Was this section helpful?
Path parameters
blogid=241253187
string
required
Was this section helpful?
get
/admin/api/2024-10/blogs/241253187/articles/count.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles/count.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "count": 4
}


api_version
string
required

blog_id
string
required

limit
The maximum number of tags to retrieve.

popular
A flag for ordering retrieved tags. If present in the request, then the results will be ordered by popularity, starting with the most popular tag.

Was this section helpful?
Path parameters
blogid=241253187
string
required
Was this section helpful?
get
/admin/api/2024-10/blogs/241253187/articles/tags.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles/tags.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "tags": [
    "Announcing",
    "Mystery"
  ]
}


api_version
string
required

article_id
string
required

blog_id
string
required

Was this section helpful?
Request body
article
Article resource
Was this section helpful?
put
/admin/api/2024-10/blogs/241253187/articles/134645308.json
Copy
curl -d '{"article":{"id":134645308,"metafields":[{"key":"new","value":"newvalue","type":"single_line_text_field","namespace":"global"}]}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles/134645308.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "article": {
    "blog_id": 241253187,
    "title": "get on the train now",
    "handle": "get-on-the-train-now",
    "body_html": "<p>Do <em>you</em> have an <strong>IPod</strong> yet?</p>",
    "author": "Dennis",
    "id": 134645308,
    "created_at": "2008-07-31T20:00:00-04:00",
    "user_id": 548380009,
    "published_at": "2008-07-31T20:00:00-04:00",
    "updated_at": "2008-07-31T20:00:00-04:00",
    "summary_html": null,
    "template_suffix": null,
    "tags": "Announcing",
    "admin_graphql_api_id": "gid://shopify/Article/134645308",
    "image": {
      "created_at": "2024-09-30T11:13:29-04:00",
      "alt": "iMac",
      "width": 123,
      "height": 456,
      "src": "https://cdn.shopify.com/s/files/1/0005/4838/0009/articles/imac.jpg?v=1727709209"
    }
  }
}


api_version
string
required

article_id
string
required

blog_id
string
required

Was this section helpful?
Was this section helpful?
del
/admin/api/2024-10/blogs/241253187/articles/134645308.json
Copy
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187/articles/134645308.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{}