Tags

Blog-specific tags — cross-cutting labels applied to posts with per-language translations.

Service: blog.tags

Blog-specific tag. Tags are cross-cutting labels applied to posts (e.g. “privacy”, “encryption”) and carry per-language translations.

Fields

Field Type Required Description
id string Primary key. Read-only, auto-generated
slug string URL-safe identifier, unique (format: slug)
title string Display title
tag_translation TagTranslation[] Inline translations

TagTranslation

Per-language overlay for a tag. The translatable field is nullable so a partial translation overlays onto the base tag without clobbering untranslated values (null = inherit base).

Field Type Required Description
id string Primary key. Read-only. Include when updating existing rows
source_id string Tag being translated. Read-only, auto-set from parent
language_id string Language of this translation
title string? Translated tag title (null = inherit base)

Unique constraint: { source_id, language_id } — one translation per language per tag.

find

List tags with filtering, sorting, and pagination.

HTTP

Request

GET /v1/blog/tags?fields=id,slug,title,tag_translation.id,tag_translation.language_id,tag_translation.title&limit=100
Authorization: Bearer <token>

Response

{
  "items": [
    {
      "id": "1920438291800",
      "slug": "privacy",
      "title": "Privacy",
      "tag_translation": [
        { "id": "1920438291805", "language_id": "2", "title": "Confidentialité" }
      ]
    }
  ],
  "total": 1
}

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.find",
  "params": {
    "fields": [
      "id", "slug", "title",
      "tag_translation.id", "tag_translation.language_id", "tag_translation.title"
    ],
    "limit": 100
  },
  "id": 10
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "items": [
      {
        "id": "1920438291800",
        "slug": "privacy",
        "title": "Privacy",
        "tag_translation": [
          { "id": "1920438291805", "language_id": "2", "title": "Confidentialité" }
        ]
      }
    ],
    "total": 1
  },
  "id": 10
}

findOneById

Fetch a single tag by id with full detail including translations.

HTTP

Request

GET /v1/blog/tags/1920438291800?fields=id,slug,title,tag_translation.id,tag_translation.language_id,tag_translation.title
Authorization: Bearer <token>

Response

{
  "id": "1920438291800",
  "slug": "privacy",
  "title": "Privacy",
  "tag_translation": [
    { "id": "1920438291805", "language_id": "2", "title": "Confidentialité" }
  ]
}

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.findOneById",
  "params": {
    "id": "1920438291800",
    "fields": [
      "id", "slug", "title",
      "tag_translation.id", "tag_translation.language_id", "tag_translation.title"
    ]
  },
  "id": 11
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291800",
    "slug": "privacy",
    "title": "Privacy",
    "tag_translation": [
      { "id": "1920438291805", "language_id": "2", "title": "Confidentialité" }
    ]
  },
  "id": 11
}

create

Create a new tag. The server assigns id.

HTTP

Request

POST /v1/blog/tags
Authorization: Bearer <token>
Content-Type: application/json

{
  "slug": "privacy",
  "title": "Privacy",
  "tag_translation": [
    { "language_id": "2", "title": "Confidentialité" }
  ]
}

Response

{
  "id": "1920438291800",
  "slug": "privacy",
  "title": "Privacy"
}

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.create",
  "params": {
    "document": {
      "slug": "privacy",
      "title": "Privacy",
      "tag_translation": [
        { "language_id": "2", "title": "Confidentialité" }
      ]
    }
  },
  "id": 12
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "id": "1920438291800",
    "slug": "privacy",
    "title": "Privacy"
  },
  "id": 12
}

updateOneById

Partial update — only specified fields change; omitted fields are untouched. Nested collections are updated automatically.

HTTP

Request

PATCH /v1/blog/tags/1920438291800
Authorization: Bearer <token>
Content-Type: application/json

{ "title": "Privacy & data" }

Response

{ "id": "1920438291800", "title": "Privacy & data" }

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.updateOneById",
  "params": {
    "id": "1920438291800",
    "document": { "title": "Privacy & data" }
  },
  "id": 13
}

Response

{
  "jsonrpc": "2.0",
  "result": { "id": "1920438291800", "title": "Privacy & data" },
  "id": 13
}

replaceOneById

Full replacement — all writable fields must be provided. Unlike updateOneById, omitted fields are reset to defaults. Inline collections (tag_translation) are not accepted — use updateOneById to modify them.

HTTP

Request

PUT /v1/blog/tags/1920438291800
Authorization: Bearer <token>
Content-Type: application/json

{ "slug": "privacy", "title": "Privacy" }

Response

{ "id": "1920438291800", "slug": "privacy", "title": "Privacy" }

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.replaceOneById",
  "params": {
    "id": "1920438291800",
    "document": { "slug": "privacy", "title": "Privacy" }
  },
  "id": 14
}

Response

{
  "jsonrpc": "2.0",
  "result": { "id": "1920438291800", "slug": "privacy", "title": "Privacy" },
  "id": 14
}

update

Batch update multiple tags in a single transaction (all-or-nothing). See Batch operations.

HTTP

Request

PATCH /v1/blog/tags
Authorization: Bearer <token>
Content-Type: application/json

{
  "items": [
    { "id": "1920438291800", "document": { "title": "Privacy & data" } },
    { "id": "1920438291801", "document": { "title": "Encryption" } }
  ]
}

Response

{
  "affected": 2,
  "items": [
    { "id": "1920438291800", "title": "Privacy & data" },
    { "id": "1920438291801", "title": "Encryption" }
  ]
}

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.update",
  "params": {
    "items": [
      { "id": "1920438291800", "document": { "title": "Privacy & data" } },
      { "id": "1920438291801", "document": { "title": "Encryption" } }
    ]
  },
  "id": 15
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "affected": 2,
    "items": [
      { "id": "1920438291800", "title": "Privacy & data" },
      { "id": "1920438291801", "title": "Encryption" }
    ]
  },
  "id": 15
}

deleteOneById

Delete a tag. The tag is automatically unlinked from all posts that had it assigned (junction rows are removed).

HTTP

Request

DELETE /v1/blog/tags/1920438291800
Authorization: Bearer <token>

Response

{ "id": "1920438291800", "title": "Privacy & data" }

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.deleteOneById",
  "params": { "id": "1920438291800" },
  "id": 16
}

Response

{
  "jsonrpc": "2.0",
  "result": { "id": "1920438291800", "title": "Privacy & data" },
  "id": 16
}

delete

Batch delete tags in a single transaction (all-or-nothing). See Batch operations.

HTTP

Request

DELETE /v1/blog/tags
Authorization: Bearer <token>
Content-Type: application/json

{
  "items": [
    { "id": "1920438291800" },
    { "id": "1920438291801" }
  ]
}

Response

{
  "affected": 2,
  "items": [
    { "id": "1920438291800" },
    { "id": "1920438291801" }
  ]
}

WebSocket

Request

{
  "jsonrpc": "2.0",
  "method": "blog.tags.delete",
  "params": {
    "items": [
      { "id": "1920438291800" },
      { "id": "1920438291801" }
    ]
  },
  "id": 17
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "affected": 2,
    "items": [
      { "id": "1920438291800" },
      { "id": "1920438291801" }
    ]
  },
  "id": 17
}