Skip to main content

Tags API

Manage blog tags. All endpoints require authentication.

Tag object

FieldTypeDescription
tag_idIntUnique tag identifier (read-only)
nameStringTag label
url_keyStringURL slug
store_idsInt[]Store view IDs this tag is visible on
robotsStringRobots directive (e.g. INDEX,FOLLOW)

Get tag

GET /rest/V1/blog/tag/:tagId

Response:

{
"tag_id": 12,
"name": "Magento 2",
"url_key": "magento-2",
"store_ids": [1],
"robots": "INDEX,FOLLOW"
}

Errors: 404 tag not found.

List tags

GET /rest/V1/blog/tags

Supports filtering and pagination.

Response:

{
"items": [ { ... }, { ... } ],
"search_criteria": { "filter_groups": [], "page_size": 20, "current_page": 1 },
"total_count": 24
}

Create tag

POST /rest/V1/blog/tag

Request body:

{
"tag": {
"name": "Performance",
"url_key": "performance",
"store_ids": [1]
}
}

name, url_key, and store_ids are required.

Response: the created tag object with tag_id assigned.

Update tag

PUT /rest/V1/blog/tag/:tagId

Request body: same structure as Create tag. Include only the fields you want to change.

Response: the updated tag object.

Errors: 404 tag not found.

Delete tag

DELETE /rest/V1/blog/tag/:tagId

Response:

true

Errors: 404 tag not found.