Menu

Referência da API · Organização

Pixel de rastreamento

organizations · tracking · 7 operações

GET/v1/tracking

Get the attribution pixel and its health

organizations.tracking.get

LeituraIdempotenteDesde 2026-11-01

Returns the organization's MB Suite attribution pixel: configured, enabled, public_id, snippet (the script tag to paste in the site's <head>), allowed_domains (empty = it accepts clicks from any site), installed_at (first click ever) and last_click_at (the newest recorded click), plus its health: status (healthy: clicks arrived in the last 24 hours; warn: installed but no clicks in 24 hours; never: no click ever), clicks24h (clicks of the last 24 hours) and matched24h (those matched to a CRM lead or conversation). The pixel attributes CRM leads and web form submissions to their ad campaign and UTMs. Owners and admins only (403 role_required). Cost: two counts (one read per 1,000 clicks of the last 24 hours, at least one each), the newest click and, when the first click was never recorded, the oldest.

Escopo
organizations:read
Permissão
Ver o módulo · Só owner, admin
Tool do MCP
organizations_tracking_getNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.get".

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

Parâmetros

Sem parâmetros.

Resposta

configuredboolean

True once the pixel was set up (it has a public id).

enabledboolean

True while clicks are being recorded.

public_idstring | null

The pixel's public id (mb_pub_…; it goes on the site, it is not a secret); null when not set up.

allowed_domainsarray<string>

The sites (hostnames) the pixel accepts clicks from; empty = any site.

installed_atnumber | null

The first click ever (epoch ms); null when no click arrived yet.

last_click_atnumber | null

The newest recorded click (epoch ms); null when no click arrived yet.

snippetstring | null

The script tag to paste in the <head> of every page of the site; null when not set up.

statusenum

healthy: clicks arrived in the last 24 hours; warn: installed but no clicks in 24 hours; never: no click ever.

Valores: healthy, warn, never

clicks24hnumber

Clicks recorded in the last 24 hours.

matched24hnumber

Clicks of the last 24 hours matched to a CRM lead or conversation.

Erros

Exemplo

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

Turn on the attribution pixel

organizations.tracking.enable

EscritaIdempotenteDesde 2026-11-01

Turns on the organization's attribution pixel. The first time it creates the public id (created: true) and returns the snippet to paste in the <head> of every page of the site (or in a Custom HTML tag of Google Tag Manager); after that it turns it back on with the same id and snippet. Clicks start being recorded as soon as the snippet is on the site; check it with organizations.tracking.verify. Idempotent. Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

Instruções para agentes

Give the person the snippet and tell them it goes in the <head> of every page (or a GTM Custom HTML tag); offer organizations.tracking.send_instructions to email it to their developer.

Escopo
organizations:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
organizations_tracking_enableNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.enable".

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

Parâmetros

Sem parâmetros.

Resposta

trackingobject
createdboolean

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/tracking/enable" \
  -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 POST "https://api.mb-suite.com/v1/tracking/enable" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/tracking/disable

Turn off the attribution pixel

organizations.tracking.disable

EscritaIdempotenteDesde 2026-11-01

Turns off the attribution pixel: the site keeps loading the script but clicks are no longer recorded, so new leads arrive without ad attribution. Nothing is deleted (the id, the snippet, the allowed domains and the recorded clicks stay); organizations.tracking.enable turns it back on. Idempotent. 409 tracking_not_configured when the pixel was never set up. Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

Escopo
organizations:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
organizations_tracking_disableNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.disable".

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

Parâmetros

Sem parâmetros.

Resposta

trackingobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/tracking/disable" \
  -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 POST "https://api.mb-suite.com/v1/tracking/disable" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/tracking/rotate-id

Replace the pixel's public id

organizations.tracking.rotate_id

IrreversívelDesde 2026-11-01

Replaces the pixel's public id: the old id stops working at once, so the site records no clicks until its snippet is replaced with the new one (returned in tracking.snippet), and the installation signal starts over (installed_at, last_click_at). Use it only when the id was copied to a site that should not have it. It cannot be undone: outside the app it runs as a dry run first and needs the confirm_token. 409 tracking_not_configured when the pixel was never set up. Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

