Menu

Referência da API · CRM

Equipe

crm · team · 7 operações

GET/v1/crm/team

List the CRM team (sellers and AI agents)

crm.team.list

LeituraIdempotenteDesde 2026-11-01

Lists the CRM team in display order: the organization members added as sellers (kind human), with their CRM role (sales_rep, sales_manager or crm_admin), name, email and photo, and the AI agents (kind ai_agent) that can own records, with whether their position is enabled. The user_id is what deals, persons, companies and prospects take as owner_id. Each entry also carries the seller scope stored for it (scope own or all, blocked and read-only pipelines). Email signatures are not included. Org owners and admins act as CRM admins even when they are not on the list.

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

Custo declarado: até 201 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/crm/team" \
  -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/crm/team" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/team/available-members

List org members who can join the CRM team

crm.team.available_members

LeituraIdempotenteDesde 2026-11-01

Lists the organization members who are not in the CRM team yet and can be added with crm.team.add, with user_id, profile name (empty when they never set one), email, organization role and photo. Viewers are left out: they cannot operate the CRM.

Escopo
crm:read
Permissão
Ver o módulo
Tool do MCP
crm_team_available_membersNa superfície completa; na compacta, mb_execute_operation com id: "crm.team.available_members".

Custo declarado: até 200 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/crm/team/available-members" \
  -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/crm/team/available-members" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/team

Add an org member to the CRM team

crm.team.add

EscritaDesde 2026-11-01

Adds an organization member (not a viewer) to the CRM team with a CRM role: sales_rep (works their own records; limited by the seller scope when the org enforces it), sales_manager (operates the whole team's records) or crm_admin (also configures the CRM). Use crm.team.available_members to find who can be added. The seller scope starts turned off, also for a new team: turn it on with crm.settings.seller_scope.update. Only owners, admins and CRM admins can manage the team.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_team_addNa superfície completa; na compacta, mb_execute_operation com id: "crm.team.add".

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

Parâmetros

user_idstringcorpoobrigatório

The organization member to add, from crm.team.available_members.

crm_roleenumcorpoobrigatório

CRM role: sales_rep (works their own records; limited by the seller scope when enforced), sales_manager (the whole team's records) or crm_admin (also configures the CRM).

Valores: sales_rep, sales_manager, crm_admin

Resposta

user_idstring
crm_roleenum

Valores: sales_rep, sales_manager, crm_admin

ordernumber
added_atnumber
added_by_idstring
kindenum

Valores: human, ai_agent

scopeenum

Valores: all, own

blocked_pipeline_idsarray<string>
read_only_pipeline_idsarray<string>

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/team" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "user_id": "USER_ID",
  "crm_role": "sales_rep"
}'

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/crm/team" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "user_id": "USER_ID",
  "crm_role": "sales_rep"
}'
POST/v1/crm/team/{user_id}/remove

Remove a seller from the CRM team

crm.team.remove

IrreversívelIdempotenteDesde 2026-11-01

Removes a user from the CRM team: they are no longer offered as an owner in the CRM pickers and are taken out of every mailbox's custom privacy list; their email signatures, stored on their team entry, are deleted. Their deals, persons and prospects keep them as owner (reassign them first if needed), and assignment rules that list them as a participant keep them until edited with crm.assignment_rules.update. It does not go to the trash: add them back with crm.team.add. The dry run names them and counts the signatures that go away (crm_user_not_found when they are not in the team). Only owners, admins and CRM admins.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

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

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

Parâmetros

user_idstringrotaobrigatório

The team member's user id, from crm.team.list.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/team/{user_id}/remove" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

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/crm/team/{user_id}/remove" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
PATCH/v1/crm/team/{user_id}

Change a team member's CRM role

crm.team.update_role

EscritaIdempotenteDesde 2026-11-01

Changes the CRM role of a team member (sales_rep, sales_manager or crm_admin) and recomputes their seller scope in the same write. Returns changed: false, without writing, when they already had that role. Fails with crm_user_not_found if they are not in the team. Only owners, admins and CRM admins.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_team_update_roleNa superfície completa; na compacta, mb_execute_operation com id: "crm.team.update_role".

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

Parâmetros

user_idstringrotaobrigatório

The team member's user id, from crm.team.list.

crm_roleenumcorpoobrigatório

CRM role: sales_rep (works their own records; limited by the seller scope when enforced), sales_manager (the whole team's records) or crm_admin (also configures the CRM).

Valores: sales_rep, sales_manager, crm_admin

Resposta

changedboolean

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/team/{user_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "crm_role": "sales_rep"
}'

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/crm/team/{user_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "crm_role": "sales_rep"
}'
POST/v1/crm/team/reorder

Reorder the CRM team

crm.team.reorder

EscritaIdempotenteDesde 2026-11-01

Sets the display order of the CRM team (the Team table and the owner pickers): ordered_ids is the list of user_ids from crm.team.list in the new order, up to 500, each one once. Every id must already be in the team: otherwise nothing changes and it answers crm_user_not_found with details.missing_ids. Only owners, admins and CRM admins.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_team_reorderNa superfície completa; na compacta, mb_execute_operation com id: "crm.team.reorder".

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

Parâmetros

ordered_idsarray<string>corpoobrigatório

The team's user ids (crm.team.list) in the new order, each once, up to 500.

Resposta

oktrue

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/team/reorder" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "ordered_ids": [
    "ORDERED_ID"
  ]
}'

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/crm/team/reorder" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "ordered_ids": [
    "ORDERED_ID"
  ]
}'
POST/v1/crm/team/{user_id}/out-of-office

Mark a seller out of office, or back, in every assignment rule

crm.team.out_of_office

EscritaIdempotenteDesde 2026-11-01

Marks a seller out of office (is_out_of_office: true, optionally until oof_until in epoch milliseconds) or back, in every assignment rule where they are a participant. While out, the rules skip them when assigning new leads, and an hourly job reassigns, through the same rule, their open deals with no activity for 3 days, and clears the flag once oof_until passes. Returns how many rules changed. Anyone can set their own; someone else's requires manage_assignment.

Escopo
crm:write
Permissão
Editar no módulo
Tool do MCP
crm_team_out_of_officeNa superfície completa; na compacta, mb_execute_operation com id: "crm.team.out_of_office".

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

Parâmetros

user_idstringrotaobrigatório

The seller (user id from crm.team.list).

is_out_of_officebooleancorpoobrigatório

true marks them out of office, false back.

oof_untilintegercorpoopcional

Until when, epoch ms: the flag clears itself then.

Resposta

updated_rulesnumber

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/team/{user_id}/out-of-office" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "is_out_of_office": true
}'

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/crm/team/{user_id}/out-of-office" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "is_out_of_office": true
}'