# Prepare logo or favicon upload

`management_groups.prepare_brand_asset_upload`

Prepare a five-minute multipart upload for a Management Group logo or favicon of at most 10 MiB. Read branding first, hash the local PNG, JPEG, or WebP file, then POST field `image` to the returned URL with the transfer token as Bearer authorization. File bytes never belong in tool arguments. Request a new transfer if the branding revision or access changes.

[Branding guide](https://docs.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": {
    "asset_kind": {
      "enum": [
        "logo",
        "favicon"
      ],
      "type": "string"
    },
    "content_sha256": {
      "description": "SHA-256 fingerprint of the exact document content.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "content_type": {
      "enum": [
        "image/png",
        "image/jpeg",
        "image/webp"
      ],
      "type": "string"
    },
    "expected_revision": {
      "maxLength": 64,
      "minLength": 64,
      "type": "string"
    },
    "filename": {
      "maxLength": 255,
      "minLength": 1,
      "pattern": "\\.(png|PNG|jpg|JPG|jpeg|JPEG|webp|WEBP)$",
      "type": "string"
    },
    "management_group_slug": {
      "description": "Management Group slug (mgmt_) returned by management_groups.list; reuse a known value.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "size_bytes": {
      "maximum": 10485760,
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "management_group_slug",
    "expected_revision",
    "asset_kind",
    "filename",
    "content_type",
    "content_sha256",
    "size_bytes"
  ],
  "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": {
        "expires_in_seconds": {
          "type": "integer"
        },
        "instructions": {
          "type": "string"
        },
        "method": {
          "enum": [
            "POST"
          ],
          "type": "string"
        },
        "transfer_token": {
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "url",
        "method",
        "transfer_token",
        "expires_in_seconds",
        "instructions"
      ],
      "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.
