Menu

Referência da API · CRM

Atribuição

crm · attribution · 4 operações

GET/v1/crm/attribution/facets

List which attribution fields have data on the deals

crm.attribution.facets

LeituraIdempotenteDesde 2026-11-01

Tells which attribution fields are filled on the deals (count per field: platform, campaignName, adsetName, adName, formName, utmSource, utmCampaign, keyword, attributionMethod, matchConfidence, click ids…) with up to 200 distinct values each and their display label, plus the distinct countries and product lines. Use it before crm.analytics.pivot to choose attr.* dimensions and filter values that actually exist. Members without view_all_performance only see their own deals. Scans up to 30,000 deals. Through the API and the MCP it depends on the terms of LinkedIn: where they do not allow it, it answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Escopo
crm:read
Permissão
Ver o módulo · Ação do CRM: view_performance
Tool do MCP
crm_attribution_facetsNa superfície completa; na compacta, mb_execute_operation com id: "crm.attribution.facets".

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

Parâmetros

Sem parâmetros.

Resposta

total_dealsnumber
deals_with_attributionnumber
fieldsobject
deal_fieldsobject
truncatedboolean

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/attribution/facets" \
  -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/attribution/facets" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/attribution/ctwa

Click-to-WhatsApp attribution by Meta ad

crm.attribution.ctwa

LeituraIdempotenteDesde 2026-11-01

Click-to-WhatsApp attribution for a period of at most 400 days: per Meta ad (with campaign and placement), the WhatsApp conversations it started (leads), the deals created from meta_ads and how many were won, plus totals and conversion rate (won / leads); optionally for one pipeline. These are org-wide aggregates, exactly as in the app (no per-seller scoping). Up to 30,000 conversations and 30,000 deals are scanned; truncated: true means partial numbers. Ad spend is not included.

Escopo
crm:read
Permissão
Ver o módulo · Ação do CRM: view_performance
Tool do MCP
crm_attribution_ctwaNa superfície completa; na compacta, mb_execute_operation com id: "crm.attribution.ctwa".

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

Parâmetros

startintegerqueryobrigatório

Start of the date range, epoch ms (UTC).

endintegerqueryobrigatório

End of the date range, epoch ms (UTC), not before start.

pipeline_idstringqueryopcional

Only the deals of this pipeline (Pipeline id from crm.pipelines.list.).

Resposta

total_leadsnumber
total_dealsnumber
total_wonnumber
conversion_ratenumber
by_adarray<object>
truncatedboolean

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/attribution/ctwa?start=0&end=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/attribution/ctwa?start=0&end=0" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/attribution/web-tracking

MB Suite Pixel attribution by source and campaign

crm.attribution.web_tracking

LeituraIdempotenteDesde 2026-11-01

MB Suite Pixel (web tracking) attribution for a period of at most 400 days: the website leads matched in the period (WhatsApp conversations paired with a click on the site and submissions of the organization's Web Forms, one lead each) grouped by platform, source and campaign, with the deals those leads generated and how many were won, paid vs organic (is_paid: an ad click id or a paid utm_medium), average match score (see match_score_avg) and counts by match confidence. A deal counts once, in the group of the first lead of the period that generated it (a prospect counts when converted; a merged deal counts as the deal it was merged into); archived deals, and the earlier deal a returning contact lands in, are left out. pipeline_id narrows the deals, not the leads. min_confidence drops weaker matches (default low = all). Org-wide aggregates, as in the app. Clicks are kept 90 days. Up to 30,000 clicks are scanned and the prospects and deals they point to are read by id; truncated: true means partial numbers. With LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their records are left out of the response (the permissions guide lists what each platform allows).

Escopo
crm:read
Permissão
Ver o módulo · Ação do CRM: view_performance
Tool do MCP
crm_attribution_web_trackingNa superfície completa; na compacta, mb_execute_operation com id: "crm.attribution.web_tracking".

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

Parâmetros

startintegerqueryobrigatório

Start of the date range, epoch ms (UTC).

endintegerqueryobrigatório

End of the date range, epoch ms (UTC), not before start.

pipeline_idstringqueryopcional

Only the deals of this pipeline (Pipeline id from crm.pipelines.list.).

min_confidenceenumqueryopcional

Minimum confidence of the click → lead match: high, medium or low (default, every match). A web form submission is always high.

Valores: high, medium, low

Resposta

total_leadsnumber
total_dealsnumber
total_wonnumber
conversion_ratenumber
by_grouparray<object>
truncatedboolean

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/attribution/web-tracking?start=0&end=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/attribution/web-tracking?start=0&end=0" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/crm/attribution/revenue

Revenue of won deals by channel or attribution hierarchy

crm.attribution.revenue

LeituraIdempotenteDesde 2026-11-01

Revenue of the deals WON in a period of at most 400 days, converted to the org's display currency with the exchange rate of each win date: view by_channel groups it by origin channel (google, meta, tiktok, linkedin, whatsapp, web, booking, manual, csv, generic, other); view hierarchy returns flat rows channel → lead source → campaign with attribution method, match confidence and web traffic type, under the first-touch (default) or last-touch model. Each group carries up to 50 deal references (each with its own value and currency). Optional pipeline_id and owner_id; members without view_all_performance only get their own deals. Ad spend and ROAS are not included (they query the ad platforms). With Google Ads, LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted, and their records are left out of the response (the permissions guide lists what each platform allows).

Escopo
crm:read
Permissão
Ver o módulo · Ação do CRM: view_performance
Tool do MCP
crm_attribution_revenueNa superfície completa; na compacta, mb_execute_operation com id: "crm.attribution.revenue".

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

Parâmetros

startintegerqueryobrigatório

Start of the date range, epoch ms (UTC).

endintegerqueryobrigatório

End of the date range, epoch ms (UTC), not before start.

viewenumqueryopcional

by_channel (default): won revenue per channel with its deals; hierarchy: channel → lead source → campaign with method and confidence.

Valores: by_channel, hierarchy · Padrão: "by_channel"

modelenumqueryopcional

hierarchy view: credit the first (default) or the last touch with evidence.

Valores: first, last · Padrão: "first"

pipeline_idstringqueryopcional

Only the deals of this pipeline (Pipeline id from crm.pipelines.list.).

owner_idstringqueryopcional

Only the records of this owner: a user_id from crm.team.list.

Resposta

Um objeto JSON em snake_case.

Erros

Exemplo

curl "https://api.mb-suite.com/v1/crm/attribution/revenue?start=0&end=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/attribution/revenue?start=0&end=0" \
  -H "Authorization: Bearer $MB_TEST_KEY"