# Blog Tags

Create, read, update, delete, bulk manage, translate, and subscribe to blog tags through the Store API.

Blog tags organize posts by topic. Each tag has a page at `/{blog}/tagged/{slug}` (the slug in the shopper's language) listing the posts with the tag, rendered with the theme's blog tag template, or with its blog list template when the theme has none; when a slug changes with `create_redirect` (default true) the old address moves (301) to the new one. Reads require `read_blog`; writes require `write_blog`. Read field lengths, page sizes and the bulk delete cap from `/blog/tags/limits` instead of hard-coding them. Names and slugs must be unique in the store, in every language. An omitted or empty create slug is generated from the name; an update keeps an omitted slug and rejects an empty one. Slugs are saved in lowercase on create, update and translations. `post_count` counts posts in any status, drafts included. Unknown or wrongly typed request fields are rejected with `STORE_API_BODY_PROPERTY_UNKNOWN` or `STORE_API_BODY_PROPERTY_INVALID`.

Deleting a tag that posts use asks for confirmation first; the warning counts those posts. The confirmed delete removes the tag from them without deleting posts. Bulk deletion lists deleted ids in `deleted` and every id it did not delete in `failed`, each with a `code` (`NOT_FOUND` or `CONFLICT`) and a `reason`. Translate names and slugs through [Blog Tag translations](/store-api/translations/blog/tags).

## Endpoints

## Blog Tag limits

`GET /api/2025-01/blog/tags/limits`

Returns the per-field maximum lengths and request caps that apply to Blog Tag endpoints. Useful for clients to validate inputs before sending them and to size UIs. `max_per_store` is this store's plan cap, `count` is how many exist now, and `usage` is the label as Tringify shows it, in English.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/tags/limits' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "bulk_delete_max_items": 100,
    "count": 4,
    "list_max_limit": 100,
    "list_page_size": 20,
    "max_per_store": 20,
    "name_max_length": 100,
    "page_size_options": [
      20,
      50,
      100
    ],
    "search_max_length": 100,
    "slug_max_length": 100,
    "sort_columns": [
      "name",
      "post_count",
      "created_at",
      "updated_at"
    ],
    "usage": "Blog tags 4 of 20"
  },
  "success": true
}
```

## List blog tags

`GET /api/2025-01/blog/tags`

Returns paginated Blog Tags. `total` counts matches for the current filters; `store_total` counts all records in the store and can be compared with the store capacity returned by the limits endpoint. `post_count` counts the blog posts that have the tag, in any status (drafts and scheduled posts count). Use `search` to filter by name or slug. `has_next` says whether another page follows; send its `next_cursor` as `cursor` to read it. A cursor page has no `page` number, so `page` is left out of its response. Invalid pagination and unsupported sort values are rejected.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/tags?limit=20&page=1&search=product-updates&sort_by=name&sort_direction=asc' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "has_next": false,
    "limit": 20,
    "next_cursor": "",
    "page": 1,
    "sort_by": "name",
    "sort_direction": "asc",
    "store_total": 1,
    "tags": [
      {
        "created_at": "2026-06-09T12:00:00-04:00",
        "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "name": "Product Updates",
        "post_count": 8,
        "slug": "product-updates",
        "updated_at": "2026-06-09T12:00:00-04:00"
      }
    ],
    "total": 1
  },
  "success": true
}
```

## Get a blog tag

`GET /api/2025-01/blog/tags/{id}`

Returns the Blog Tag if it belongs to the token's store.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/tags/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Product Updates",
    "post_count": 8,
    "slug": "product-updates",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "success": true
}
```

## Create a blog tag

`POST /api/2025-01/blog/tags`

Creates a Blog Tag. `name` is required. `slug` is optional on create; when omitted or empty, it is generated from the name. Slugs are saved in lowercase on every path (create, update and translations), so `Spring-News` is saved as `spring-news`. Neither field can be null. `create_redirect` only applies to updates and is refused here. Unknown or wrongly typed body properties are refused.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/tags' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Product Updates",
  "slug": "product-updates"
}'
```

Response:

```json
{
  "code": "BLOG_TAG_CREATED",
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Product Updates",
    "post_count": 0,
    "slug": "product-updates",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "message": "Blog Tag 'Product Updates' created.",
  "success": true
}
```

## Update a blog tag

`PUT /api/2025-01/blog/tags/{id}`

Updates provided Blog Tag fields. Omitted fields are left unchanged; `name`, `slug` and `create_redirect` cannot be null. When `slug` is provided it must be non-empty and valid, and it is saved in lowercase; create is the only path that generates a blank slug from the name. The tag's page (`/{blog}/tagged/{slug}`, the slug in the shopper's language) lists the posts with the tag and renders with the theme's blog tag template, or its blog list template when the theme has none. Changing the slug with `create_redirect` (default true) keeps the old slug leading to the tag: its old address moves (301) to the new one; with false the old slug is let go and its address is a 404. Unknown or wrongly typed body properties are refused.

