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.

In addition to an online storefront, Shopify shops come with a built-in blogging engine, allowing a shop to have one or more blogs.

Shop owners are encouraged to use blogs to:

  • Make announcements
  • Talk about their products in more detail
  • Show off their expertise
  • Connect with their customers and
  • Boost their shop's search engine rankings

Shopify blogs are like most other blogs: a content management system for articles posted in reverse chronological order. Articles can be posted under one or more user-defined categories and tagged with one or more user-defined tags, with an option to allow readers to post comments to articles. An Atom feed is automatically generated for each blog, allowing for syndication. The search functionality built into every shop also searches the text in blog articles.

Blogs are meant to be used as a type of magazine or newsletter for the shop, with content that changes over time. If your shop needs a static page (such as an "About Us" page), we recommend that you use a Page instead.

Also see the Article resource for managing blog articles.

Was this section helpful?

Properties

commentable

Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are:


created_at
read-only
The date and time when the blog was created. The API returns this value in ISO 8601 format.

feedburner
FeedBurner is a web feed management provider and can be enabled to provide custom RSS feeds for Shopify bloggers. Google has stopped supporting FeedBurner, and new or existing blogs that are not already integrated with FeedBurner can't use the service. This property will default to blank unless FeedBurner is enabled.

feedburner_location
The URL that points to the FeedBurner location for blogs that have FeedBurner enabled. Google has stopped supporting FeedBurner, and new or existing blogs that are not already integrated with FeedBurner can't use the service. This property will default to blank unless FeedBurner is enabled

handle
A human-friendly unique string that is automatically generated from the title if no handle is sent during the creation of a blog. Duplicate handles are appended with an incremental number, for example, `blog-2`. The handle is customizable and is used by the Liquid templating language to refer to the blog. If you change the handle of a blog, then it can negatively affect the SEO of the shop. We recommend that you create a URL redirect to avoid any SEO issues.

id
read-only
->id
A unique numeric identifier for the blog.

metafields
array
write-only

Attaches additional metadata to a store's resources:


tags
read-only
A list of tags associated with the 200 most recent blog articles. Tags are additional short descriptors formatted as a string of comma-separated values. For example, if an article has three tags: tag1, tag2, tag3. Tags are limited to 255 characters.

template_suffix
States the name of the template a blog is using if it is using an alternate template. If a blog is using the default blog.liquid template, the value returned is "null".

title
The title of the blog.

updated_at
read-only
The date and time when changes were last made to the blog's properties. Note that this is not updated when creating, modifying or deleting articles in the blog. The API returns this value in ISO 8601 format.

admin_graphql_api_id
read-only
->id
The GraphQL GID of the blog.

Was this section helpful?
{}The Blog resource
{
  "commentable": "no",
  "created_at": "2012-03-13T16:09:54-04:00",
  "feedburner": null,
  "feedburner_location": null,
  "handle": "apple-blog",
  "id": 241253187,
  "tags": "tagged",
  "template_suffix": null,
  "title": "My Blog",
  "updated_at": "2021-12-01T14:52:12-04:00",
  "admin_graphql_api_id": "gid://shopify/OnlineStoreBlog/241253187"
}

Create a new blog

api_version
string
required

title
required
The title of the blog. Maximum length: 255 characters.

Was this section helpful?
Request body
blog
Blog resource
Was this section helpful?
post
/admin/api/2024-10/blogs.json
Copy
curl -d '{"blog":{"title":"Apple main blog"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/blogs.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "blog": {
    "id": 1008414251,
    "handle": "apple-main-blog",
    "title": "Apple main blog",
    "updated_at": "2024-09-30T11:15:40-04:00",
    "commentable": "no",
    "feedburner": null,
    "feedburner_location": null,
    "created_at": "2024-09-30T11:15:40-04:00",
    "template_suffix": null,
    "tags": "",
    "admin_graphql_api_id": "gid://shopify/Blog/1008414251"
  }
}

Retrieve a list of all blogs. 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

fields
comma-separated list of fields to include in the response

handle
Filter by blog handle

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

since_id
Restrict results to after the specified ID

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/blogs.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "blogs": [
    {
      "id": 382285388,
      "handle": "banana-blog",
      "title": "A Gnu Blog",
      "updated_at": "2006-02-02T19:00:00-05:00",
      "commentable": "no",
      "feedburner": null,
      "feedburner_location": null,
      "created_at": "2024-09-30T11:13:29-04:00",
      "template_suffix": null,
      "tags": "",
      "admin_graphql_api_id": "gid://shopify/Blog/382285388"
    },
    {
      "id": 241253187,
      "handle": "apple-blog",
      "title": "Mah Blog",
      "updated_at": "2006-02-01T19:00:00-05:00",
      "commentable": "no",
      "feedburner": null,
      "feedburner_location": null,
      "created_at": "2024-09-30T11:13:29-04:00",
      "template_suffix": null,
      "tags": "Announcing, Mystery",
      "admin_graphql_api_id": "gid://shopify/Blog/241253187"
    }
  ]
}

Get a single blog by its ID

api_version
string
required

blog_id
string
required

fields
comma-separated list of fields to include in the response

Was this section helpful?
Path parameters
blogid=241253187
string
required
Was this section helpful?
get
/admin/api/2024-10/blogs/241253187.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "blog": {
    "id": 241253187,
    "handle": "apple-blog",
    "title": "Mah Blog",
    "updated_at": "2006-02-01T19:00:00-05:00",
    "commentable": "no",
    "feedburner": null,
    "feedburner_location": null,
    "created_at": "2024-09-30T11:13:29-04:00",
    "template_suffix": null,
    "tags": "Announcing, Mystery",
    "admin_graphql_api_id": "gid://shopify/Blog/241253187"
  }
}

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

Update a blog

api_version
string
required

blog_id
string
required

Was this section helpful?
Path parameters
blogid=241253187
string
required
Request body
blog
Blog resource
Was this section helpful?
put
/admin/api/2024-10/blogs/241253187.json
Copy
curl -d '{"blog":{"id":241253187,"metafields":[{"key":"sponsor","value":"Shopify","type":"single_line_text_field","namespace":"global"}]}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2024-10/blogs/241253187.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "blog": {
    "title": "Mah Blog",
    "handle": "apple-blog",
    "id": 241253187,
    "updated_at": "2006-02-01T19:00:00-05:00",
    "commentable": "no",
    "feedburner": null,
    "feedburner_location": null,
    "created_at": "2024-09-30T11:13:29-04:00",
    "template_suffix": null,
    "tags": "Announcing, Mystery",
    "admin_graphql_api_id": "gid://shopify/Blog/241253187"
  }
}

Delete a blog

api_version
string
required

blog_id
string
required

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