# Brand Kit

**Summary:** Endpoints for Brand Kit

- Role: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/brand-kit
- Updated: 2026-10-13
- Markdown index: https://www.subrite.no/developers/llms.txt

<a id="get-api-v1-brand-kits-id"></a>
## Get a brand kit by id

`GET /api/v1/brand-kits/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `BrandKitResponseDto`

| Name | Type | Description |
| --- | --- | --- |
| `id` (Required) | `string` |   |
| `name` (Required) | `string` | `maxLength`: `255` |
| `smsOtp` | `boolean` |   |
| `emailOtpEnabled` | `boolean` |   |
| `smsOtpEnabled` | `boolean` |   |
| `smsOtpFallbackEnabled` | `boolean` |   |
| `primaryOtpChannel` | `string` | Allowed values: `"email"`, `"sms"` |
| `favicon` | `string` |   |
| `authLogo` | `string` |   |
| `authLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` |
| `siteUrl` | `string` |   |
| `termsUrl` | `string` |   |
| `privacyUrl` | `string` |   |
| `defaultLogoutUrl` | `string` |   |
| `pageHeader` | `PageHeaderConfig` |   |
| `pageHeader.logo` (Required when parent is present) | `string` |   |
| `pageHeader.logoHeight` (Required when parent is present) | `number` |   |
| `pageHeader.textContent` (Required when parent is present) | `string` |   |
| `pageHeader.textColor` (Required when parent is present) | `string` |   |
| `pageHeader.bgColor` (Required when parent is present) | `string` |   |
| `primaryButton` | `ButtonConfig` |   |
| `primaryButton.bgColor` (Required when parent is present) | `string` |   |
| `primaryButton.textColor` (Required when parent is present) | `string` |   |
| `primaryButton.hoverColor` (Required when parent is present) | `string` |   |
| `primaryButton.stepColor` (Required when parent is present) | `string` |   |
| `primaryFont` | `BrandKitFontConfig` |   |
| `primaryFont.family` (Required when parent is present) | `string` |   |
| `primaryFont.url` (Required when parent is present) | `string` |   |
| `primaryFont.type` (Required when parent is present) | `string` |   |
| `primaryFont.style` (Required when parent is present) | `string` |   |
| `primaryFont.display` (Required when parent is present) | `string` |   |
| `primaryFont.weight` (Required when parent is present) | `string` |   |
| `secondaryFont` | `BrandKitFontConfig` |   |
| `secondaryFont.family` (Required when parent is present) | `string` |   |
| `secondaryFont.url` (Required when parent is present) | `string` |   |
| `secondaryFont.type` (Required when parent is present) | `string` |   |
| `secondaryFont.style` (Required when parent is present) | `string` |   |
| `secondaryFont.display` (Required when parent is present) | `string` |   |
| `secondaryFont.weight` (Required when parent is present) | `string` |   |
| `otpTemplateId` | `Translation` |   |
| `otpTemplateId.en` (Required when parent is present) | `string` |   |
| `otpTemplateId.no` (Required when parent is present) | `string` |   |
| `otpTemplateId.sv` | `string` |   |
| `otpTemplateId.da` | `string` |   |
| `otpTemplateId.key` | `string` |   |
| `tenantId` (Required) | `number` |   |
| `smsSenderId` | `number` |   |
| `emailSenderId` | `number` |   |
| `isDefault` (Required) | `boolean` |   |
| `emailSender` | `CommunicationSenderResponseDto` |   |
| `emailSender.id` (Required when parent is present) | `number` |   |
| `emailSender.senderName` (Required when parent is present) | `string` |   |
| `emailSender.senderEmail` (Required when parent is present) | `string` |   |
| `emailSender.replyTo` (Required when parent is present) | `string` |   |
| `emailSender.status` (Required when parent is present) | `COMMUNICATION_SENDER_STATUS` | The status of the sender · Allowed values: `"pending"`, `"approved"`, `"archived"` |
| `emailSender.communicationChannel` (Required when parent is present) | `COMMUNICATION_CHANNEL` | Allowed values: `"sms"`, `"email"` |
| `emailSender.requestSentAt` (Required when parent is present) | `string (date-time)` |   |
| `emailSender.providerRegion` (Required when parent is present) | `SENDER_PROVIDER_REGION` | Allowed values: `"global"`, `"eu"` |
| `smsSender` | `CommunicationSenderResponseDto` |   |
| `smsSender.id` (Required when parent is present) | `number` |   |
| `smsSender.senderName` (Required when parent is present) | `string` |   |
| `smsSender.senderEmail` (Required when parent is present) | `string` |   |
| `smsSender.replyTo` (Required when parent is present) | `string` |   |
| `smsSender.status` (Required when parent is present) | `COMMUNICATION_SENDER_STATUS` | The status of the sender · Allowed values: `"pending"`, `"approved"`, `"archived"` |
| `smsSender.communicationChannel` (Required when parent is present) | `COMMUNICATION_CHANNEL` | Allowed values: `"sms"`, `"email"` |
| `smsSender.requestSentAt` (Required when parent is present) | `string (date-time)` |   |
| `smsSender.providerRegion` (Required when parent is present) | `SENDER_PROVIDER_REGION` | Allowed values: `"global"`, `"eu"` |
| `hostnames` (Required) | `array of TenantAdditionalHostnameDto` |   |
| `hostnames[].id` (Required when parent is present) | `number` |   |
| `hostnames[].hostName` (Required when parent is present) | `string` |   |
| `hostnames[].tenantId` (Required when parent is present) | `number` |   |
| `hostnames[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `hostnames[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `hostnames[].brandKitId` (Required when parent is present) | `string` |   |
| `hostnames[].brandKit` | `BrandKitResponseDto` | Recursive schema; nested fields are not repeated. |

#### 400

Content type: `application/json` · `ErrorResponse`

The id is neither a UUID nor the tenant id

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` |   |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

brandKitNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"brandKitNotFound"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "brandKitNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/brand-kits/{id}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "favicon": "string",
  "authLogo": "string",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "defaultLogoutUrl": "string",
  "pageHeader": {
    "logo": "string",
    "logoHeight": 0,
    "textContent": "string",
    "textColor": "string",
    "bgColor": "string"
  },
  "primaryButton": {
    "bgColor": "string",
    "textColor": "string",
    "hoverColor": "string",
    "stepColor": "string"
  },
  "primaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "secondaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "tenantId": 0,
  "smsSenderId": 0,
  "emailSenderId": 0,
  "isDefault": true,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "hostnames": [
    {}
  ]
}
```

<a id="post-api-v1-brand-kits-id"></a>
## Update a brand kit

`POST /api/v1/brand-kits/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Request body

