Skip to content
Available for new work
Pages in Blog

ReferencePremium

CoullWorks Blog for Magento 2 REST endpoints reference

Every REST route, its parameters and access, and the fields of the REST data shapes.

Updated 16 November 2026Back to the package pageBuy

REST routes are provided by the paid GraphQL and REST add-on. Public routes are anonymous and show only what the reader may see. Admin routes need an admin token with the ACL resource shown.

Posts endpoints#

EndpointParameters and handlerAccess
GET /V1/cwblog/postsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). PublicPostReadInterface::getList.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain). Allowed filter fields: post_id, url_key, title, publish_at, category_id, tag_id, author_id. Allowed sort fields: post_id, title, publish_at, created_at, updated_at, reading_minutes. Other fields raise "The filter field/sort field is not allowed." Page size default 20, max 100.
GET /V1/cwblog/posts/:urlKeyParams: urlKey (path, string). PublicPostReadInterface::getByUrlKey.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain).
GET /V1/cwblog/admin/postsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). PostRepositoryInterface::getList.admin token with ACL CoullWorks_Blog::posts.
GET /V1/cwblog/admin/posts/:idParams: id (path, int). PostRepositoryInterface::get.admin token with ACL CoullWorks_Blog::posts.
POST /V1/cwblog/postsParams: body: post object (see data fields in the REST data shape item). PostRepositoryInterface::save.admin token with ACL CoullWorks_Blog::posts.
PUT /V1/cwblog/posts/:idParams: id (path, int); body: post object (see data fields in the REST data shape item). PostRepositoryInterface::save.admin token with ACL CoullWorks_Blog::posts.
DELETE /V1/cwblog/posts/:idParams: id (path, int). PostRepositoryInterface::deleteById.admin token with ACL CoullWorks_Blog::posts.

Categories endpoints#

EndpointParameters and handlerAccess
GET /V1/cwblog/categoriesParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). PublicCategoryReadInterface::getList.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain). Allowed filter fields: category_id, parent_id, url_key, title, level. Allowed sort fields: position, title, category_id. Other fields raise "The filter field/sort field is not allowed." Page size default 20, max 100.
GET /V1/cwblog/categories/:urlKeyParams: urlKey (path, string). PublicCategoryReadInterface::getByUrlKey.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain).
GET /V1/cwblog/admin/categoriesParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). CategoryRepositoryInterface::getList.admin token with ACL CoullWorks_Blog::categories.
GET /V1/cwblog/admin/categories/:idParams: id (path, int). CategoryRepositoryInterface::get.admin token with ACL CoullWorks_Blog::categories.
POST /V1/cwblog/categoriesParams: body: category object (see data fields in the REST data shape item). CategoryRepositoryInterface::save.admin token with ACL CoullWorks_Blog::categories.
PUT /V1/cwblog/categories/:idParams: id (path, int); body: category object (see data fields in the REST data shape item). CategoryRepositoryInterface::save.admin token with ACL CoullWorks_Blog::categories.
DELETE /V1/cwblog/categories/:idParams: id (path, int). CategoryRepositoryInterface::deleteById.admin token with ACL CoullWorks_Blog::categories.

Tags endpoints#

EndpointParameters and handlerAccess
GET /V1/cwblog/tagsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). PublicTagReadInterface::getList.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain). Allowed filter fields: tag_id, url_key, title. Allowed sort fields: title, tag_id. Other fields raise "The filter field/sort field is not allowed." Page size default 20, max 100.
GET /V1/cwblog/tags/:urlKeyParams: urlKey (path, string). PublicTagReadInterface::getByUrlKey.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain).
GET /V1/cwblog/admin/tagsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). TagRepositoryInterface::getList.admin token with ACL CoullWorks_Blog::tags.
GET /V1/cwblog/admin/tags/:idParams: id (path, int). TagRepositoryInterface::get.admin token with ACL CoullWorks_Blog::tags.
POST /V1/cwblog/tagsParams: body: tag object (see data fields in the REST data shape item). TagRepositoryInterface::save.admin token with ACL CoullWorks_Blog::tags.
PUT /V1/cwblog/tags/:idParams: id (path, int); body: tag object (see data fields in the REST data shape item). TagRepositoryInterface::save.admin token with ACL CoullWorks_Blog::tags.
DELETE /V1/cwblog/tags/:idParams: id (path, int). TagRepositoryInterface::deleteById.admin token with ACL CoullWorks_Blog::tags.

Authors endpoints#