Instruções para agentes

Before confirming, tell the person the site stops recording clicks until the new snippet is installed.

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

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

Parâmetros

Sem parâmetros.

Resposta

trackingobject

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/tracking/rotate-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.

curl -X POST "https://api.mb-suite.com/v1/tracking/rotate-id" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/tracking/verify

Check that the pixel is installed on a page

organizations.tracking.verify

EscritaIdempotenteDesde 2026-11-01

Downloads a page of the site (url; https:// is added when missing; up to 8 seconds and 1.5 MB, following safe redirects; private and local addresses are refused) and checks that the pixel's snippet is there with this organization's id: ok, snippet_present, public_id_match, observed_public_id (when the page has another organization's id), final_url and, when it fails, error (invalid_url, private_address, fetch_failed, non_ok_status, body_too_large, snippet_not_found, publicid_mismatch, redirect_blocked) and the HTTP status. It changes nothing. A page that loads the pixel through Google Tag Manager shows snippet_not_found here even if it works: check organizations.tracking.get for recent clicks. 409 tracking_not_configured when the pixel was never set up. Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

Escopo
organizations:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
organizations_tracking_verifyNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.verify".

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

Parâmetros

urlstringcorpoobrigatório

A page of the site where the snippet should be (https:// is added when missing). Private and local addresses are rejected.

Resposta

okboolean
snippet_presentboolean
public_id_matchboolean
final_urlstring
observed_public_idstring
errorstring
statusnumber

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/tracking/verify" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "url": "URL"
}'

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/tracking/verify" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "url": "URL"
}'
POST/v1/tracking/send-instructions

Email the pixel's install instructions

organizations.tracking.send_instructions

EscritaDesde 2026-11-01

Emails the pixel's snippet and the step-by-step install guide (in the sender's language, signed with their name, with an optional note) to up to 5 people, typically the site's developer: invalid and repeated addresses are dropped. Returns sent_to and failed. It sends real emails (not idempotent: repeating it emails them again). 400 no_valid_recipients when no address is valid; 409 tracking_not_configured when the pixel was never set up; when nothing could be sent, the email provider's error (409 external_rejected, 409 external_outcome_unknown, 429 external_rate_limited or 503 external_unavailable). Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

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
organizations:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
organizations_tracking_send_instructionsNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.send_instructions".

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

Parâmetros

emailsarray<string>corpoobrigatório

Who receives the snippet and the install guide (typically the site's developer). Invalid and repeated addresses are dropped and at most 5 are used.

notestringcorpoopcional

An optional note for the recipients (up to 1000 characters).

Resposta

sent_toarray<string>
failedarray<string>

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/tracking/send-instructions" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": [
    "ana@example.com"
  ],
  "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/tracking/allowed-domains

Set the sites the pixel accepts

organizations.tracking.allowed_domains.set

EscritaIdempotenteDesde 2026-11-01

Replaces the list of sites (hostnames) the pixel accepts clicks from: a click from any other site is ignored. Protocol, www. and trailing slashes are stripped, invalid names are dropped and at most 50 are kept; an empty list accepts every site (permissive mode, the default). Returns the pixel with the saved list. Idempotent. 409 tracking_not_configured when the pixel was never set up. Owners and admins of the organization or of its workspace only (403 role_required). Runs from the app and MIA; API keys and apps can read the pixel but not change it yet.

Escopo
organizations:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
organizations_tracking_allowed_domains_setNa superfície completa; na compacta, mb_execute_operation com id: "organizations.tracking.allowed_domains.set".

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

Parâmetros

domainsarray<string>corpoobrigatório

The hostnames the pixel accepts clicks from (example.com; protocol, www. and trailing slash are stripped; invalid ones dropped; at most 50). An empty list accepts every site (permissive mode). Replaces the whole list.

Resposta

trackingobject

Erros

Exemplo

curl -X PATCH "https://api.mb-suite.com/v1/tracking/allowed-domains" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "domains": [
    "DOMAIN"
  ]
}'

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/tracking/allowed-domains" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "domains": [
    "DOMAIN"
  ]
}'