Menu

Referência da API · CRM

Calendário

crm · calendar · 7 operações

GET/v1/crm/calendar/vendors

List the sellers whose calendar you can see

crm.calendar.vendors.list

LeituraIdempotenteDesde 2026-11-01

Lists the sellers of the organization with a Google or Outlook calendar connected that the caller can see (their own; owners and admins see all; colleagues depending on each seller's sharing: open, private or custom), with providers, sharing settings, overlay color, the last good sync, the state of the sync in words (sync_status ok, failing, stale or never; sync_status_text) and the raw error of a failing one. Their user_id is the vendor_user_id of the calendar operations. Read-only.

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

Custo declarado: até 400 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/calendar/vendors" \
  -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/calendar/vendors" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/calendar/events

List calendar events and bookings in a time window

crm.calendar.events.list

LeituraIdempotenteE-mail e calendário conectadosDesde 2026-11-01

For API keys and third-party apps this operation exists only when the organization's owner allows connected calendar content and the credential was granted it; even then it reads only the calendar of the user the credential acts as (other vendor_user_ids are not found) and returns only the events whose organizer or attendees include a CRM person or company (plus the CRM bookings), never the whole calendar; busy-only (masked) events are omitted for them. Returns the events of one or more sellers' Google or Outlook calendars (mirrored in MB Suite) and their confirmed CRM bookings between start_ms and end_ms (ms UTC, at most 62 days; default seller: the caller). Calendars a seller does not share with the caller are skipped; when they share only busy/free, their events come masked (summary '__masked__', masked: true, no attendees). Bookings come in their own list (their calendar event is not repeated) and never include the booker's cancel/reschedule tokens; a booking's booker_email is an empty string when an AI Setter booked without the person's email (reach them by booker_phone).

Só se a organização permitir e a credencial tiver isso concedido; devolve só o vinculado ao CRM da própria caixa. E-mail e calendário conectados

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

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

Parâmetros

start_msintegerqueryobrigatório

Window start, epoch ms.

end_msintegerqueryobrigatório

Window end, epoch ms (at most 62 days after start_ms).

vendor_user_idsarray<string>queryopcional

Sellers (user ids from crm.calendar.vendors.list), up to 50; default: the caller.

Resposta

eventsarray<object>
bookingsarray<object>

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/calendar/events?start_ms=0&end_ms=0" \
  -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/calendar/events?start_ms=0&end_ms=0" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/calendar/events

Create a calendar event or schedule a meeting

crm.calendar.events.create

EscritaDesde 2026-11-01

Creates an event in a seller's Google or Outlook calendar (default: the caller's; another seller's only for an owner or admin, and only if they allow admin edits) with optional location, attendees (they get the invitation) and a Meet/Teams link (with_meet). With meeting it schedules a meeting with a CRM record instead: the event goes to the caller's own calendar with a video link by default, a 'meeting' activity is logged on the deal, person, company or prospect (and the records linked to it) and the deals' last activity moves. Needs a connected calendar (integration_not_connected otherwise); when the provider does not confirm the creation it answers external_outcome_unknown (the event may exist: look at the calendar before creating it again). Returns the event_id that crm.calendar.events.update and delete take. Requires manage_own_calendar_events / manage_any_calendar_events, or create_activity for a meeting.

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
Permissão
Editar no módulo
Tool do MCP
crm_calendar_events_createNa superfície completa; na compacta, mb_execute_operation com id: "crm.calendar.events.create".
Eventos que pode emitir
crm.activity.created

Custo declarado: até 20 leituras e 10 escritas por chamada (contam na cota diária). Usa uma plataforma externa (google): conta na cota de operações externas.

Parâmetros

summarystringcorpoobrigatório

The event's title (a meeting's, up to 300 characters).

start_msintegercorpoobrigatório

Start, epoch ms.

end_msintegercorpoobrigatório

End, epoch ms.

time_zonestringcorpoobrigatório

IANA time zone of the event (America/Argentina/Buenos_Aires).

vendor_user_idstringcorpoopcional

The seller whose calendar it is (user_id from crm.calendar.vendors.list); default: the caller. A meeting always goes to the caller's own calendar.

descriptionstringcorpoopcional

The event's description.

locationstringcorpoopcional

Where it is.

attendeesarray<object>corpoopcional

Up to 50 attendees: each one gets the invitation.

with_meetbooleancorpoopcional

Add a Google Meet / Teams link (default: no for an event, yes for a meeting).

providerenumcorpoopcional

google or microsoft (Outlook): only when the seller has both connected; default: the one of the mirrored event or the seller's connection.

Valores: google, microsoft

meetingobjectcorpoopcional

Schedule a meeting with a CRM record: besides the event, a 'meeting' activity is logged on it.

Resposta

event_idstring
html_linkstring
meet_linkstring
activity_idstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/calendar/events" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "summary": "SUMMARY",
  "start_ms": 0,
  "end_ms": 0,
  "time_zone": "TIME_ZONE",
  "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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.

PATCH/v1/crm/calendar/events/{event_id}

Move, resize or edit a calendar event

crm.calendar.events.update

EscritaDesde 2026-11-01

Updates an event of a seller's Google or Outlook calendar (default: the caller's), by its event_id (the one crm.calendar.events.create returned, or, for a credential with connected calendar content, the one of crm.calendar.events.list). start_ms + end_ms move it (it checks free/busy first and answers slot_conflict on an overlap, unless skip_conflict_check); end_ms alone changes its duration; summary, description, location or attendees edit its details. time_zone is required when the time changes. A booking's event is moved with crm.bookings.reschedule instead. Another seller's calendar only for an owner or admin, and only if they allow admin edits. Requires manage_own_calendar_events / manage_any_calendar_events.

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
Permissão
Editar no módulo
Tool do MCP
crm_calendar_events_updateNa superfície completa; na compacta, mb_execute_operation com id: "crm.calendar.events.update".