Content type: `multipart/form-data` · Required · `BrandKitUpdateDto`

| Name | Type | Description |
| --- | --- | --- |
| `name` | `string` | `maxLength`: `255` |
| `smsOtp` | `boolean` |   |
| `emailOtpEnabled` | `boolean` |   |
| `smsOtpEnabled` | `boolean` |   |
| `smsOtpFallbackEnabled` | `boolean` |   |
| `primaryOtpChannel` | `string` | Allowed values: `"email"`, `"sms"` |
| `favicon` | `string` |   |
| `authLogo` | `string` |   |
| `authLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` |
| `siteUrl` | `string` |   |
| `termsUrl` | `string` |   |
| `privacyUrl` | `string` |   |
| `defaultLogoutUrl` | `string` |   |
| `pageHeader` | `PageHeaderConfig` |   |
| `pageHeader.logo` (Required when parent is present) | `string` |   |
| `pageHeader.logoHeight` (Required when parent is present) | `number` |   |
| `pageHeader.textContent` (Required when parent is present) | `string` |   |
| `pageHeader.textColor` (Required when parent is present) | `string` |   |
| `pageHeader.bgColor` (Required when parent is present) | `string` |   |
| `primaryButton` | `ButtonConfig` |   |
| `primaryButton.bgColor` (Required when parent is present) | `string` |   |
| `primaryButton.textColor` (Required when parent is present) | `string` |   |
| `primaryButton.hoverColor` (Required when parent is present) | `string` |   |
| `primaryButton.stepColor` (Required when parent is present) | `string` |   |
| `primaryFont` | `BrandKitFontConfig` |   |
| `primaryFont.family` (Required when parent is present) | `string` |   |
| `primaryFont.url` (Required when parent is present) | `string` |   |
| `primaryFont.type` (Required when parent is present) | `string` |   |
| `primaryFont.style` (Required when parent is present) | `string` |   |
| `primaryFont.display` (Required when parent is present) | `string` |   |
| `primaryFont.weight` (Required when parent is present) | `string` |   |
| `secondaryFont` | `BrandKitFontConfig` |   |
| `secondaryFont.family` (Required when parent is present) | `string` |   |
| `secondaryFont.url` (Required when parent is present) | `string` |   |
| `secondaryFont.type` (Required when parent is present) | `string` |   |
| `secondaryFont.style` (Required when parent is present) | `string` |   |
| `secondaryFont.display` (Required when parent is present) | `string` |   |
| `secondaryFont.weight` (Required when parent is present) | `string` |   |
| `otpTemplateId` | `Translation` |   |
| `otpTemplateId.en` (Required when parent is present) | `string` |   |
| `otpTemplateId.no` (Required when parent is present) | `string` |   |
| `otpTemplateId.sv` | `string` |   |
| `otpTemplateId.da` | `string` |   |
| `otpTemplateId.key` | `string` |   |
| `smsSenderId` | `number` |   |
| `emailSenderId` | `number` |   |
| `hostnameIds` | `array of number` | Array of hostname IDs to update. Pass empty array to remove all hostnames. |
| `logoImage` | `file` |   |
| `faviconImage` | `file` |   |
| `authLogoImage` | `file` |   |
| `primaryFontFile` | `file` |   |
| `secondaryFontFile` | `file` |   |
| `logoImageUrl` | `string (uri)` | Assets-library file to use as the header logo. |
| `faviconImageUrl` | `string (uri)` | Assets-library file to use as the favicon. |
| `authLogoImageUrl` | `string (uri)` | Assets-library file to use as the login logo. |
| `primaryFontFileUrl` | `string (uri)` | Assets-library font to use as the primary font. |
| `secondaryFontFileUrl` | `string (uri)` | Assets-library font to use as the secondary font. |
| `removeLogoImage` | `boolean` | Clear the header logo. |
| `removeFaviconImage` | `boolean` | Clear the favicon. |
| `removeAuthLogoImage` | `boolean` | Clear the login logo. |