Scope: `write_blog`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/blog/tags/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "create_redirect": true,
  "name": "Product Updates",
  "slug": "product-updates"
}'
```

Response:

```json
{
  "code": "BLOG_TAG_UPDATED",
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Product Updates",
    "post_count": 8,
    "slug": "product-updates",
    "updated_at": "2026-06-09T12:05:00-04:00"
  },
  "message": "Blog Tag 'Product Updates' updated.",
  "success": true
}
```

## Delete a blog tag

`DELETE /api/2025-01/blog/tags/{id}`

Deletes a Blog Tag and its translations. If the tag is assigned to blog posts (in any status), the first request returns `CONFIRMATION_REQUIRED` with a warning that counts those posts; repeat it with `confirmed: true` and the returned token, and the delete takes the tag off those posts: each one sends `blog_posts/update` with `changed_fields: ["tags"]`. A tag on up to 100 posts is deleted in this request: the response is `{deleted: true, lifecycle: null}` with code `BLOG_TAG_DELETED`. A tag on more posts is taken off them in a background lifecycle job, 100 at a time, and deleted when every post is done: the response is `{deleted: false, lifecycle: {id, kind, status, processed, total, message}}` with code `BLOG_TAG_DELETION_QUEUED`; poll `GET /blog/tags/lifecycle-jobs/{job_id}`. Unknown or wrongly typed body properties are refused.

Scope: `write_blog`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/blog/tags/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "code": "BLOG_TAG_DELETED",
  "data": {
    "deleted": true,
    "lifecycle": null
  },
  "message": "Blog Tag 'Product Updates' deleted.",
  "success": true
}
```

## Bulk delete blog tags

`POST /api/2025-01/blog/tags/bulk-delete`

Deletes multiple Blog Tags and their translations in one request, up to `bulk_delete_max_items` from the limits; a repeated id counts once. When any selected tag is assigned to blog posts, the first request returns `CONFIRMATION_REQUIRED` with a warning that counts the posts that use any selected tag (a post with two selected tags counts once) and makes no changes; repeat it with `confirmed: true` and the returned token to take the tags off those posts (each changed post sends `blog_posts/update` with `changed_fields: ["tags"]`) and delete them. When the selected tags are on 100 posts or fewer in total, every tag is deleted now. With more, tags without posts are deleted now and each tag that has posts is listed in `queued`, with one lifecycle job per tag in `jobs` that takes it off its posts and deletes it; poll it with `GET /blog/tags/lifecycle-jobs/{job_id}`. Deleted ids are listed in `deleted`. Each id that was not deleted is listed in `failed` as `{id, name, code, reason}` (`name` only when the tag was found): `code` is `NOT_FOUND` when no such tag exists in this store, or `CONFLICT` when its post assignments changed while it was being deleted (send it again); `reason` is the message. The response code is `BLOG_TAGS_DELETED`, or `BLOG_TAGS_BULK_DELETE_DEFERRED` when tags are queued. Unknown or wrongly typed body properties are refused.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/tags/bulk-delete' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "tag_ids": [
    "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
  ]
}'
```

Response:

```json
{
  "code": "BLOG_TAGS_DELETED",
  "data": {
    "deleted": [
      "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
    ],
    "failed": [
      {
        "code": "NOT_FOUND",
        "id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
        "reason": "Resource not found."
      }
    ],
    "jobs": [],
    "queued": []
  },
  "message": "1 blog tag deleted.",
  "success": true
}
```

## Get a blog tag deletion job

`GET /api/2025-01/blog/tags/lifecycle-jobs/{job_id}`

Returns the lifecycle job a blog tag delete or bulk delete started: `kind` is `tag_delete`, `status` is `running`, `completed` (the tag is off every post and deleted) or `failed`, `processed` and `total` count posts, and `message` is the localized progress or result. A failed job names its cause in `failure_code` (otherwise null): the posts it changed stay without the tag and the tag is kept; delete it again to retry. A job that hits a temporary error retries with a growing delay and stays `running`.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/tags/lifecycle-jobs/0b6f5d1e-8c9a-4e2b-9f3d-7a1c2e4b6d80' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "failure_code": null,
    "id": "0b6f5d1e-8c9a-4e2b-9f3d-7a1c2e4b6d80",
    "kind": "tag_delete",
    "message": "Took tag 'Summer' off 240 posts and deleted it.",
    "processed": 240,
    "status": "completed",
    "total": 240
  },
  "success": true
}
```

## Change matching blog tags

`POST /api/2025-01/blog/tags/bulk-operations`