Custo declarado: até 6 leituras e 1 escritas por chamada (contam na cota diária). Usa uma plataforma externa (google): conta na cota de operações externas.

Parâmetros

event_idstringrotaobrigatório

The event's id in Google or Outlook: event_id of crm.calendar.events.create, or id of crm.calendar.events.list (when the credential has connected content).

vendor_user_idstringcorpoopcional

The seller whose calendar it is (user_id from crm.calendar.vendors.list); default: the caller.

providerenumcorpoopcional

google or microsoft (Outlook): only when the seller has both connected; default: the one of the mirrored event or the seller's connection.

Valores: google, microsoft

start_msintegercorpoopcional

New start, epoch ms (with end_ms: it moves the event).

end_msintegercorpoopcional

New end, epoch ms (alone: it changes the duration).

time_zonestringcorpoopcional

IANA time zone; required when the time changes.

skip_conflict_checkbooleancorpoopcional

Move it without checking overlaps with other events (default: answers slot_conflict).

summarystringcorpoopcional

New title.

descriptionstringcorpoopcional

New description.

locationstringcorpoopcional

New location.

attendeesarray<object>corpoopcional

The whole new list of attendees.

Resposta

oktrue

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/calendar/events/{event_id}" \
  -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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.

DELETE/v1/crm/calendar/events/{event_id}

Delete a calendar event

crm.calendar.events.delete

IrreversívelDesde 2026-11-01

Deletes an event from a seller's Google or Outlook calendar (default: the caller's) and its mirror in MB Suite, by its event_id (from crm.calendar.events.create or, with connected calendar content, crm.calendar.events.list); the attendees get the provider's cancellation. The dry run says whether the event is in MB Suite's mirror (validated false when it is not: it may not exist). A copy (title, time, attendees) stays 30 days in the trash for reference, without automatic restore: the event no longer exists in the provider. To cancel a booking use crm.bookings.cancel. Another seller's calendar only for an owner or admin, and only if they allow admin edits. Requires manage_own_calendar_events / manage_any_calendar_events.

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_calendar_events_deleteNa superfície completa; na compacta, mb_execute_operation com id: "crm.calendar.events.delete".

Custo declarado: até 6 leituras e 2 escritas por chamada (contam na cota diária). Usa uma plataforma externa (google): conta na cota de operações externas.

Parâmetros

event_idstringrotaobrigatório

The event's id in Google or Outlook: event_id of crm.calendar.events.create, or id of crm.calendar.events.list (when the credential has connected content).

vendor_user_idstringcorpoopcional

The seller whose calendar it is (user_id from crm.calendar.vendors.list); default: the caller.

providerenumcorpoopcional

google or microsoft (Outlook): only when the seller has both connected; default: the one of the mirrored event or the seller's connection.

Valores: google, microsoft

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/crm/calendar/events/{event_id}" \
  -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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.

PATCH/v1/crm/calendar/sharing/{vendor_user_id}

Change who sees a seller's calendar

crm.calendar.sharing.update

EscritaIdempotenteDesde 2026-11-01

Updates a seller's calendar sharing inside MB Suite: who sees it (view_mode open, private, or custom with allowed_user_ids), how much colleagues see (view_details_mode all, crm_related or busy_only), whether owners and admins may edit it (allow_admin_edit) and its overlay color. Fields left out keep their value. The seller and allowed_user_ids must be people with access to the organization (vendor_not_found, recipient_without_access). Own calendar: requires manage_own_booking; another seller's: owner, admin or CRM admin only.

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

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

Parâmetros

vendor_user_idstringrotaobrigatório

The seller whose calendar sharing changes: a person with access to the organization (crm.calendar.vendors.list or crm.team.list).

view_modeenumcorpoopcional

Who sees it: open (every colleague), private (only the seller, owners and admins) or custom (allowed_user_ids).

Valores: open, private, custom

allowed_user_idsarray<string>corpoopcional

With view_mode custom: who sees it, up to 200 people with access to the organization.

view_details_modeenumcorpoopcional

How much colleagues see: all, crm_related (only events with CRM contacts) or busy_only (free/busy).

Valores: all, crm_related, busy_only

allow_admin_editbooleancorpoopcional

Whether owners and admins may edit this calendar.

calendar_colorstringcorpoopcional

Overlay color in the shared calendar, #rrggbb.

Resposta

oktrue

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/crm/calendar/sharing/{vendor_user_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 PATCH "https://api.mb-suite.com/v1/crm/calendar/sharing/{vendor_user_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/crm/calendar/sync

Sync a seller's calendar now

crm.calendar.sync

EscritaDesde 2026-11-01

Pulls the latest changes of a seller's connected Google and/or Outlook calendars into MB Suite right away (the mirror also syncs by itself every few minutes). Anyone who can see that calendar may run it; there is a short cooldown between runs (cooldown_active with retry_after). Returns the events upserted and deleted; error carries the first provider failure, if any, while the other providers still applied.

Escopo
crm:write
Permissão
Ver o módulo
Tool do MCP
crm_calendar_syncNa superfície completa; na compacta, mb_execute_operation com id: "crm.calendar.sync".

Custo declarado: até 200 leituras e 500 escritas por chamada (contam na cota diária). Usa uma plataforma externa (google): conta na cota de operações externas.

Parâmetros

vendor_user_idstringcorpoobrigatório

The seller whose calendar syncs (user_id from crm.calendar.vendors.list).

Resposta

upsertednumber
deletednumber
providersarray<enum>

Valores: google, microsoft

errorstring

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/crm/calendar/sync" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "vendor_user_id": "VENDOR_USER_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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.