Menú

Referencia de la API · Integraciones

Conexiones

integrations · credentials · 6 operaciones

GET/v1/integrations/credentials

List the organization's platform connections

integrations.credentials.list

LecturaIdempotenteDesde 2026-11-01

Lists the platform connections (OAuth) of the organization: its own and, in an Account, the ones it uses from its workspace (include_inherited, default true; an Account's own connection of a platform wins over the workspace's). Filter with platform. Each connection has id, platform (google_ads, google_analytics, google_search_console, google_business_profile, youtube, meta_ads, tiktok_ads, tiktok, linkedin_ads, linkedin_page, whatsapp_business), name, status (active, or error when the platform rejected the token and someone has to reconnect it in the app; auth_error says why), account (the platform account that authorized it: id, name, email), connected_by and connected_at, token_expires_at and refresh_token_expires_at (epoch ms; LinkedIn asks for a manual reconnection once a year), last_reauthorized_at, inherited (true when an Account uses its workspace's connection) with owner_org_id, and scope_status (ok, drift when permissions MB Suite now needs are missing —listed in missing_scopes, fixed with «Update permissions» in Settings → Integrations— or unknown for old connections). It never returns tokens or secrets. Mailboxes and calendars that people connect for the CRM are personal and not listed. Use it to check that a platform is connected and healthy before reading its data; which accounts each module reads is in integrations.data_sources.list. Not paginated. Requires view access to Integrations. 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).

Instrucciones para agentes

When a connection is in error or has missing_scopes, tell the person to reconnect it (or update its permissions) in Settings → Integrations: it cannot be done through the API.

Alcance
integrations:read
Permiso
Ver el módulo
Tool del MCP
integrations_credentials_listEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.list".

Costo declarado: hasta 125 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

platformenumqueryopcional

Only the connections of this platform.

Valores: google_ads, google_analytics, google_search_console, google_business_profile, youtube, meta_ads, tiktok_ads, tiktok, linkedin_ads, linkedin_page, whatsapp_business

include_inheritedbooleanqueryopcional

Include the connections an Account uses from its workspace (default true).

Por defecto: true

Respuesta

dataarray<object>
has_moreboolean
next_cursorstring

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/integrations/credentials" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl "https://api.mb-suite.com/v1/integrations/credentials" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/integrations/credentials/{credential_id}

Get one platform connection

integrations.credentials.get

LecturaIdempotenteDesde 2026-11-01

Returns one platform connection of the organization by its id (from integrations.credentials.list), or, in an Account, a connection of its workspace that it inherits. Each connection has id, platform (google_ads, google_analytics, google_search_console, google_business_profile, youtube, meta_ads, tiktok_ads, tiktok, linkedin_ads, linkedin_page, whatsapp_business), name, status (active, or error when the platform rejected the token and someone has to reconnect it in the app; auth_error says why), account (the platform account that authorized it: id, name, email), connected_by and connected_at, token_expires_at and refresh_token_expires_at (epoch ms; LinkedIn asks for a manual reconnection once a year), last_reauthorized_at, inherited (true when an Account uses its workspace's connection) with owner_org_id, and scope_status (ok, drift when permissions MB Suite now needs are missing —listed in missing_scopes, fixed with «Update permissions» in Settings → Integrations— or unknown for old connections). It never returns tokens or secrets. Errors: 404 credential_not_found (no such connection, a disconnected one, or a workspace connection this Account does not inherit). Requires view access to Integrations. With LinkedIn or TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Alcance
integrations:read
Permiso
Ver el módulo
Tool del MCP
integrations_credentials_getEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.get".

Costo declarado: hasta 2 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

credential_idstringrutarequerido

The connection id, as listed by integrations.credentials.list.

Respuesta

idstring
platformstring
namestring | null
statusenum

Valores: active, error

auth_errorstring | null
accountobject
connected_bystring | null

The email of who connected it, as it was stored.

connected_atnumber | null
token_expires_atnumber | null
refresh_token_expires_atnumber | null
last_reauthorized_atnumber | null
inheritedboolean
owner_org_idstring
scope_statusenum

Valores: ok, drift, unknown

missing_scopesarray<string>
connected_by_namestring | null

Their name, as the team shows it (null when they are no longer a member).

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/integrations/credentials/{credential_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl "https://api.mb-suite.com/v1/integrations/credentials/{credential_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/integrations/availability

Which platforms have a usable connection

integrations.credentials.availability

LecturaIdempotenteDesde 2026-11-01

For each platform that can be linked in Data sources (google_ads, meta_ads, google_analytics, tiktok_ads, tiktok, google_search_console, google_business_profile, facebook_page, instagram, linkedin_ads, linkedin_page, youtube, whatsapp_business), returns available (there is an active connection to read it with), is_inherited (the Account uses its workspace's connection), credential_org_id (the organization whose connection is used: the Account itself or its workspace) and integration_name (the integration to connect: Facebook pages and Instagram use the Meta one). An object keyed by platform. Call it before linking accounts with integrations.data_sources.save. Requires view access to Integrations.

Alcance
integrations:read
Permiso
Ver el módulo
Tool del MCP
integrations_credentials_availabilityEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.availability".

Costo declarado: hasta 125 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

Sin parámetros.

Respuesta

Un objeto JSON en snake_case.

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/integrations/availability" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl "https://api.mb-suite.com/v1/integrations/availability" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/integrations/credentials/{credential_id}

Disconnect a platform connection

integrations.credentials.disconnect

IrreversibleDesde 2026-11-01

Disconnects one of the organization's platform connections: its tokens are deleted from MB Suite (TikTok also revokes the grant; Google and Meta are not revoked on purpose, it would cut the person's other connections) and, with cleanup_linked (default true), the accounts linked in Data sources through it are unlinked and the CRM lead sources that depended on it (here and in the Accounts that inherit it) are paused; they resume on their own when it is reconnected. An Account cannot disconnect the workspace's connection it inherits (404 credential_not_found): the workspace does it. Nothing goes to the trash: reconnecting is authorizing again in Settings → Integrations. Owners and admins only. Outside the app it needs a dry run (which counts the linked accounts and lead sources affected) and a confirm_token. Errors: 404 credential_not_found, 400 system_credential. With TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Instrucciones para agentes

Before confirming, tell the person how many linked accounts and lead sources the dry run says will be affected, and that reconnecting is done in the app.

Pide confirmación: primero dry_run: true (vista previa y confirm_token, que vale 10 minutos y una sola vez), después el mismo cuerpo con confirm_token. En unas pocas, solo con ciertos datos: la descripción dice cuándo. Por qué y cómo: Vista previa y confirmación.

Alcance
integrations:write y «Permitir eliminar» (integrations:delete en OAuth)
Permiso
Editar en el módulo · Solo owner, admin
Tool del MCP
integrations_credentials_disconnectEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.disconnect".

Costo declarado: hasta 300 lecturas y 120 escrituras por llamada (cuentan en el cupo diario).

Parámetros

credential_idstringrutarequerido

The connection id, as listed by integrations.credentials.list.

cleanup_linkedbooleancuerpoopcional

true (default): also unlink the data sources that used it and pause the CRM lead sources that depended on it. false: only remove the connection, to reconnect without losing the configuration.

Por defecto: true

Respuesta

credential_idsarray<string>
platformstring
disconnected_countnumber
cleaned_data_sourcesarray<string>
deleted_connections_countnumber
paused_lead_sourcesnumber

Errores

Ejemplo

curl -X DELETE "https://api.mb-suite.com/v1/integrations/credentials/{credential_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/integrations/credentials/{credential_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
POST/v1/integrations/platforms/{platform}/disconnect

Disconnect every connection of a platform

integrations.credentials.disconnect_platform

IrreversibleDesde 2026-11-01

Disconnects all the organization's active connections of one platform at once: YouTube keeps one per channel, TikTok one per account and LinkedIn pages one per person who authorized. Each one is removed like integrations.credentials.disconnect, and with cleanup_linked (default true) the platform's linked accounts in Data sources are unlinked and the dependent CRM lead sources paused, once. Returns how many were disconnected. Owners and admins only; outside the app it needs a dry run and a confirm_token. Errors: 409 integration_not_connected (details.platform) when the organization has no active connection of that platform. With TikTok, their terms limit it through the API and the MCP: what they do not allow answers 403 platform_terms_restricted (the permissions guide lists what each platform allows).

Pide confirmación: primero dry_run: true (vista previa y confirm_token, que vale 10 minutos y una sola vez), después el mismo cuerpo con confirm_token. En unas pocas, solo con ciertos datos: la descripción dice cuándo. Por qué y cómo: Vista previa y confirmación.

Alcance
integrations:write y «Permitir eliminar» (integrations:delete en OAuth)
Permiso
Editar en el módulo · Solo owner, admin
Tool del MCP
integrations_credentials_disconnect_platformEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.disconnect_platform".

Costo declarado: hasta 300 lecturas y 160 escrituras por llamada (cuentan en el cupo diario).

Parámetros

platformenumrutarequerido

The platform whose connections are all removed (meta is the legacy alias of meta_ads).

cleanup_linkedbooleancuerpoopcional

Same as in integrations.credentials.disconnect (default true).

Por defecto: true

Respuesta

credential_idsarray<string>
platformstring
disconnected_countnumber
cleaned_data_sourcesarray<string>
deleted_connections_countnumber
paused_lead_sourcesnumber

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/integrations/platforms/{platform}/disconnect" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X POST "https://api.mb-suite.com/v1/integrations/platforms/{platform}/disconnect" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'
GET/v1/integrations/credentials/{credential_id}/accounts

List the accounts a connection can reach

integrations.credentials.accounts.list

LecturaIdempotenteDesde 2026-11-01

Lists, live from the platform, what one of the organization's connections can reach and could be linked in Data sources: Google Ads accounts (manager accounts come with linkable false), GA4 properties, Search Console sites, Business Profile locations, YouTube channels, Meta ad accounts, Facebook pages and their Instagram accounts, TikTok advertisers or the TikTok account itself, LinkedIn ad accounts, LinkedIn pages and the person's LinkedIn profile, and WhatsApp numbers. Each item has platform (the Data sources platform), id (the platform's own id), name, linked (already linked in this organization), linkable and connection: pass that connection object as is to integrations.data_sources.save with the same platform to link it. WhatsApp numbers are listed but linked from the app (linkable false). Use credential_id from integrations.credentials.list (an Account can use its workspace's connection when it inherits the platform); filter with platform for Meta and LinkedIn pages connections. It never returns tokens. It calls the platform (spends that platform's external quota) and can take a few seconds; one page, no cursor. Who can: whoever can link accounts of that platform here (integrations.data_sources.save explains the rule): 403 data_sources_forbidden otherwise. Errors: 404 credential_not_found, 409 integration_reconnect_required (the connection expired, was revoked or lacks a permission: reconnect it in the app), 409 integration_not_connected, 409 external_rejected, 429 external_rate_limited, 503 external_unavailable. With Google Ads, Google Business Profile, LinkedIn, TikTok or YouTube, 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).

Instrucciones para agentes

Show the person the items with linkable true and ask which ones to link; do not link accounts the person did not choose.

Alcance
integrations:read
Permiso
Ver el módulo
Tool del MCP
integrations_credentials_accounts_listEn la superficie completa; en la compacta, mb_execute_operation con id: "integrations.credentials.accounts.list".

Costo declarado: hasta 8 lecturas y 0 escrituras por llamada (cuentan en el cupo diario). Toca una plataforma externa (google): cuenta en el cupo de operaciones externas.

Parámetros

credential_idstringrutarequerido

The connection id, as listed by integrations.credentials.list.

platformenumqueryopcional

Only what this Data sources platform can link: a Meta connection lists ad accounts (meta_ads), Facebook pages (facebook_page) and Instagram accounts (instagram); a LinkedIn pages connection lists pages (linkedin_page) and the person's profile (linkedin_profile). Without it, everything the connection reaches.

Valores: google_ads, meta_ads, facebook_page, instagram, tiktok_ads, tiktok, linkedin_ads, linkedin_page, linkedin_profile, google_analytics, google_search_console, google_business_profile, youtube, whatsapp_business

Respuesta

dataarray<object>
has_moreboolean
credential_idstring
platformstring
inheritedboolean
next_cursorstring

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/integrations/credentials/{credential_id}/accounts" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar. En la práctica esta operación no se simula (toca otra plataforma): responde 409 sandbox_external_unavailable.