Selects every blog tag matching `filter` when the request is made (at most 100000) and applies `action` to them in the background, in steps of at most `bulk_delete_max_items` from the limits. Actions: `delete` deletes each blog tag as Bulk delete blog tags does, taking it off its blog posts (each changed post sends `blog_posts/update`); a step whose tags are on more than 100 posts deletes those tags with background lifecycle jobs. Returns HTTP 202 with the operation; poll Get blog tag bulk operation until its status is no longer queued. If any selected blog tag is assigned to blog posts, the first request returns `CONFIRMATION_REQUIRED` with a warning that counts those posts; repeat it with `confirmed: true` and the returned token. The token covers exactly the blog tags selected at that moment: if the selection changes before you repeat, the request asks again. Blog Tags created or changed to match after the request are not included. A store runs one blog tag bulk operation at a time. Reusing `operation_id` with the same `action`, `filter` and `params` returns the existing operation; a different request returns 409.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/tags/bulk-operations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "delete",
  "confirmed": false,
  "filter": {
    "search": "summer"
  },
  "operation_id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651"
}'
```

Response:

```json
{
  "success": true,
  "code": "BLOG_TAGS_BULK_DELETE_QUEUED",
  "message": "Deleting 250 tags in the background.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "queued",
      "filter": {
        "search": "summer"
      },
      "params": {},
      "total": 250,
      "processed": 0,
      "succeeded": 0,
      "failed": 0,
      "failures": [],
      "summary": "Deleting tags: 0 of 250 done.",
      "created_at": "2026-11-22T10:00:00+05:30"
    }
  }
}
```

## Get blog tag bulk operation

`GET /api/2025-01/blog/tags/bulk-operations/{operationId}`

Use the operation UUID returned when queueing it, or `current` for the store's running operation (or, when none runs, its newest finished one not yet acknowledged). `status` is queued (running), completed, cancelled or failed. `processed` rises from 0 to `total` as the operation works through the blog tags it selected; `succeeded` and `failed` split it (blog tags the action leaves as they were count as succeeded). `failures` lists each blog tag the action could not change with its `code` and `reason` (NOT_FOUND when it was already gone); the first 500 are kept, `failed` counts them all. `summary` is the operation's state in the caller's language. A failed operation keeps what it had already done; `error` says why it stopped. Operations remain available for 30 days after they finish. `current` returns `operation: null` when there is nothing to show.

Scope: `write_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/tags/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "code": "BLOG_TAGS_BULK_DELETE_PARTIAL",
  "message": "249 tags deleted. 1 tag could not be deleted.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "completed",
      "filter": {
        "search": "summer"
      },
      "params": {},
      "total": 250,
      "processed": 250,
      "succeeded": 249,
      "failed": 1,
      "failures": [
        {
          "id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
          "title": "Summer",
          "code": "NOT_FOUND",
          "reason": "Not found"
        }
      ],
      "summary": "249 tags deleted. 1 tag could not be deleted.",
      "created_at": "2026-11-22T10:00:00+05:30",
      "finished_at": "2026-11-22T10:00:06+05:30"
    }
  }
}
```

## Cancel blog tag bulk operation

`POST /api/2025-01/blog/tags/bulk-operations/{operationId}/cancel`

Stops the operation; the step in progress is rolled back. Blog Tags already changed stay changed; the others are left as they were. Returns the operation with status cancelled.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/tags/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651/cancel' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "code": "BLOG_TAGS_BULK_DELETE_CANCELLED",
  "message": "Stopped. 200 tags were deleted before you stopped; the others were kept.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "cancelled",
      "filter": {
        "search": "summer"
      },
      "params": {},
      "total": 250,
      "processed": 200,
      "succeeded": 200,
      "failed": 0,
      "failures": [],
      "summary": "Stopped. 200 tags were deleted before you stopped; the others were kept.",
      "created_at": "2026-11-22T10:00:00+05:30",
      "finished_at": "2026-11-22T10:00:04+05:30"
    }
  }
}
```

## Acknowledge blog tag bulk operation

`POST /api/2025-01/blog/tags/bulk-operations/{operationId}/acknowledge`

After presenting a finished result, acknowledge its UUID so `current` no longer returns it. It stays readable by UUID for 30 days. Repeating it is safe. A running operation cannot be acknowledged.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/tags/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651/acknowledge' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "data": {
    "acknowledged": true
  }
}
```

## Fields

| Field | Type | Create | Update | Required | Translatable |
| --- | --- | --- | --- | --- | --- |
| `name` | string | Yes | Yes | create | Yes |
| `slug` | string | Yes | Yes | - | Yes |
| `post_count` | integer | No | No | - | No |
| `create_redirect` | boolean | No | Yes | - | No |
| `created_at` | string (RFC 3339) | No | No | - | No |
| `updated_at` | string (RFC 3339) | No | No | - | No |

## Webhook events

Subscribe to these events to keep your integration in sync with blog tags. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

## Blog tag created

Event: `blog_tags/create` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a blog tag is created.

```json
{
  "blog_tag": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Gear",
    "post_count": 3,
    "slug": "gear",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Blog tag updated

Event: `blog_tags/update` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a blog tag's name or slug changes; `changed_fields` names them (`name`, `slug`). Assigning the tag to posts or removing it changes post_count without this event.

```json
{
  "blog_tag": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Gear",
    "post_count": 3,
    "slug": "gear",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "changed_fields": [
    "name",
    "slug"
  ]
}
```

## Blog tag deleted

Event: `blog_tags/delete` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a blog tag is deleted. The same delete sends blog_tags/translations/delete for each translated language; events of different topics can arrive in any order.

```json
{
  "blog_tag": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "name": "Gear",
    "post_count": 3,
    "slug": "gear",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

