Tag groups
Search Tag Groups
read-onlyidempotentopen-worldPublic visibility-filtered tag-group search. q and names combine with AND semantics; upstream treats % and _ in q as SQL LIKE wildcards. Results intentionally omit group IDs, parent tags, and permissions and are not authoritative staff inventory. Exact case-insensitive group name is the supported correlation key. Always sends an explicit limit and reports possible truncation.
Parameters
qstringnamesArray<string>limitinteger[1, 1000]100Returns
resultsArray<object>requiredmetaobjectrequiredList Tag Groups
read-onlyidempotentopen-worldAuthoritative unpaginated tag-group inventory ordered by name. Requires a locally configured API credential and upstream staff authority; Discourse returns a privacy-preserving 404 to non-staff. Staff reads can work when tagging is disabled. Returns canonical tags, parent, one-per-topic, explicit permissions entries ({group_id, access}; group_id 0 is everyone), and optimistic state hashes.
Returns
tag_ groupsArray<object>requiredGet Tag Group
read-onlyidempotentopen-worldGet authoritative tag-group state by ID. Requires a locally configured API credential and upstream staff authority. The deterministic state_hash is an MCP optimistic precondition, not an upstream atomic lock; a race remains possible after preflight.
Parameters
idintegerrequiredReturns
tag_ groupobjectrequiredwarningsArray<string>Create Tag Group
open-worldCreate a tag group with an explicit complete permission list such as permissions: [{group_id: 0, access: "full"}] for everyone, nonempty members, an optional parent selector, and one-per-topic policy. Omit parent_tag or use null when there is no parent; blank placeholders are safely treated as omitted. New tag names require allow_tag_creation=true because they create persistent tags and trigger normal indexing/plugin hooks. Duplicate-name and ID checks are advisory; upstream staff authority, tagging_enabled, and constraints remain authoritative.
Body
namestringrequiredtagsArray<object>requiredparent_ tagobject | nullOptional parent tag selector. Omit or use null when there is no parent; blank string placeholders are treated as omitted.
one_ per_ topicbooleanfalsepermissionsArray<object>requiredComplete tag-group permission list. Use [{"group_id":0,"access":"full"}] for everyone with full access.
allow_ tag_ creationbooleanfalseReturns
tag_ groupobjectrequiredwarningsArray<string>Update Tag Group
destructiveopen-worldSafely replace complete tag-group state after a fresh expected_state_hash preflight. Omitted mutable fields are preserved locally, but Discourse receives full tags, parent, one-per-topic, and permissions because partial upstream bodies clear state. For parent_tag, omit or pass a blank placeholder to preserve the current parent; pass null to clear it. Permissions use explicit {group_id, access} entries; group_id 0 means everyone. Tag/parent removals, permission replacement, and possible materialization of serializer-synthesized everyone/full permissions require explicit acknowledgements. The hash is advisory rather than an upstream atomic lock; uncertain post-dispatch outcomes must not be retried blindly.
Body
idintegerrequiredexpected_ state_ hashstringrequirednamestringtagsArray<object>parent_ tagobject | nullOptional parent tag selector. Omit or use null when there is no parent; blank string placeholders are treated as omitted.
one_ per_ topicbooleanpermissionsArray<object>Complete tag-group permission list. Use [{"group_id":0,"access":"full"}] for everyone with full access.
allow_ tag_ creationbooleanfalseconfirm_ tag_ removalbooleanfalseconfirm_ parent_ removalbooleanfalseconfirm_ permission_ replacementbooleanfalseacknowledge_ possible_ synthetic_ permission_ materializationbooleanfalseReturns
tag_ groupobjectrequiredwarningsArray<string>Delete Tag Group
destructiveopen-worldPermanently delete one exact tag group after fresh name/state-hash checks and explicit acknowledgements for category relationship cascades and unresolved plugin dependencies. Deletion removes memberships, permissions, and category allowed/required relationships, but not tags or topic-tag rows. Dependency discovery is not exhaustive (plugins such as RSS polling may depend on groups). Scoped API keys may not include this delete route. A 200 response is only dispatch acknowledgement; absence is verified before success.
Parameters
idintegerrequirednamestringrequiredexpected_ state_ hashstringrequiredconfirm_ deletebooleanrequiredacknowledge_ category_ relationship_ removalbooleanrequiredacknowledge_ unresolved_ plugin_ dependenciesbooleanrequiredReturns
deletedbooleanrequiredidintegerrequirednamestringrequiredimpactobjectrequired