Menu

Referência da API · Knowledge Base

Tags

knowledge_base · tags · 4 operações

GET/v1/knowledge-base/tags

List Knowledge Base tags

knowledge_base.tags.list

LeituraIdempotenteDesde 2026-11-01

Lists the tags used to classify Knowledge Base articles (name, hex color, order), in the order the app shows them, up to 200. Use their ids in tag_ids when creating or updating articles, in knowledge_base.items.bulk.update_tags, and to filter knowledge_base.items.list by tag_id. Requires view access to the Knowledge Base.

Escopo
knowledge_base:read
Permissão
Ver o módulo
Tool do MCP
knowledge_base_tags_listNa superfície completa; na compacta, mb_execute_operation com id: "knowledge_base.tags.list".

Custo declarado: até 200 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

Sem parâmetros.

Resposta

dataarray<object>
has_morefalse

Always false: every tag comes in one page.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/knowledge-base/tags" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/knowledge-base/tags" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/knowledge-base/tags

Create a Knowledge Base tag

knowledge_base.tags.create

EscritaDesde 2026-11-01

Creates a tag with a name (up to 100 characters) and a hex color (#rrggbb or #rgb), placed last in the order. Names do not repeat inside an organization, ignoring case and accents: an existing name is 409 kb_tag_name_taken with existing_tag_id (use that tag). Up to 200 tags per organization (409 limit_reached, details.resource kb_tags). Returns the tag with its id. Requires full access to the Knowledge Base.

Escopo
knowledge_base:write
Permissão
Editar no módulo
Tool do MCP
knowledge_base_tags_createNa superfície completa; na compacta, mb_execute_operation com id: "knowledge_base.tags.create".

Custo declarado: até 201 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

namestringcorpoobrigatório

The tag's name.

colorstringcorpoobrigatório

A hex color, #rrggbb.

Resposta

tag_idstring
tagobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/knowledge-base/tags" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "color": "COLOR"
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X POST "https://api.mb-suite.com/v1/knowledge-base/tags" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME",
  "color": "COLOR"
}'
PATCH/v1/knowledge-base/tags/{tag_id}

Rename, recolor or move a Knowledge Base tag

knowledge_base.tags.update

EscritaIdempotenteDesde 2026-11-01

Changes the name, the color (#rrggbb or #rgb) or the position (order) of a tag, sent inside updates; the articles that have it keep it. A name already used by another tag is 409 kb_tag_name_taken. Idempotent: sending what the tag already has changes nothing (changed: false). Returns the tag. Requires full access.

Escopo
knowledge_base:write
Permissão
Editar no módulo
Tool do MCP
knowledge_base_tags_updateNa superfície completa; na compacta, mb_execute_operation com id: "knowledge_base.tags.update".

Custo declarado: até 202 leituras e 1 escritas por chamada (contam na cota diária).

Parâmetros

tag_idstringrotaobrigatório

The tag's id (from knowledge_base.tags.list).

updatesobjectcorpoobrigatório

The fields to change.

Resposta

tagobject
changedboolean

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/knowledge-base/tags/{tag_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X PATCH "https://api.mb-suite.com/v1/knowledge-base/tags/{tag_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
DELETE/v1/knowledge-base/tags/{tag_id}

Delete a Knowledge Base tag

knowledge_base.tags.delete

IrreversívelDesde 2026-11-01

Deletes a tag and removes it from every article that has it (the articles themselves are not touched otherwise). The tag stays 30 days in the trash; restoring it brings the tag back and puts it back on all the articles that had it and still exist. Up to 5,000 articles: with more, the deletion stops before writing anything with 409 too_many_tagged_articles (delete it from the app). Returns how many articles were updated. Outside the app it needs a dry run (which counts the articles) and a confirm_token, except a REST DELETE with a key allowed to delete. Requires full access.

Com uma API key, este DELETE roda direto: o registro fica 30 dias na lixeira e a resposta traz o seu trash_item_id. Com um token OAuth, e pelo MCP, pede dry_run → confirm_token.

Escopo
knowledge_base:write e «Permitir exclusões» (knowledge_base:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
knowledge_base_tags_deleteNa superfície completa; na compacta, mb_execute_operation com id: "knowledge_base.tags.delete".

Custo declarado: até 5002 leituras e 5001 escritas por chamada (contam na cota diária).

Parâmetros

tag_idstringrotaobrigatório

The tag's id (from knowledge_base.tags.list).

Resposta

oktrue
items_updatednumber
trash_item_idstring

The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.

trash_item_idsarray<string>

Only when the deletion left more than one copy: all of them, the first being trash_item_id.

trash_expires_atnumber

When the copy leaves the trash for good (epoch ms): 30 days after the deletion.

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/knowledge-base/tags/{tag_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/knowledge-base/tags/{tag_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"