Menu

Referência da API · Branding

Domínios do portal

branding · portal_domains · 3 operações

POST/v1/branding/portal-domains

Add a client portal address

branding.portal_domains.add

EscritaIdempotenteDesde 2026-11-01

Registers an address for the organization's client portal: a full hostname, either <label>.mb-suite.com (its MB Suite subdomain: the label follows the same rules as branding.subdomain.set) or its own domain (portal.youragency.com, never mb-suite.com itself nor a hosting provider's domain). Validates that no other organization nor this organization's team access uses it, registers it with the hosting provider and saves it enabled; a custom domain starts unverified (verification_record may come back; its CNAME must point to cname.vercel-dns.com; then branding.portal_domains.verify). One subdomain and one custom domain per portal. A different MB Suite subdomain replaces the current one in this same call: the new one is registered and saved first, then the old one is released (previous_host; previous_released_from_hosting false when the hosting provider did not release it — it no longer opens the portal), so the portal is never left without an address. A second custom domain is 409 portal_domain_already_set (remove the current one first: it has its own DNS and verification). The same address again changes nothing. Fires branding.domain.added (and branding.domain.removed for a replaced subdomain). Owners and admins with edit access to Branding and to the Client Portal.

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

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

Parâmetros

domainstringcorpoobrigatório

The full hostname: portal.youragency.com (its own domain) or clients.mb-suite.com (an MB Suite subdomain).

Resposta

domainobject
verification_recordobject | null
changedboolean
previous_hoststring
previous_released_from_hostingboolean

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/branding/portal-domains" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "DOMAIN",
  "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.

POST/v1/branding/portal-domains/verify

Verify the client portal's custom domain

branding.portal_domains.verify

EscritaIdempotenteDesde 2026-11-01

Asks the hosting provider whether the client portal's custom domain is ready (ownership verified and the CNAME configured). When it is, the address is marked verified and starts serving the portal (fires branding.domain.verified, once); otherwise returns verified false with configured, the verification_record still to publish (if any) and message. Not found when the portal has no custom domain (subdomains need no verification). Owners and admins with edit access to Branding and to the Client Portal.

Escopo
branding:write
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
branding_portal_domains_verifyNa superfície completa; na compacta, mb_execute_operation com id: "branding.portal_domains.verify".
Eventos que pode emitir
branding.domain.verified

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

Parâmetros

Sem parâmetros.

Resposta

domainobject
verifiedboolean
configuredboolean
verification_recordobject | null
messagestring | null

Erros

Exemplo

curl -X POST "https://api.mb-suite.com/v1/branding/portal-domains/verify" \
  -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. Na prática esta operação não é simulada (usa outra plataforma): responde 409 sandbox_external_unavailable.

DELETE/v1/branding/portal-domains/{domain}

Remove a client portal address

branding.portal_domains.remove

IrreversívelDesde 2026-11-01

Removes one of the client portal's addresses (domain is the full hostname, exactly as branding.domains.get lists it): it stops opening the portal, it is released from the hosting provider (released_from_hosting false if another organization also has it or the provider failed: the organization is cleaned anyway) and cleared from the portal settings. An address that is not one of this organization's portal addresses is not found (nothing is ever released on someone else's behalf). The domain's DNS records are not touched. There is no trash: to undo, add it again. Outside the app it needs a dry run and its confirm_token. Fires branding.domain.removed. Owners and admins with edit access to Branding and to the Client Portal.

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
branding:write e «Permitir exclusões» (branding:delete no OAuth)
Permissão
Editar no módulo · Só owner, admin
Tool do MCP
branding_portal_domains_removeNa superfície completa; na compacta, mb_execute_operation com id: "branding.portal_domains.remove".
Eventos que pode emitir
branding.domain.removed

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

Parâmetros

domainstringrotaobrigatório

The full hostname: portal.youragency.com (its own domain) or clients.mb-suite.com (an MB Suite subdomain).

Resposta

removedtrue
domainobject
released_from_hostingboolean

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/branding/portal-domains/{domain}" \
  -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.