### Responses

#### 201

Content type: `application/json` · `BrandKitResponseDto`

Same fields as [Get a brand kit by id (200)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

#### 400

Content type: `application/json` · `ErrorResponse`

Body validation failed, the id is neither a UUID nor the tenant id, an uploaded file is not an accepted type, or the login-method settings contradict each other; field codes in errors\[\]

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"`, `"invalidFileType"`, `"otpChannelRequired"`, `"primaryOtpChannelDisabled"`, `"smsSenderRequired"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

brandKitNotFound, tenantNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"brandKitNotFound"`, `"tenantNotFound"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "brandKitNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

Content type: `application/json` · `ErrorResponse`

Another brand kit already uses the name (in errors\[\] against name), or a selected default sender is not approved for this tenant

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"brandKitNameAlreadyExists"`, `"emailSenderNotApproved"`, `"smsSenderNotApproved"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "brandKitNameAlreadyExists",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

#### 502

Content type: `application/json` · `ErrorResponse`

An uploaded logo, favicon or font could not be stored; nothing was saved

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"tenantAssetUploadFailed"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "tenantAssetUploadFailed",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl 'https://api.subrite.no/api/v1/brand-kits/{id}' \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --form 'logoImage=@<file>' \
  --form 'faviconImage=@<file>' \
  --form 'authLogoImage=@<file>' \
  --form 'primaryFontFile=@<file>' \
  --form 'secondaryFontFile=@<file>'
```

### Example response

201 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "favicon": "string",
  "authLogo": "string",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "defaultLogoutUrl": "string",
  "pageHeader": {
    "logo": "string",
    "logoHeight": 0,
    "textContent": "string",
    "textColor": "string",
    "bgColor": "string"
  },
  "primaryButton": {
    "bgColor": "string",
    "textColor": "string",
    "hoverColor": "string",
    "stepColor": "string"
  },
  "primaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "secondaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "tenantId": 0,
  "smsSenderId": 0,
  "emailSenderId": 0,
  "isDefault": true,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "hostnames": [
    {}
  ]
}
```

<a id="delete-api-v1-brand-kits-id"></a>
## Delete a brand kit

`DELETE /api/v1/brand-kits/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `boolean`

#### 400

Content type: `application/json` · `ErrorResponse`

The id is not a UUID

Same fields as [Get a brand kit by id (400)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

Content type: `application/json` · `ErrorResponse`

The brand kit is still assigned to one or more hostnames

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"brandKitInUse"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "brandKitInUse",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/brand-kits/{id}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
true
```

<a id="get-api-v1-brand-kits"></a>
## Get all brand kits

`GET /api/v1/brand-kits`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

Content type: `application/json` · `array of BrandKitResponseDto`

| Name | Type | Description |
| --- | --- | --- |
| `[].id` (Required when parent is present) | `string` |   |
| `[].name` (Required when parent is present) | `string` | `maxLength`: `255` |
| `[].smsOtp` | `boolean` |   |
| `[].emailOtpEnabled` | `boolean` |   |
| `[].smsOtpEnabled` | `boolean` |   |
| `[].smsOtpFallbackEnabled` | `boolean` |   |
| `[].primaryOtpChannel` | `string` | Allowed values: `"email"`, `"sms"` |
| `[].favicon` | `string` |   |
| `[].authLogo` | `string` |   |
| `[].authLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` |
| `[].siteUrl` | `string` |   |
| `[].termsUrl` | `string` |   |
| `[].privacyUrl` | `string` |   |
| `[].defaultLogoutUrl` | `string` |   |
| `[].pageHeader` | `PageHeaderConfig` |   |
| `[].pageHeader.logo` (Required when parent is present) | `string` |   |
| `[].pageHeader.logoHeight` (Required when parent is present) | `number` |   |
| `[].pageHeader.textContent` (Required when parent is present) | `string` |   |
| `[].pageHeader.textColor` (Required when parent is present) | `string` |   |
| `[].pageHeader.bgColor` (Required when parent is present) | `string` |   |
| `[].primaryButton` | `ButtonConfig` |   |
| `[].primaryButton.bgColor` (Required when parent is present) | `string` |   |
| `[].primaryButton.textColor` (Required when parent is present) | `string` |   |
| `[].primaryButton.hoverColor` (Required when parent is present) | `string` |   |
| `[].primaryButton.stepColor` (Required when parent is present) | `string` |   |
| `[].primaryFont` | `BrandKitFontConfig` |   |
| `[].primaryFont.family` (Required when parent is present) | `string` |   |
| `[].primaryFont.url` (Required when parent is present) | `string` |   |
| `[].primaryFont.type` (Required when parent is present) | `string` |   |
| `[].primaryFont.style` (Required when parent is present) | `string` |   |
| `[].primaryFont.display` (Required when parent is present) | `string` |   |
| `[].primaryFont.weight` (Required when parent is present) | `string` |   |
| `[].secondaryFont` | `BrandKitFontConfig` |   |
| `[].secondaryFont.family` (Required when parent is present) | `string` |   |
| `[].secondaryFont.url` (Required when parent is present) | `string` |   |
| `[].secondaryFont.type` (Required when parent is present) | `string` |   |
| `[].secondaryFont.style` (Required when parent is present) | `string` |   |
| `[].secondaryFont.display` (Required when parent is present) | `string` |   |
| `[].secondaryFont.weight` (Required when parent is present) | `string` |   |
| `[].otpTemplateId` | `Translation` |   |
| `[].otpTemplateId.en` (Required when parent is present) | `string` |   |
| `[].otpTemplateId.no` (Required when parent is present) | `string` |   |
| `[].otpTemplateId.sv` | `string` |   |
| `[].otpTemplateId.da` | `string` |   |
| `[].otpTemplateId.key` | `string` |   |
| `[].tenantId` (Required when parent is present) | `number` |   |
| `[].smsSenderId` | `number` |   |
| `[].emailSenderId` | `number` |   |
| `[].isDefault` (Required when parent is present) | `boolean` |   |
| `[].emailSender` | `CommunicationSenderResponseDto` |   |
| `[].emailSender.id` (Required when parent is present) | `number` |   |
| `[].emailSender.senderName` (Required when parent is present) | `string` |   |
| `[].emailSender.senderEmail` (Required when parent is present) | `string` |   |
| `[].emailSender.replyTo` (Required when parent is present) | `string` |   |
| `[].emailSender.status` (Required when parent is present) | `COMMUNICATION_SENDER_STATUS` | The status of the sender · Allowed values: `"pending"`, `"approved"`, `"archived"` |
| `[].emailSender.communicationChannel` (Required when parent is present) | `COMMUNICATION_CHANNEL` | Allowed values: `"sms"`, `"email"` |
| `[].emailSender.requestSentAt` (Required when parent is present) | `string (date-time)` |   |
| `[].emailSender.providerRegion` (Required when parent is present) | `SENDER_PROVIDER_REGION` | Allowed values: `"global"`, `"eu"` |
| `[].smsSender` | `CommunicationSenderResponseDto` |   |
| `[].smsSender.id` (Required when parent is present) | `number` |   |
| `[].smsSender.senderName` (Required when parent is present) | `string` |   |
| `[].smsSender.senderEmail` (Required when parent is present) | `string` |   |
| `[].smsSender.replyTo` (Required when parent is present) | `string` |   |
| `[].smsSender.status` (Required when parent is present) | `COMMUNICATION_SENDER_STATUS` | The status of the sender · Allowed values: `"pending"`, `"approved"`, `"archived"` |
| `[].smsSender.communicationChannel` (Required when parent is present) | `COMMUNICATION_CHANNEL` | Allowed values: `"sms"`, `"email"` |
| `[].smsSender.requestSentAt` (Required when parent is present) | `string (date-time)` |   |
| `[].smsSender.providerRegion` (Required when parent is present) | `SENDER_PROVIDER_REGION` | Allowed values: `"global"`, `"eu"` |
| `[].hostnames` (Required when parent is present) | `array of TenantAdditionalHostnameDto` |   |
| `[].hostnames[].id` (Required when parent is present) | `number` |   |
| `[].hostnames[].hostName` (Required when parent is present) | `string` |   |
| `[].hostnames[].tenantId` (Required when parent is present) | `number` |   |
| `[].hostnames[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].hostnames[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].hostnames[].brandKitId` (Required when parent is present) | `string` |   |
| `[].hostnames[].brandKit` | `BrandKitResponseDto` | Recursive schema; nested fields are not repeated. |

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

### Example request

```bash
curl https://api.subrite.no/api/v1/brand-kits \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "id": "string",
    "name": "string",
    "smsOtp": true,
    "emailOtpEnabled": true,
    "smsOtpEnabled": true,
    "smsOtpFallbackEnabled": true,
    "primaryOtpChannel": "email",
    "favicon": "string",
    "authLogo": "string",
    "authLogoHeight": 1,
    "siteUrl": "string",
    "termsUrl": "string",
    "privacyUrl": "string",
    "defaultLogoutUrl": "string",
    "pageHeader": {},
    "primaryButton": {},
    "primaryFont": {},
    "secondaryFont": {},
    "otpTemplateId": {},
    "tenantId": 0,
    "smsSenderId": 0,
    "emailSenderId": 0,
    "isDefault": true,
    "emailSender": {},
    "smsSender": {},
    "hostnames": []
  }
]
```

<a id="post-api-v1-brand-kits"></a>
## Create a brand kit

`POST /api/v1/brand-kits`

**Authentication:** Bearer token (JWT)

### Request body

Content type: `application/json` · Required · `BrandKitCreateDto`

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` | `maxLength`: `255` |
| `hostnameIds` | `array of number` |   |

**Example request body**

`application/json`

```json
{
  "name": "string",
  "hostnameIds": [
    0
  ]
}
```

### Responses

#### 201

Content type: `application/json` · `BrandKitResponseDto`

Same fields as [Get a brand kit by id (200)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

#### 400

Content type: `application/json` · `ErrorResponse`

Body validation failed; field codes in errors\[\]

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

Content type: `application/json` · `ErrorResponse`

A brand kit with this name already exists; the code arrives in errors\[\] against name. This was documented as a 404 before SUBRITE-638 and has always been a 409

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"brandKitAlreadyExists"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "brandKitAlreadyExists",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get a brand kit by id (403)](https://www.subrite.no/developers/brand-kit?md=true#get-api-v1-brand-kits-id).

### Example request

```bash
curl https://api.subrite.no/api/v1/brand-kits \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "hostnameIds": [
    0
  ]
}'
```

### Example response

201 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "favicon": "string",
  "authLogo": "string",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "defaultLogoutUrl": "string",
  "pageHeader": {
    "logo": "string",
    "logoHeight": 0,
    "textContent": "string",
    "textColor": "string",
    "bgColor": "string"
  },
  "primaryButton": {
    "bgColor": "string",
    "textColor": "string",
    "hoverColor": "string",
    "stepColor": "string"
  },
  "primaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "secondaryFont": {
    "family": "string",
    "url": "string",
    "type": "string",
    "style": "string",
    "display": "string",
    "weight": "string"
  },
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "tenantId": 0,
  "smsSenderId": 0,
  "emailSenderId": 0,
  "isDefault": true,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "hostnames": [
    {}
  ]
}
```
