Menu

API reference · Integrations

Connections

integrations · credentials · 6 operations

GET/v1/integrations/credentials

List the organization's platform connections

integrations.credentials.list

ReadIdempotentSince 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).

Instructions for agents

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.

Scope
integrations:read
Permission
View the module
MCP tool
integrations_credentials_listOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.list".

Declared cost: up to 125 reads and 0 writes per call (they count against the daily quota).

Parameters

platformenumqueryoptional

Only the connections of this platform.

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

include_inheritedbooleanqueryoptional

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

Default: true

Response

dataarray<object>
has_moreboolean
next_cursorstring

Errors

Example

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

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

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

ReadIdempotentSince 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).

Scope
integrations:read
Permission
View the module
MCP tool
integrations_credentials_getOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.get".

Declared cost: up to 2 reads and 0 writes per call (they count against the daily quota).

Parameters

credential_idstringpathrequired

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

Response

idstring
platformstring
namestring | null
statusenum

Values: 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

Values: 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).

Errors

Example

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

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

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

ReadIdempotentSince 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.

Scope
integrations:read
Permission
View the module
MCP tool
integrations_credentials_availabilityOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.availability".

Declared cost: up to 125 reads and 0 writes per call (they count against the daily quota).

Parameters

No parameters.

Response

A JSON object in snake_case.

Errors

Example

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

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

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

IrreversibleSince 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).

Instructions for agents

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.

Needs confirmation: first dry_run: true (preview and confirm_token, valid 10 minutes and for one run), then the same body with confirm_token. In a few operations only with certain data: the description says when. Why and how: Dry run and confirm_token.

Scope
integrations:write and “Allow deletions” (integrations:delete in OAuth)
Permission
Edit in the module · Only owner, admin
MCP tool
integrations_credentials_disconnectOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.disconnect".

Declared cost: up to 300 reads and 120 writes per call (they count against the daily quota).

Parameters

credential_idstringpathrequired

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

cleanup_linkedbooleanbodyoptional

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.

Default: true

Response

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

Errors

Example

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
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

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

IrreversibleSince 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).

Needs confirmation: first dry_run: true (preview and confirm_token, valid 10 minutes and for one run), then the same body with confirm_token. In a few operations only with certain data: the description says when. Why and how: Dry run and confirm_token.

Scope
integrations:write and “Allow deletions” (integrations:delete in OAuth)
Permission
Edit in the module · Only owner, admin
MCP tool
integrations_credentials_disconnect_platformOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.disconnect_platform".

Declared cost: up to 300 reads and 160 writes per call (they count against the daily quota).

Parameters

platformenumpathrequired

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

cleanup_linkedbooleanbodyoptional

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

Default: true

Response

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

Errors

Example

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
}'

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset.

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

ReadIdempotentSince 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).

Instructions for agents

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

Scope
integrations:read
Permission
View the module
MCP tool
integrations_credentials_accounts_listOn the full surface; on the compact one, mb_execute_operation with id: "integrations.credentials.accounts.list".

Declared cost: up to 8 reads and 0 writes per call (they count against the daily quota). Touches an external platform (google): it counts against the external operations quota.

Parameters

credential_idstringpathrequired

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

platformenumqueryoptional

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.

Values: 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

Response

dataarray<object>
has_moreboolean
credential_idstring
platformstring
inheritedboolean
next_cursorstring

Errors

Example

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

Try it with your test API key

With a test API key the request always goes to your practice organization: example data you can reset. In the practice organization this operation is not simulated (it reaches another platform): it answers 409 sandbox_external_unavailable.