# Apply the brand palette to the site with a person's approval; it can be undone

`POST /hosting/sites/{id}/design-library/brand/apply` · Rivier · hosting

Apply the brand palette to the site with a person's approval; it can be undone.

- Scope: hosting:write
- Graphql: Mutation.hostingLibraryBrandApply
- Sdk: hosting.libraryBrand.apply
- Cli: hosting library brand apply

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "brand": {
      "type": "object",
      "properties": {
        "draft": {
          "type": "boolean"
        },
        "name": {
          "type": "string",
          "maxLength": 60
        },
        "colors": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "minItems": 1,
          "maxItems": 6
        },
        "fonts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "family": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "role": {
                "type": "string",
                "enum": [
                  "heading",
                  "body",
                  "both"
                ]
              },
              "style": {
                "type": "string",
                "enum": [
                  "sans",
                  "serif",
                  "mono",
                  "display"
                ]
              },
              "webLicence": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "const": "unknown"
                  }
                ]
              }
            },
            "required": [
              "family",
              "webLicence"
            ],
            "additionalProperties": false
          },
          "maxItems": 4
        },
        "imagery": {
          "type": "string",
          "maxLength": 200
        },
        "voice": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 30
          },
          "maxItems": 8
        },
        "logoText": {
          "type": "string",
          "maxLength": 40
        }
      },
      "required": [
        "colors"
      ],
      "additionalProperties": false
    },
    "mode": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ]
    },
    "approve": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/sites/{id}/design-library/brand/apply' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "brand": {
    "colors": [
      "string"
    ]
  },
  "mode": "light",
  "approve": false
}'
```