EndpointParameters and handlerAccess
GET /V1/cwblog/authorsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). PublicAuthorReadInterface::getList.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain). Allowed filter fields: author_id, url_key, name. Allowed sort fields: name, author_id. Other fields raise "The filter field/sort field is not allowed." Page size default 20, max 100.
GET /V1/cwblog/authors/:urlKeyParams: urlKey (path, string). PublicAuthorReadInterface::getByUrlKey.anonymous (shows only what the reader may see; licence gate answers 401 on an unlicensed domain).
GET /V1/cwblog/admin/authorsParams: searchCriteria (query: filterGroups, sortOrders, pageSize, currentPage). AuthorRepositoryInterface::getList.admin token with ACL CoullWorks_Blog::authors.
GET /V1/cwblog/admin/authors/:idParams: id (path, int). AuthorRepositoryInterface::get.admin token with ACL CoullWorks_Blog::authors.
POST /V1/cwblog/authorsParams: body: author object (see data fields in the REST data shape item). AuthorRepositoryInterface::save.admin token with ACL CoullWorks_Blog::authors.
PUT /V1/cwblog/authors/:idParams: id (path, int); body: author object (see data fields in the REST data shape item). AuthorRepositoryInterface::save.admin token with ACL CoullWorks_Blog::authors.
DELETE /V1/cwblog/authors/:idParams: id (path, int). AuthorRepositoryInterface::deleteById.admin token with ACL CoullWorks_Blog::authors.

Updating with PUT: send the id in the body#

The :id in PUT /V1/cwblog/posts/:id (and the category, tag and author routes) is not passed to the save. Every save route calls the repository's save with a single argument, the entity, which Magento builds from the JSON body alone, and the add-on's etc/webapi.xml maps no URL parameter onto it. So the entity id must be inside the body: post_id, category_id, tag_id or author_id. Without it the body is treated as a new record, so you get a second record, or the error that the URL key is already used when the key matches the one you meant to update. The body is wrapped in a key named after the argument: post, category, tag or author. Send the whole object, the way GET /V1/cwblog/admin/<entity>/:id returned it, with your changes.

bash
# Post 42: change the title
curl -X PUT https://your-store.example/rest/V1/cwblog/posts/42 \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
  -d '{"post": {"post_id": 42, "url_key": "my-post", "title": "New title"}}'

# Category 7
curl -X PUT https://your-store.example/rest/V1/cwblog/categories/7 \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
  -d '{"category": {"category_id": 7, "url_key": "news", "title": "News and updates"}}'

# Tag 3
curl -X PUT https://your-store.example/rest/V1/cwblog/tags/3 \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
  -d '{"tag": {"tag_id": 3, "url_key": "magento", "title": "Magento 2"}}'

# Author 5
curl -X PUT https://your-store.example/rest/V1/cwblog/authors/5 \
  -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
  -d '{"author": {"author_id": 5, "url_key": "dan", "name": "Dan Coull"}}'

The examples show only the id and the identifying fields. A real call also carries the fields the entity requires, so start from the GET response. Comments have no REST route.

Data shapes#

ShapeFields
REST post fieldspost_id, url_key, title, template, short_content, content, featured_image, featured_image_alt, og_image, meta_title, meta_description, primary_author_id, published_at, created_at, updated_at, reading_minutes, is_ai_assisted, show_ai_disclosure, comments_closed, category_ids, tag_ids, coauthor_ids, takeaways, faqs, related_post_ids, related_product_ids (public shape, PublicPostInterface).
REST post (admin shape) fieldspost_id, url_key, title, status, template, short_content, content, featured_image, featured_image_alt, og_image, meta_title, meta_description, meta_robots, primary_author_id, translation_group_id, publish_at, first_published_at, disable_at, reading_minutes, is_ai_assisted, show_ai_disclosure, comments_closed, created_at, updated_at, store_ids, customer_group_ids, category_ids, tag_ids, coauthor_ids, takeaways, faqs, related_post_ids, related_product_ids, related_product_rule, revision_source, extension_attributes.
REST category (public) fieldscategory_id, parent_id, path, level, position, url_key, title, description, image, meta_title, meta_description, list_mode, posts_per_page, include_in_menu.
REST category (admin) fieldscategory_id, parent_id, path, level, position, url_key, title, description, image, meta_title, meta_description, meta_robots, list_mode, posts_per_page, include_in_menu, is_active, store_ids, customer_group_ids, extension_attributes.
REST tag (public) fieldstag_id, url_key, title, description, meta_title, meta_description.
REST tag (admin) fieldstag_id, url_key, title, description, meta_title, meta_description, meta_robots, is_active, store_ids, extension_attributes.
REST author (public) fieldsauthor_id, url_key, name, job_title, bio, avatar, links.
REST author (admin) fieldsauthor_id, url_key, name, job_title, bio, avatar, email, admin_user_id, is_active, links, extension_attributes.

Public shapes are read from the add-on's Api/Data/Public*Interface files and admin shapes from the core Api/Data/*Interface files.

Search criteria and gaps#

  • No REST endpoint for comments: There is no REST route for comments, the AI writer or import; comments are available over GraphQL (cwBlogComments, cwBlogCommentToken, cwBlogAddComment) and the storefront form.
  • Magento searchCriteria on list routes: Standard Magento searchCriteria: searchCriteria[filterGroups][i][filters][j][field/value/conditionType], searchCriteria[sortOrders][k][field/direction], searchCriteria[pageSize], searchCriteria[currentPage]. Page size defaults to 20 and is capped at 100.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.