--- title: Blog description: Create, edit, and delete a store's blogs. Each store can have multiple blogs, and each blog can have many articles (blog posts). Use the Article API to manage each blog's articles. api_version: 2025-10 api_name: admin-rest api_type: rest source_url: html: https://shopify.dev/docs/api/admin-rest/latest/resources/blog md: https://shopify.dev/docs/api/admin-rest/latest/resources/blog.md --- ![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg) The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql). For details and migration steps, visit our [migration guide](https://shopify.dev/docs/apps/build/graphql/migrate). # Blog 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. ![](https://shopify.dev/assets/api/reference/blog.png) 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](https://shopify.dev/docs/admin-api/rest/reference/online-store/article) for managing blog articles. \# ## Endpoints * [post](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#post-blogs) [/admin/api/latest/blogs.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#post-blogs) Create a new Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogCreate?example=create-a-new-blog) [blogCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogCreate?example=create-a-new-blog) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs) [/admin/api/latest/blogs.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs) Retrieve a list of all blogs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs?example=retrieve-a-list-of-all-blogs) [blogs](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs?example=retrieve-a-list-of-all-blogs) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs-blog-id) [/admin/api/latest/blogs/{blog\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs-blog-id) Receive a single Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blog?example=receive-a-single-blog) [blog](https://shopify.dev/docs/api/admin-graphql/latest/queries/blog?example=receive-a-single-blog) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs-count) [/admin/api/latest/blogs/count.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#get-blogs-count) Receive a count of all Blogs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogsCount?example=receive-a-count-of-all-blogs) [blogsCount](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogsCount?example=receive-a-count-of-all-blogs) * [put](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#put-blogs-blog-id) [/admin/api/latest/blogs/{blog\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#put-blogs-blog-id) Modify an existing Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogUpdate?example=modify-an-existing-blog) [blogUpdate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogUpdate?example=modify-an-existing-blog) * [del](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#delete-blogs-blog-id) [/admin/api/latest/blogs/{blog\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/blog#delete-blogs-blog-id) Remove an existing Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogDelete?example=remove-an-existing-blog) [blogDelete](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogDelete?example=remove-an-existing-blog) *** ## The Blog resource ### Properties *** commentable -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.commentPolicy) [commentPolicy](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.commentPolicy) Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are: Show commentable properties * **no (default)**: Readers cannot post comments to blog articles. * **moderate**: Readers can post comments to blog articles, but comments must be moderated before they appear. * **yes**: Readers can post comments to blog articles without moderation. *** created\_at read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.createdAt) [createdAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.createdAt) The date and time when the blog was created. The API returns this value in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601). *** feedburner -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/BlogFeed#field-BlogFeed.fields.path) [path](https://shopify.dev/docs/api/admin-graphql/latest/objects/BlogFeed#field-BlogFeed.fields.path) 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 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/BlogFeed#field-BlogFeed.fields.location) [location](https://shopify.dev/docs/api/admin-graphql/latest/objects/BlogFeed#field-BlogFeed.fields.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 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.handle) [handle](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.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 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.id) [id](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.id) A unique numeric identifier for the blog. *** metafields array write-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.metafields) [metafields](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.metafields) Attaches additional metadata to a store's resources: Show metafields properties * **key (required)**: Identifier for the metafield (maximum of 30 characters). * **namespace (required)**: Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters). * **value (required)**: Information to be stored as metadata. * **type (required)**: The metafield's information type. Refer to the [full list of types](https://shopify.dev/apps/metafields/types). * **description (optional)**: Additional information about the metafield. For more information on attaching metadata to Shopify resources, see the [Metafield](https://shopify.dev/api/admin-rest/latest/resources/metafield) resource. *** tags read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.tags) [tags](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.tags) 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 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.templateSuffix) [templateSuffix](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.templateSuffix) 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 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.title) [title](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.title) The title of the blog. *** updated\_at read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.updatedAt) [updatedAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.updatedAt) 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](https://en.wikipedia.org/wiki/ISO_8601). *** admin\_graphql\_api\_id read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.id) [id](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog#field-Blog.fields.id) The GraphQL GID of the blog. *** {} ## The Blog resource ```json { "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" } ``` *** ## postCreate a new Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogCreate?example=create-a-new-blog) [blogCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogCreate?example=create-a-new-blog) Create a new blog ### Parameters *** api\_version string required *** title required The title of the blog. Maximum length: 255 characters. *** ### Examples Create a new empty blog Request body blog​ Blog resource Show blog properties blog.title:​"Apple main blog" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-title) [title](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-title) The title of the blog. Create a new empty blog with a metafield Request body blog​ Blog resource Show blog properties blog.title:​"Apple main blog" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-title) [title](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-title) The title of the blog. blog.metafields:​\[{"key":"sponsor",​"value":"Shopify",​"type":"single\_line\_text\_field",​"namespace":"global"}] array write-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-metafields) [metafields](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogCreateInput#fields-metafields) Attaches additional metadata to a store's resources: Show metafields properties * **key (required)**: Identifier for the metafield (maximum of 30 characters). * **namespace (required)**: Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters). * **value (required)**: Information to be stored as metadata. * **type (required)**: The metafield's information type. Refer to the [full list of types](https://shopify.dev/apps/metafields/types). * **description (optional)**: Additional information about the metafield. For more information on attaching metadata to Shopify resources, see the [Metafield](https://shopify.dev/api/admin-rest/latest/resources/metafield) resource. Trying to create a blog without a title will return an error post ## /admin/api/2025-10/blogs.​json ```bash curl -d '{"blog":{"title":"Apple main blog"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` {} ## Response JSON ```json HTTP/1.1 201 Created { "blog": { "id": 1008414251, "handle": "apple-main-blog", "title": "Apple main blog", "updated_at": "2025-10-01T15:13:20-04:00", "commentable": "no", "feedburner": null, "feedburner_location": null, "created_at": "2025-10-01T15:13:20-04:00", "template_suffix": null, "tags": "", "admin_graphql_api_id": "gid://shopify/Blog/1008414251" } } ``` ### examples * #### Create a new empty blog ##### ```curl curl -d '{"blog":{"title":"Apple main blog"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.title = "Apple main blog"; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.title = "Apple main blog" blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.title = "Apple main blog"; await blog.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"blog":{"id":1008414251,"handle":"apple-main-blog","title":"Apple main blog","updated_at":"2025-10-01T15:13:20-04:00","commentable":"no","feedburner":null,"feedburner_location":null,"created_at":"2025-10-01T15:13:20-04:00","template_suffix":null,"tags":"","admin_graphql_api_id":"gid://shopify/Blog/1008414251"}} ``` * #### Create a new empty blog with a metafield ##### ```curl curl -d '{"blog":{"title":"Apple main blog","metafields":[{"key":"sponsor","value":"Shopify","type":"single_line_text_field","namespace":"global"}]}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.title = "Apple main blog"; blog.metafields = [ { "key": "sponsor", "value": "Shopify", "type": "single_line_text_field", "namespace": "global" } ]; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.title = "Apple main blog" blog.metafields = [ { "key" => "sponsor", "value" => "Shopify", "type" => "single_line_text_field", "namespace" => "global" } ] blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.title = "Apple main blog"; blog.metafields = [ { "key": "sponsor", "value": "Shopify", "type": "single_line_text_field", "namespace": "global" } ]; await blog.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"blog":{"id":1008414250,"handle":"apple-main-blog","title":"Apple main blog","updated_at":"2025-10-01T15:13:18-04:00","commentable":"no","feedburner":null,"feedburner_location":null,"created_at":"2025-10-01T15:13:18-04:00","template_suffix":null,"tags":"","admin_graphql_api_id":"gid://shopify/Blog/1008414250"}} ``` * #### Trying to create a blog without a title will return an error ##### ```curl curl -d '{"blog":{"body":"foobar"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.body = "foobar"; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.body = "foobar" blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.body = "foobar"; await blog.save({ update: true, }); ``` #### response ```json HTTP/1.1 422 Unprocessable Entity{"errors":{"title":["can't be blank"]}} ``` *** ## getRetrieve a list of all blogs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs?example=retrieve-a-list-of-all-blogs) [blogs](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs?example=retrieve-a-list-of-all-blogs) 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](https://shopify.dev/api/usage/pagination-rest). ### Parameters *** 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 *** ### Examples Get all blogs for a shop Get all blogs for a shop after a specified ID Query parameters since\_​id=​241253187 Restrict results to after the specified ID get ## /admin/api/2025-10/blogs.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```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": "2025-10-01T15:07:00-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": "2025-10-01T15:07:00-04:00", "template_suffix": null, "tags": "Announcing, Mystery", "admin_graphql_api_id": "gid://shopify/Blog/241253187" } ] } ``` ### examples * #### Get all blogs for a shop ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.all({ session: session, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.all( session: test_session, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.all({ session: session, }); ``` #### 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":"2025-10-01T15:07:00-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":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"Announcing, Mystery","admin_graphql_api_id":"gid://shopify/Blog/241253187"}]} ``` * #### Get all blogs for a shop after a specified ID ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs.json?since_id=241253187" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.all({ session: session, since_id: "241253187", }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.all( session: test_session, since_id: "241253187", ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.all({ session: session, since_id: "241253187", }); ``` #### 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":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"","admin_graphql_api_id":"gid://shopify/Blog/382285388"},{"id":1008414248,"handle":"apple-main-blog","title":"Apple main blog","updated_at":"2025-10-01T15:13:14-04:00","commentable":"no","feedburner":null,"feedburner_location":null,"created_at":"2025-10-01T15:13:14-04:00","template_suffix":null,"tags":"","admin_graphql_api_id":"gid://shopify/Blog/1008414248"}]} ``` *** ## getReceive a single Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blog?example=receive-a-single-blog) [blog](https://shopify.dev/docs/api/admin-graphql/latest/queries/blog?example=receive-a-single-blog) Get a single blog by its ID ### Parameters *** api\_version string required *** blog\_id string required *** fields comma-separated list of fields to include in the response *** ### Examples Get a single blog Path parameters blog\_​id=​241253187 string required Get the id and title of a single blog Path parameters blog\_​id=​241253187 string required Query parameters fields=​id,​title comma-separated list of fields to include in the response get ## /admin/api/2025-10/blogs/241253187.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```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": "2025-10-01T15:07:00-04:00", "template_suffix": null, "tags": "Announcing, Mystery", "admin_graphql_api_id": "gid://shopify/Blog/241253187" } } ``` ### examples * #### Get a single blog ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.find({ session: session, id: 241253187, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.find( session: test_session, id: 241253187, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.find({ session: session, id: 241253187, }); ``` #### 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":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"Announcing, Mystery","admin_graphql_api_id":"gid://shopify/Blog/241253187"}} ``` * #### Get the id and title of a single blog ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json?fields=id%2Ctitle" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.find({ session: session, id: 241253187, fields: "id,title", }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.find( session: test_session, id: 241253187, fields: "id,title", ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.find({ session: session, id: 241253187, fields: "id,title", }); ``` #### response ```json HTTP/1.1 200 OK{"blog":{"id":241253187,"title":"Mah Blog"}} ``` *** ## getReceive a count of all Blogs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogsCount?example=receive-a-count-of-all-blogs) [blogsCount](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogsCount?example=receive-a-count-of-all-blogs) Get a count of all blogs ### Parameters *** api\_version string required *** ### Examples Get the blogs count for a shop get ## /admin/api/2025-10/blogs/count.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "count": 2 } ``` ### examples * #### Get the blogs count for a shop ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.count({ session: session, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.count( session: test_session, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.count({ session: session, }); ``` #### response ```json HTTP/1.1 200 OK{"count":2} ``` *** ## putModify an existing Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogUpdate?example=modify-an-existing-blog) [blogUpdate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogUpdate?example=modify-an-existing-blog) Update a blog ### Parameters *** api\_version string required *** blog\_id string required *** ### Examples Add a metafield to an existing blog Path parameters blog\_​id=​241253187 string required Request body blog​ Blog resource Show blog properties blog.id:​241253187 read-only A unique numeric identifier for the blog. blog.metafields:​\[{"key":"sponsor",​"value":"Shopify",​"type":"single\_line\_text\_field",​"namespace":"global"}] array write-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-metafields) [metafields](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-metafields) Attaches additional metadata to a store's resources: Show metafields properties * **key (required)**: Identifier for the metafield (maximum of 30 characters). * **namespace (required)**: Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters). * **value (required)**: Information to be stored as metadata. * **type (required)**: The metafield's information type. Refer to the [full list of types](https://shopify.dev/apps/metafields/types). * **description (optional)**: Additional information about the metafield. For more information on attaching metadata to Shopify resources, see the [Metafield](https://shopify.dev/api/admin-rest/latest/resources/metafield) resource. Update an existing blog title Path parameters blog\_​id=​241253187 string required Request body blog​ Blog resource Show blog properties blog.id:​241253187 read-only A unique numeric identifier for the blog. blog.title:​"IPod Updates" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-title) [title](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-title) The title of the blog. Update an existing blog title and handle and also activate comments Path parameters blog\_​id=​241253187 string required Request body blog​ Blog resource Show blog properties blog.id:​241253187 read-only A unique numeric identifier for the blog. blog.title:​"IPod Updates" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-title) [title](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-title) The title of the blog. blog.handle:​"ipod-updates" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-handle) [handle](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-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. blog.commentable:​"moderate" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-commentPolicy) [commentPolicy](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BlogUpdateInput#fields-commentPolicy) Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are: Show commentable properties * **no (default)**: Readers cannot post comments to blog articles. * **moderate**: Readers can post comments to blog articles, but comments must be moderated before they appear. * **yes**: Readers can post comments to blog articles without moderation. put ## /admin/api/2025-10/blogs/241253187.​json ```bash 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/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` {} ## Response JSON ```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": "2025-10-01T15:07:00-04:00", "template_suffix": null, "tags": "Announcing, Mystery", "admin_graphql_api_id": "gid://shopify/Blog/241253187" } } ``` ### examples * #### Add a metafield to an existing blog ##### ```curl 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/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.id = 241253187; blog.metafields = [ { "key": "sponsor", "value": "Shopify", "type": "single_line_text_field", "namespace": "global" } ]; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.id = 241253187 blog.metafields = [ { "key" => "sponsor", "value" => "Shopify", "type" => "single_line_text_field", "namespace" => "global" } ] blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.id = 241253187; blog.metafields = [ { "key": "sponsor", "value": "Shopify", "type": "single_line_text_field", "namespace": "global" } ]; await blog.save({ update: true, }); ``` #### 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":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"Announcing, Mystery","admin_graphql_api_id":"gid://shopify/Blog/241253187"}} ``` * #### Update an existing blog title ##### ```curl curl -d '{"blog":{"id":241253187,"title":"IPod Updates"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.id = 241253187; blog.title = "IPod Updates"; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.id = 241253187 blog.title = "IPod Updates" blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.id = 241253187; blog.title = "IPod Updates"; await blog.save({ update: true, }); ``` #### response ```json HTTP/1.1 200 OK{"blog":{"title":"IPod Updates","handle":"apple-blog","id":241253187,"updated_at":"2025-10-01T15:13:30-04:00","commentable":"no","feedburner":null,"feedburner_location":null,"created_at":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"Announcing, Mystery","admin_graphql_api_id":"gid://shopify/Blog/241253187"}} ``` * #### Update an existing blog title and handle and also activate comments ##### ```curl curl -d '{"blog":{"id":241253187,"title":"IPod Updates","handle":"ipod-updates","commentable":"moderate"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const blog = new admin.rest.resources.Blog({session: session}); blog.id = 241253187; blog.title = "IPod Updates"; blog.handle = "ipod-updates"; blog.commentable = "moderate"; await blog.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session blog = ShopifyAPI::Blog.new(session: test_session) blog.id = 241253187 blog.title = "IPod Updates" blog.handle = "ipod-updates" blog.commentable = "moderate" blog.save! ``` ##### ```node // Session is built by the OAuth process const blog = new shopify.rest.Blog({session: session}); blog.id = 241253187; blog.title = "IPod Updates"; blog.handle = "ipod-updates"; blog.commentable = "moderate"; await blog.save({ update: true, }); ``` #### response ```json HTTP/1.1 200 OK{"blog":{"title":"IPod Updates","handle":"ipod-updates","commentable":"moderate","id":241253187,"updated_at":"2025-10-01T15:13:24-04:00","feedburner":null,"feedburner_location":null,"created_at":"2025-10-01T15:07:00-04:00","template_suffix":null,"tags":"Announcing, Mystery","admin_graphql_api_id":"gid://shopify/Blog/241253187"}} ``` *** ## delRemove an existing Blog [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogDelete?example=remove-an-existing-blog) [blogDelete](https://shopify.dev/docs/api/admin-graphql/latest/mutations/blogDelete?example=remove-an-existing-blog) Delete a blog ### Parameters *** api\_version string required *** blog\_id string required *** ### Examples Remove an existing blog from a shop Path parameters blog\_​id=​241253187 string required del ## /admin/api/2025-10/blogs/241253187.​json ```bash curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK {} ``` ### examples * #### Remove an existing blog from a shop ##### ```curl curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-10/blogs/241253187.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Blog.delete({ session: session, id: 241253187, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Blog.delete( session: test_session, id: 241253187, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Blog.delete({ session: session, id: 241253187, }); ``` #### response ```json HTTP/1.1 200 OK{} ```