Menu

Referência da API · Membros

Funções

members · management_roles · 4 operações

GET/v1/members/management-roles

List management roles (cargos)

members.management_roles.list

LeituraIdempotenteDesde 2026-11-01

Lists the organization's management roles in display order (name, color, order): the «cargos» (Sponsor, Paid Media Manager…) that label agency people on each Account they are assigned to and on the team cards, and that pre-fill when a member is assigned to an Account (members.members.set_management_role). They do not change access. The catalog that labels the agency team on an Account is the workspace's: read it there. Requires view access to Members.

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

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

Parâmetros

Sem parâmetros.

Resposta

dataarray<object>

Erros

Exemplo

curl "https://api.mb-suite.com/v1/members/management-roles" \
  -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/members/management-roles" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/members/management-roles

Create a management role (cargo)

members.management_roles.create

EscritaDesde 2026-11-01

Creates a management role with a name (up to 80 characters) and an optional hex color (without it, the next color of the app's palette). It goes last in the order. Give it to members as their default with members.members.set_management_role, or per Account in members.members.update_assignments. Returns the role. Owner or admin only.

Escopo
members:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
members_management_roles_createNa superfície completa; na compacta, mb_execute_operation com id: "members.management_roles.create".

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

Parâmetros

namestringcorpoobrigatório

Its name.

colorstringcorpoopcional

Its color (#rrggbb); without it, the next one of the app's palette.

Resposta

role_idstring
roleobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/members/management-roles" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME"
}'

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/members/management-roles" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME"
}'
PATCH/v1/members/management-roles/{role_id}

Update a management role (cargo)

members.management_roles.update

EscritaIdempotenteDesde 2026-11-01

Updates a management role's name, color or position in the list, all inside updates: order is the position (0 = first; past the end = last) and the other roles shift to make room. Unknown fields are rejected. 404 management_role_not_found if it is not in this organization. Returns the role. Owner or admin only.

Escopo
members:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
members_management_roles_updateNa superfície completa; na compacta, mb_execute_operation com id: "members.management_roles.update".

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

Parâmetros

role_idstringrotaobrigatório

A management role id (members.management_roles.list).

updatesobjectcorpoobrigatório

What changes (name, color and/or order).

Resposta

roleobject

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/members/management-roles/{role_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/members/management-roles/{role_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
DELETE/v1/members/management-roles/{role_id}

Delete a management role (cargo)

members.management_roles.delete

IrreversívelDesde 2026-11-01

Deletes a management role and clears it from every member that had it, as their default and in their assigned Accounts (the assignments themselves stay), in one write. The role stays 30 days in the trash, where an owner or admin can restore it (platform.trash.restore); restoring puts it back on those members, except where another role was set in the meantime. Outside the app it needs a dry run and a confirm_token, except a REST DELETE with a key allowed to delete. 404 management_role_not_found. Owner or admin only.

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
members:write e «Permitir exclusões» (members:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
members_management_roles_deleteNa superfície completa; na compacta, mb_execute_operation com id: "members.management_roles.delete".

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

Parâmetros

role_idstringrotaobrigatório

A management role id (members.management_roles.list).

Resposta

oktrue
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/members/management-roles/{role_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/members/management-roles/{role_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"