# place.stream.branding.importBundle

> Apply a branding bundle (see exportBundle). By default the bundle replaces the node's branding: keys it does not mention are removed. Every value is validated like updateBlob. Requires admin authorization.

- Kind: procedure
- Authority: branding.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.branding.importBundle)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.branding.importBundle/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.branding.importBundle/analytics)

## Procedure (`place.stream.branding.importBundle`)

Type: procedure · POST

### Parameters (query string)

- `broadcaster` (string · did): DID of the broadcaster. Defaults to this node's.
- `dryRun` (boolean): Report what would change without writing anything.
  - Constraints: default: false
- `merge` (boolean): Keep keys the bundle does not mention instead of removing them.
  - Constraints: default: false

### Input (application/zip)


### Output (application/json)

- `applied` (boolean, required): False for a dry run.
- `changes` (array, required)
  - `items` (ref)
    - Reference: `#change`
- `warnings` (array)
  - `items` (string)

### Errors

- `Unauthorized`: The caller is not an admin.
- `InvalidBundle`: The zip, its branding.yaml or one of its values is not acceptable; the message names the key.

## #change (`place.stream.branding.importBundle#change`)

Type: object

### Properties

- `action` (string, required)
  - Constraints: knownValues: added | changed | removed | unchanged
- `detail` (string): The new text value, or the image's type and size.
- `key` (string, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "change": {
      "properties": {
        "action": {
          "knownValues": [
            "added",
            "changed",
            "removed",
            "unchanged"
          ],
          "type": "string"
        },
        "detail": {
          "description": "The new text value, or the image's type and size.",
          "type": "string"
        },
        "key": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "action"
      ],
      "type": "object"
    },
    "main": {
      "description": "Apply a branding bundle (see exportBundle). By default the bundle replaces the node's branding: keys it does not mention are removed. Every value is validated like updateBlob. Requires admin authorization.",
      "errors": [
        {
          "description": "The caller is not an admin.",
          "name": "Unauthorized"
        },
        {
          "description": "The zip, its branding.yaml or one of its values is not acceptable; the message names the key.",
          "name": "InvalidBundle"
        }
      ],
      "input": {
        "encoding": "application/zip"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "applied": {
              "description": "False for a dry run.",
              "type": "boolean"
            },
            "changes": {
              "items": {
                "ref": "#change",
                "type": "ref"
              },
              "type": "array"
            },
            "warnings": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "applied",
            "changes"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "broadcaster": {
            "description": "DID of the broadcaster. Defaults to this node's.",
            "format": "did",
            "type": "string"
          },
          "dryRun": {
            "default": false,
            "description": "Report what would change without writing anything.",
            "type": "boolean"
          },
          "merge": {
            "default": false,
            "description": "Keep keys the bundle does not mention instead of removing them.",
            "type": "boolean"
          }
        },
        "type": "params"
      },
      "type": "procedure"
    }
  },
  "id": "place.stream.branding.importBundle",
  "lexicon": 1
}
```
