# Apply branding to portals

`management_groups.apply_branding_to_portals`

After reviewing the same selection, replace each selected portal's logo and configured brand color with the Management Group brand, leaving already matching assets untouched. Read branding first, explain that portal-specific branding will be overwritten, and pass its revision. An explicit whitelabelling request includes applying the supplied branding to the requested portal selection. Review the impact and proceed when the selection and shared-group effects match the request; do not expand the selection implicitly.

[Branding guide](https://docs.staging.levr.ai/mcp/resources/management_group_branding.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "apply_all": {
      "description": "True selects all eligible managed portals and requires provider_slugs=[]; false requires a nonempty provider_slugs list.",
      "type": "boolean"
    },
    "client_request_id": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expected_revision": {
      "description": "Copy branding.revision unchanged from management_groups.get_branding; not an integer draft revision.",
      "maxLength": 64,
      "minLength": 64,
      "type": "string"
    },
    "management_group_slug": {
      "description": "Copy management_group_slug from management_groups.list. Prefix: mgmt_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "provider_slugs": {
      "description": "Exact managed portal slugs to review/apply. Use a nonempty list with apply_all=false, or [] with apply_all=true.",
      "items": {
        "description": "Stable public identifier for the referenced resource.",
        "maxLength": 255,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 100,
      "type": "array"
    },
    "user_confirmed": {
      "const": true,
      "type": "boolean"
    }
  },
  "required": [
    "management_group_slug",
    "provider_slugs",
    "apply_all",
    "expected_revision",
    "client_request_id",
    "user_confirmed"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "applied_count": {
          "description": "Portals changed by this apply; zero for review or already matching portals.",
          "type": "integer"
        },
        "apply_all": {
          "description": "True selects all eligible managed portals and requires provider_slugs=[]; false requires a nonempty provider_slugs list.",
          "type": "boolean"
        },
        "impact": {
          "additionalProperties": false,
          "properties": {
            "color_already_matching_count": {
              "type": "integer"
            },
            "color_configured": {
              "type": "boolean"
            },
            "color_update_count": {
              "type": "integer"
            },
            "logo_already_matching_count": {
              "type": "integer"
            },
            "logo_configured": {
              "type": "boolean"
            },
            "logo_update_count": {
              "type": "integer"
            },
            "providers_with_existing_logo_count": {
              "type": "integer"
            },
            "providers_without_logo_count": {
              "type": "integer"
            }
          },
          "required": [
            "logo_configured",
            "color_configured",
            "logo_update_count",
            "logo_already_matching_count",
            "providers_with_existing_logo_count",
            "providers_without_logo_count",
            "color_update_count",
            "color_already_matching_count"
          ],
          "type": "object"
        },
        "management_group_slug": {
          "description": "Copy management_group_slug from management_groups.list. Prefix: mgmt_.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "provider_count": {
          "type": "integer"
        },
        "provider_slugs": {
          "description": "Exact managed portal slugs to review/apply. Use a nonempty list with apply_all=false, or [] with apply_all=true.",
          "items": {
            "description": "Stable public identifier for the referenced resource.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "management_group_slug",
        "apply_all",
        "provider_slugs",
        "provider_count",
        "applied_count",
        "impact"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
