# Tenant

**Summary:** Endpoints for Tenant

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

<a id="get-api-v1-tenants-settings"></a>
## Get tenants settings

`GET /api/v1/tenants/settings`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `market` | `string` | Market name for the tenant · Allowed values: `"NO"`, `"SE"`, `"DK"` |
| `productName` | `string` | Product name for the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `additionalFeatures` | `array of string` | Additional features enabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `disabledFeatures` | `array of string` | Features disabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `id` (Required) | `number` |   |
| `name` (Required) | `string` |   |
| `isActive` (Required) | `boolean` |   |
| `defaultLanguage` (Required) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `hostName` (Required) | `string` |   |
| `logo` (Required) | `string` |   |
| `favicon` (Required) | `string` |   |
| `siteUrl` (Required) | `string` |   |
| `termsUrl` (Required) | `string` |   |
| `privacyUrl` (Required) | `string` |   |
| `gtm` (Required) | `string` |   |
| `taxRates` | `array of number` |   |
| `tenantContact` (Required) | `string` |   |
| `registeredBusinessNo` (Required) | `string` |   |
| `bankAccountNo` (Required) | `string` |   |
| `swiftCode` (Required) | `string` |   |
| `iban` (Required) | `string` |   |
| `defaultLogoutURL` (Required) | `string` |   |
| `postalAddress` (Required) | `string` |   |
| `preference` (Required) | `PreferenceResponseDto` |   |
| `preference.welcomeImage` | `string` | Can be null |
| `preference.headerText` | `string` | Can be null |
| `preference.headerLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` · Can be null |
| `preference.welcomePrimaryText` | `string` | Can be null |
| `preference.welcomeSecondaryText` | `string` | Can be null |
| `preference.memberInfoText` | `string` | Can be null |
| `preference.paymentConfirmationImage` | `string` | Can be null |
| `preference.subscriptionChangeCompleteScreenImage` | `string` | Can be null |
| `preference.paymentConfirmationPrimaryText` | `string` | Can be null |
| `preference.paymentConfirmationSecondaryTextLoggedOut` | `string` | Can be null |
| `preference.paymentConfirmationSecondaryTextLoggedIn` | `string` | Can be null |
| `preference.headerColor` | `string` | Can be null |
| `preference.headerTextColor` | `string` | Can be null |
| `preference.primaryButtonColor` | `string` | Can be null |
| `preference.primaryButtonHoverColor` | `string` | Can be null |
| `preference.primaryButtonTextColor` | `string` | Can be null |
| `preference.primaryStepColor` | `string` | Can be null |
| `preference.onboardingFlow` | `boolean` |   |
| `preference.invoiceLogo` | `string` | Can be null |
| `preference.allowedDaysAfterExpiry` | `number` | `minimum`: `0` |
| `preference.onNewUserCompletedPackageId` | `number` | Can be null |
| `preference.allowBuyNewSubsFromMypage` | `boolean` |   |
| `preference.allowBuyGiftSubsFromMypage` | `boolean` |   |
| `preference.onNewUserCompletedNewsletterAndConsent` | `boolean` |   |
| `preference.showBuyNewSubscriptionCTA` | `boolean` |   |
| `preference.buyNewSubscriptionPackageId` | `number` | Can be null |
| `preference.showPodcastSearch` | `boolean` |   |
| `preference.eInvoicePaymentPreference` (Required) | `EInvoicePaymentPreference` | Nested fields omitted: field limit. |
| `preference.checkoutWelcomeCTAConfig` (Required) | `CheckoutWelcomeCTAConfig` | Nested fields omitted: field limit. |
| `preference.giftSubscriptionConfirmationTextLoggedIn` | `string` | Can be null |
| `preference.giftSubscriptionWelcomeHelpText` | `string` | Can be null |
| `preference.systemUpgradeNotification` (Required) | `Translation` | Can be null · Nested fields omitted: field limit. |
| `preference.orderCtaLabel` | `Translation` | Can be null · Nested fields omitted: field limit. |
| `preference.inputFieldConfig` (Required) | `array of PageInputFieldConfig` | Nested fields omitted: field limit. |
| `preference.maintenanceModeConfig` (Required) | `MaintenanceModeConfig` | Can be null · Nested fields omitted: field limit. |
| `preference.permissionLevelForBuyingMultipleSubscriptions` (Required) | `PermissionLevelForBuyingMultipleSubscriptions` | Allowed values: `"allow"`, `"warn"`, `"block"` |
| `preference.theme` | `ThemeConfig` | Can be null · Nested fields omitted: field limit. |
| `preference.customFieldsOnMemberCard` | `array of string` |   |
| `preference.visibleAdditionalFieldsOnMypage` (Required) | `array of string` |   |
| `preference.customFieldsOnInvoice` (Required) | `array of CustomFieldsOnInvoiceDto` | Can be null · Nested fields omitted: field limit. |
| `preference.myPagePackageSort` (Required) | `MyPagePackageSortConfig` | Nested fields omitted: field limit. |
| `oauthProviders` (Required) | `array of PublicOAuthProvider` |   |
| `oauthProviders[].id` (Required when parent is present) | `string` |   |
| `oauthProviders[].clientId` (Required when parent is present) | `string` |   |
| `oauthProviders[].name` (Required when parent is present) | `string` |   |
| `emailProvider` (Required) | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `emailProviderAPIKey` | `string` |   |
| `emailProviderSignatureVerificationKey` | `string` |   |
| `createdAt` (Required) | `string (date-time)` |   |
| `updatedAt` (Required) | `string (date-time)` |   |
| `address` | `Address` | Nested fields omitted: field limit. |
| `emailSenderId` | `number` |   |
| `emailSender` | `CommunicationSenderResponseDto` | Nested fields omitted: field limit. |
| `smsOtp` (Required) | `boolean` |   |
| `smsSenderId` | `number` |   |
| `smsSender` | `CommunicationSenderResponseDto` | Nested fields omitted: field limit. |

#### 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`

tenantNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"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": "tenantNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

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

### Example response

200 · `application/json`

```json
{
  "market": "NO",
  "productName": "enterprise",
  "additionalFeatures": [
    "email"
  ],
  "disabledFeatures": [
    "email"
  ],
  "id": 0,
  "name": "string",
  "isActive": true,
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "tenantContact": "string",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "oauthProviders": [
    {}
  ],
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "address": {
    "entityId": "string",
    "entity": "string",
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "addressType": "primary",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "isSynced": true,
    "lastSyncedAt": "2019-08-24T14:15:22Z",
    "route": "string",
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "emailSenderId": 0,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsOtp": true,
  "smsSenderId": 0,
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  }
}
```

<a id="patch-api-v1-tenants-settings"></a>
## Update a tenant settings

`PATCH /api/v1/tenants/settings`

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `isActive` | `boolean` |   |
| `address` | `TenantAddressDto` |   |
| `address.companyName` | `string` | `maxLength`: `255` |
| `address.organizationNo` | `string` | `maxLength`: `255` |
| `address.line1` | `string` | `maxLength`: `255` |
| `address.line2` | `string` | `maxLength`: `255` |
| `address.city` | `string` | `maxLength`: `255` |
| `address.state` | `string` | `maxLength`: `255` |
| `address.postCode` | `string` | `maxLength`: `255` |
| `address.country` | `string` | `maxLength`: `255` |
| `address.name` | `string` | `maxLength`: `255` |
| `address.email` | `string` | `maxLength`: `255` |
| `address.invoiceReference` | `string` | `maxLength`: `255` |
| `address.addressType` | `AddressType` | Allowed values: `"primary"`, `"delivery"`, `"billing"`, `"not_set"` |
| `preference` | `TenantPreferenceUpdateDto` | Nested fields omitted: field limit. |
| `name` | `string` | `maxLength`: `255` |
| `defaultLanguage` | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `authLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` |
| `siteUrl` | `string` |   |
| `termsUrl` | `string` |   |
| `privacyUrl` | `string` |   |
| `gtm` | `string` | `maxLength`: `255` |
| `taxRates` | `array of number` |   |
| `smsOtp` | `boolean` |   |
| `emailOtpEnabled` | `boolean` |   |
| `smsOtpEnabled` | `boolean` |   |
| `smsOtpFallbackEnabled` | `boolean` |   |
| `primaryOtpChannel` | `string` | Allowed values: `"email"`, `"sms"` |
| `tenantContact` | `string` | `maxLength`: `255` |
| `emailSenderId` | `number` |   |
| `smsSenderId` | `number` |   |
| `emailProvider` | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `emailProviderAPIKey` | `string` |   |
| `emailProviderSignatureVerificationKey` | `string` |   |
| `registeredBusinessNo` | `string` | `maxLength`: `255` |
| `bankAccountNo` | `string` | `maxLength`: `255` |
| `swiftCode` | `string` | `maxLength`: `255` |
| `iban` | `string` | `maxLength`: `255` |
| `defaultLogoutURL` | `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` |   |

**Example request body**

`application/json`

```json
{
  "isActive": true,
  "address": {
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "addressType": "primary"
  },
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "inputFieldConfig": [],
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": []
  },
  "name": "string",
  "defaultLanguage": "en",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "tenantContact": "string",
  "emailSenderId": 0,
  "smsSenderId": 0,
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  }
}
```

### Responses

#### 200

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

Same fields as [Get tenants settings (200)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 400

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

Body validation failed, the product and feature-entitlement combination is not valid, or the login-method settings contradict each other; field codes in errors\[\]

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"`, `"tenantSettingsInvalidFeatures"`, `"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 tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound, tenantPreferenceNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"tenantNotFound"`, `"tenantPreferenceNotFound"` |
| `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": "tenantNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

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

The selected default sender is not approved for this tenant

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"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": "emailSenderNotApproved",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl https://api.subrite.no/api/v1/tenants/settings \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "isActive": true,
  "address": {
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "addressType": "primary"
  },
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "name": "string",
  "defaultLanguage": "en",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "tenantContact": "string",
  "emailSenderId": 0,
  "smsSenderId": 0,
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  }
}'
```

### Example response

200 · `application/json`

```json
{
  "market": "NO",
  "productName": "enterprise",
  "additionalFeatures": [
    "email"
  ],
  "disabledFeatures": [
    "email"
  ],
  "id": 0,
  "name": "string",
  "isActive": true,
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "tenantContact": "string",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "oauthProviders": [
    {}
  ],
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "address": {
    "entityId": "string",
    "entity": "string",
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "addressType": "primary",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "isSynced": true,
    "lastSyncedAt": "2019-08-24T14:15:22Z",
    "route": "string",
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "emailSenderId": 0,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsOtp": true,
  "smsSenderId": 0,
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  }
}
```

<a id="post-api-v1-tenants-settings-images"></a>
## Upload a tenant settings image

`POST /api/v1/tenants/settings/images`

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `propertyName` (Required) | `TenantImageProperty` | Allowed values: `"logo"`, `"favicon"`, `"welcomeImage"`, `"paymentConfirmationImage"`, `"invoiceLogo"`, `"subscriptionChangeCompleteScreenImage"`, `"authLogo"` |
| `image` | `file` |   |
| `imageUrl` | `string (uri)` | Public URL of a file in the Assets library to point this image at, instead of uploading bytes. The file is referenced rather than copied, so it stays in the library. |
| `removePreviousImageUrl` | `boolean` |   |

### Responses

#### 201

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

#### 400

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

Body validation failed, the file type is not accepted, or neither an image nor the remove-previous-image flag was provided

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"`, `"invalidFileType"`, `"imageOrRemovalFlagRequired"` |
| `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 tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound, tenantPreferenceNotFound

Same fields as [Update a tenant settings (404)](https://www.subrite.no/developers/tenant?md=true#patch-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 413

fileSizeExceeded

#### 415

invalidFileType

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 502

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

The image 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/tenants/settings/images \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --form 'propertyName=logo' \
  --form 'image=@<file>'
```

### Example response

201 · `application/json`

```json
true
```

<a id="post-api-v1-tenants-settings-fonts"></a>
## Upload a tenant settings font

`POST /api/v1/tenants/settings/fonts`

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `fontType` (Required) | `FontType` | Allowed values: `"PrimaryFont"`, `"SecondaryFont"` |
| `fontConfig` (Required) | `FontConfig` |   |
| `fontConfig.fontFamily` (Required) | `string` |   |
| `fontConfig.fontSources` (Required) | `array of FontSourceConfig` |   |
| `fontConfig.fontSources[].url` (Required when parent is present) | `string` |   |
| `fontConfig.fontSources[].type` (Required when parent is present) | `string` |   |
| `fontConfig.fontSources[].style` (Required when parent is present) | `string` |   |
| `fontConfig.fontSources[].weight` (Required when parent is present) | `string` |   |
| `fontConfig.fontSources[].display` (Required when parent is present) | `string` |   |
| `font` | `file` |   |
| `fontUrl` | `string (uri)` | Public URL of a font file in the Assets library to use, instead of uploading bytes. It is stored as fontConfig.fontSources\[0\].url. |
| `removePreviousFontUrl` | `boolean` |   |

### Responses

#### 201

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

#### 400

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

Body validation failed, no font file was provided, or the font configuration carries no font source. A malformed fontConfig arrives as invalidFormat against that field in errors\[\]

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"`, `"fontFileRequired"`, `"fontConfigInvalid"` |
| `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 tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound, tenantPreferenceNotFound

Same fields as [Update a tenant settings (404)](https://www.subrite.no/developers/tenant?md=true#patch-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 413

fileSizeExceeded

#### 415

invalidFileType

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 502

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

The font could not be stored; nothing was saved

Same fields as [Upload a tenant settings image (502)](https://www.subrite.no/developers/tenant?md=true#post-api-v1-tenants-settings-images).

**Example response**

`application/json`

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

### Example request

```bash
curl https://api.subrite.no/api/v1/tenants/settings/fonts \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --form 'fontType=PrimaryFont' \
  --form 'font=@<file>'
```

### Example response

201 · `application/json`

```json
true
```

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

`GET /api/v1/tenants`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `page` | query | `number` | Default: `1` · `minimum`: `1` |
| `take` | query | `number` | Default: `10` · `minimum`: `1`, `maximum`: `50` |
| `orderBy` | query | `string` | Allowed values: `"createdAt"`, `"id"`, `"updatedAt"` · Default: `"createdAt"` |
| `orderDirection` | query | `string` | Allowed values: `"asc"`, `"desc"` · Default: `"desc"` |

### Responses

#### 200

#### 400

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

Query 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

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

unauthorized

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

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

<a id="get-api-v1-tenants-id"></a>
## Get a tenant by id

`GET /api/v1/tenants/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

Same fields as [Get tenants settings (200)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 400

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

The id is not an integer

| 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

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

unauthorized

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 404

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

tenantNotFound

Same fields as [Get tenants settings (404)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

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

### Example response

200 · `application/json`

```json
{
  "market": "NO",
  "productName": "enterprise",
  "additionalFeatures": [
    "email"
  ],
  "disabledFeatures": [
    "email"
  ],
  "id": 0,
  "name": "string",
  "isActive": true,
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "tenantContact": "string",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "oauthProviders": [
    {}
  ],
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "address": {
    "entityId": "string",
    "entity": "string",
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "addressType": "primary",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "isSynced": true,
    "lastSyncedAt": "2019-08-24T14:15:22Z",
    "route": "string",
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "emailSenderId": 0,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsOtp": true,
  "smsSenderId": 0,
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  }
}
```

<a id="patch-api-v1-tenants-id"></a>
## Update a tenant

`PATCH /api/v1/tenants/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `isActive` | `boolean` |   |
| `isOnboarding` | `boolean` | Onboarding mode. While true the platform performs no outbound or scheduled work for this tenant. Setting it to false is go-live and re-stamps wentLiveAt each time. |
| `address` | `TenantAddressDto` |   |
| `address.companyName` | `string` | `maxLength`: `255` |
| `address.organizationNo` | `string` | `maxLength`: `255` |
| `address.line1` | `string` | `maxLength`: `255` |
| `address.line2` | `string` | `maxLength`: `255` |
| `address.city` | `string` | `maxLength`: `255` |
| `address.state` | `string` | `maxLength`: `255` |
| `address.postCode` | `string` | `maxLength`: `255` |
| `address.country` | `string` | `maxLength`: `255` |
| `address.name` | `string` | `maxLength`: `255` |
| `address.email` | `string` | `maxLength`: `255` |
| `address.invoiceReference` | `string` | `maxLength`: `255` |
| `address.addressType` | `AddressType` | Allowed values: `"primary"`, `"delivery"`, `"billing"`, `"not_set"` |
| `productName` | `string` | Product name for the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `additionalFeatures` | `array of string` | Additional features enabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `disabledFeatures` | `array of string` | Features disabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `name` | `string` | `maxLength`: `255` |
| `defaultLanguage` | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `hostName` | `string` | `maxLength`: `255`, `pattern`: `HOSTNAME_PATTERN` |
| `logo` | `string` |   |
| `favicon` | `string` |   |
| `authLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` |
| `siteUrl` | `string` |   |
| `termsUrl` | `string` |   |
| `privacyUrl` | `string` |   |
| `gtm` | `string` | `maxLength`: `255` |
| `taxRates` | `array of number` |   |
| `smsOtp` | `boolean` |   |
| `emailOtpEnabled` | `boolean` |   |
| `smsOtpEnabled` | `boolean` |   |
| `smsOtpFallbackEnabled` | `boolean` |   |
| `primaryOtpChannel` | `string` | Allowed values: `"email"`, `"sms"` |
| `tenantContact` | `string` | `maxLength`: `255` |
| `emailSenderId` | `number` |   |
| `smsSenderId` | `number` |   |
| `emailProvider` | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `emailProviderAPIKey` | `string` |   |
| `emailProviderSignatureVerificationKey` | `string` |   |
| `registeredBusinessNo` | `string` | `maxLength`: `255` |
| `bankAccountNo` | `string` | `maxLength`: `255` |
| `swiftCode` | `string` | `maxLength`: `255` |
| `iban` | `string` | `maxLength`: `255` |
| `defaultLogoutURL` | `string` |   |
| `postalAddress` | `string` | `maxLength`: `255` |
| `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` |   |

**Example request body**

`application/json`

```json
{
  "isActive": true,
  "isOnboarding": true,
  "address": {
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "addressType": "primary"
  },
  "productName": "enterprise",
  "additionalFeatures": [
    "insights",
    "podcasts"
  ],
  "disabledFeatures": [
    "sms"
  ],
  "name": "string",
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "tenantContact": "string",
  "emailSenderId": 0,
  "smsSenderId": 0,
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  }
}
```

### Responses

#### 200

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

Same fields as [Get tenants settings (200)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 400

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

Body validation failed, the id is not an integer, the product and feature-entitlement combination is not valid, or the login-method settings contradict each other; field codes in errors\[\]

Same fields as [Update a tenant settings (400)](https://www.subrite.no/developers/tenant?md=true#patch-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 401

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

unauthorized

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 404

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

tenantNotFound

Same fields as [Get tenants settings (404)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 409

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

The selected default sender is not approved for this tenant

Same fields as [Update a tenant settings (409)](https://www.subrite.no/developers/tenant?md=true#patch-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/tenants/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "isActive": true,
  "isOnboarding": true,
  "address": {
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "addressType": "primary"
  },
  "productName": "enterprise",
  "additionalFeatures": [
    "insights",
    "podcasts"
  ],
  "disabledFeatures": [
    "sms"
  ],
  "name": "string",
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "authLogoHeight": 1,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "smsOtp": true,
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email",
  "tenantContact": "string",
  "emailSenderId": 0,
  "smsSenderId": 0,
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  }
}'
```

### Example response

200 · `application/json`

```json
{
  "market": "NO",
  "productName": "enterprise",
  "additionalFeatures": [
    "email"
  ],
  "disabledFeatures": [
    "email"
  ],
  "id": 0,
  "name": "string",
  "isActive": true,
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "tenantContact": "string",
  "registeredBusinessNo": "string",
  "bankAccountNo": "string",
  "swiftCode": "string",
  "iban": "<iban>",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "oauthProviders": [
    {}
  ],
  "emailProvider": "brevo",
  "emailProviderAPIKey": "<emailProviderAPIKey>",
  "emailProviderSignatureVerificationKey": "<emailProviderSignatureVerificationKey>",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "address": {
    "entityId": "string",
    "entity": "string",
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "addressType": "primary",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "isSynced": true,
    "lastSyncedAt": "2019-08-24T14:15:22Z",
    "route": "string",
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "emailSenderId": 0,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "smsOtp": true,
  "smsSenderId": 0,
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  }
}
```

<a id="patch-api-v1-tenants-id-preference"></a>
## Update a tenants preferences

`PATCH /api/v1/tenants/{id}/preference`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `welcomeImage` | `string` | Can be null |
| `headerText` | `string` | Can be null |
| `headerLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` · Can be null |
| `welcomePrimaryText` | `string` | Can be null |
| `welcomeSecondaryText` | `string` | Can be null |
| `memberInfoText` | `string` | Can be null |
| `paymentConfirmationImage` | `string` | Can be null |
| `subscriptionChangeCompleteScreenImage` | `string` | Can be null |
| `paymentConfirmationPrimaryText` | `string` | Can be null |
| `paymentConfirmationSecondaryTextLoggedOut` | `string` | Can be null |
| `paymentConfirmationSecondaryTextLoggedIn` | `string` | Can be null |
| `headerColor` | `string` | Can be null |
| `headerTextColor` | `string` | Can be null |
| `primaryButtonColor` | `string` | Can be null |
| `primaryButtonHoverColor` | `string` | Can be null |
| `primaryButtonTextColor` | `string` | Can be null |
| `primaryStepColor` | `string` | Can be null |
| `onboardingFlow` | `boolean` |   |
| `invoiceLogo` | `string` | Can be null |
| `allowedDaysAfterExpiry` | `number` | `minimum`: `0` |
| `onNewUserCompletedPackageId` | `number` | Can be null |
| `allowBuyNewSubsFromMypage` | `boolean` |   |
| `allowBuyGiftSubsFromMypage` | `boolean` |   |
| `onNewUserCompletedNewsletterAndConsent` | `boolean` |   |
| `showBuyNewSubscriptionCTA` | `boolean` |   |
| `buyNewSubscriptionPackageId` | `number` | Can be null |
| `showPodcastSearch` | `boolean` |   |
| `eInvoicePaymentPreference` | `EInvoicePaymentPreference` |   |
| `eInvoicePaymentPreference.initialActivation` (Required when parent is present) | `INITIAL_ACTIVATION` | Allowed values: `"ON_PAYMENT"`, `"ON_ORDER"` |
| `eInvoicePaymentPreference.dueDaysAfterOrderForInitial` (Required when parent is present) | `number` |   |
| `eInvoicePaymentPreference.initialDeactivation` (Required when parent is present) | `DEACTIVATION_POLICY` | Allowed values: `"ON_DUE"`, `"ON_RENEWAL"`, `"NEVER"` |
| `eInvoicePaymentPreference.initialOnDueDeactivationBufferDays` (Required when parent is present) | `number` |   |
| `eInvoicePaymentPreference.orderDaysBeforeRenewal` (Required when parent is present) | `number` |   |
| `eInvoicePaymentPreference.dueDaysAfterOrderForRecurring` (Required when parent is present) | `number` |   |
| `eInvoicePaymentPreference.recurringDeactivation` (Required when parent is present) | `DEACTIVATION_POLICY` | Allowed values: `"ON_DUE"`, `"ON_RENEWAL"`, `"NEVER"` |
| `eInvoicePaymentPreference.recurringOnDueDeactivationBufferDays` (Required when parent is present) | `number` |   |
| `checkoutWelcomeCTAConfig` | `CheckoutWelcomeCTAConfig` |   |
| `checkoutWelcomeCTAConfig.default` (Required when parent is present) | `boolean` |   |
| `checkoutWelcomeCTAConfig.primary` (Required when parent is present) | `CheckoutWelcomeCTAButtonConfig` |   |
| `checkoutWelcomeCTAConfig.primary.text` (Required when parent is present) | `Translation` | Nested fields omitted: depth limit. |
| `checkoutWelcomeCTAConfig.primary.url` (Required when parent is present) | `string` |   |
| `checkoutWelcomeCTAConfig.primary.type` (Required when parent is present) | `string` | Allowed values: `"main_site"`, `"my_page"`, `"custom"` |
| `checkoutWelcomeCTAConfig.secondary` (Required when parent is present) | `CheckoutWelcomeCTASecondaryButtonConfig` |   |
| `checkoutWelcomeCTAConfig.secondary.text` (Required when parent is present) | `Translation` | Nested fields omitted: depth limit. |
| `checkoutWelcomeCTAConfig.secondary.url` (Required when parent is present) | `string` |   |
| `checkoutWelcomeCTAConfig.secondary.type` (Required when parent is present) | `string` | Allowed values: `"main_site"`, `"my_page"`, `"custom"` |
| `checkoutWelcomeCTAConfig.secondary.show` (Required when parent is present) | `boolean` |   |
| `giftSubscriptionConfirmationTextLoggedIn` | `string` | Can be null |
| `giftSubscriptionWelcomeHelpText` | `string` | Can be null |
| `systemUpgradeNotification` | `Translation` | Can be null |
| `systemUpgradeNotification.en` (Required when parent is present) | `string` |   |
| `systemUpgradeNotification.no` (Required when parent is present) | `string` |   |
| `systemUpgradeNotification.sv` | `string` |   |
| `systemUpgradeNotification.da` | `string` |   |
| `systemUpgradeNotification.key` | `string` |   |
| `orderCtaLabel` | `Translation` | Can be null |
| `orderCtaLabel.en` (Required when parent is present) | `string` |   |
| `orderCtaLabel.no` (Required when parent is present) | `string` |   |
| `orderCtaLabel.sv` | `string` |   |
| `orderCtaLabel.da` | `string` |   |
| `orderCtaLabel.key` | `string` |   |
| `inputFieldConfig` | `array of PageInputFieldConfig` |   |
| `inputFieldConfig[].page` (Required when parent is present) | `string` |   |
| `inputFieldConfig[].systemFields` (Required when parent is present) | `array of SystemFieldConfig` | Nested fields omitted: field limit. |
| `inputFieldConfig[].customProperties` (Required when parent is present) | `array of string` |   |
| `maintenanceModeConfig` | `MaintenanceModeConfig` | Can be null |
| `maintenanceModeConfig.enabled` (Required when parent is present) | `boolean` |   |
| `maintenanceModeConfig.globalMessage` (Required when parent is present) | `GlobalMessage` | Nested fields omitted: field limit. |
| `permissionLevelForBuyingMultipleSubscriptions` | `PermissionLevelForBuyingMultipleSubscriptions` | Allowed values: `"allow"`, `"warn"`, `"block"` |
| `theme` | `ThemeConfig` | Can be null |
| `theme.typography` (Required when parent is present) | `TypographyConfig` | Nested fields omitted: field limit. |
| `customFieldsOnMemberCard` | `array of string` |   |
| `visibleAdditionalFieldsOnMypage` | `array of string` |   |
| `customFieldsOnInvoice` | `array of CustomFieldsOnInvoiceDto` | Can be null |
| `customFieldsOnInvoice[].paymentProvider` (Required when parent is present) | `PaymentProvider` | Allowed values: `"stripe"`, `"vipps"`, `"external"`, `"nets"`, `"efaktura-avtalegiro-ehf"`, `"swedbankpay"` |
| `customFieldsOnInvoice[].properties` (Required when parent is present) | `array of PropertiesConfig` | Nested fields omitted: field limit. |
| `myPagePackageSort` | `MyPagePackageSortConfig` |   |
| `myPagePackageSort.mode` (Required when parent is present) | `MyPagePackageSortMode` | Allowed values: `"name"`, `"custom"` |
| `myPagePackageSort.direction` (Required when parent is present) | `MyPagePackageSortDirection` | Allowed values: `"asc"`, `"desc"` |

**Example request body**

`application/json`

```json
{
  "welcomeImage": "string",
  "headerText": "string",
  "headerLogoHeight": 1,
  "welcomePrimaryText": "string",
  "welcomeSecondaryText": "string",
  "memberInfoText": "string",
  "paymentConfirmationImage": "string",
  "subscriptionChangeCompleteScreenImage": "string",
  "paymentConfirmationPrimaryText": "string",
  "paymentConfirmationSecondaryTextLoggedOut": "string",
  "paymentConfirmationSecondaryTextLoggedIn": "string",
  "headerColor": "string",
  "headerTextColor": "string",
  "primaryButtonColor": "string",
  "primaryButtonHoverColor": "string",
  "primaryButtonTextColor": "string",
  "primaryStepColor": "string",
  "onboardingFlow": true,
  "invoiceLogo": "string",
  "allowedDaysAfterExpiry": 0,
  "onNewUserCompletedPackageId": 0,
  "allowBuyNewSubsFromMypage": true,
  "allowBuyGiftSubsFromMypage": true,
  "onNewUserCompletedNewsletterAndConsent": true,
  "showBuyNewSubscriptionCTA": true,
  "buyNewSubscriptionPackageId": 0,
  "showPodcastSearch": true,
  "eInvoicePaymentPreference": {
    "initialActivation": "ON_PAYMENT",
    "dueDaysAfterOrderForInitial": 0,
    "initialDeactivation": "ON_DUE",
    "initialOnDueDeactivationBufferDays": 0,
    "orderDaysBeforeRenewal": 0,
    "dueDaysAfterOrderForRecurring": 0,
    "recurringDeactivation": "ON_DUE",
    "recurringOnDueDeactivationBufferDays": 0
  },
  "giftSubscriptionConfirmationTextLoggedIn": "string",
  "giftSubscriptionWelcomeHelpText": "string",
  "systemUpgradeNotification": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "orderCtaLabel": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "permissionLevelForBuyingMultipleSubscriptions": "allow",
  "customFieldsOnMemberCard": [
    "string"
  ],
  "visibleAdditionalFieldsOnMypage": [
    "string"
  ],
  "myPagePackageSort": {
    "mode": "name",
    "direction": "asc"
  }
}
```

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `welcomeImage` | `string` | Can be null |
| `headerText` | `string` | Can be null |
| `headerLogoHeight` | `number` | `minimum`: `1`, `maximum`: `500` · Can be null |
| `welcomePrimaryText` | `string` | Can be null |
| `welcomeSecondaryText` | `string` | Can be null |
| `memberInfoText` | `string` | Can be null |
| `paymentConfirmationImage` | `string` | Can be null |
| `subscriptionChangeCompleteScreenImage` | `string` | Can be null |
| `paymentConfirmationPrimaryText` | `string` | Can be null |
| `paymentConfirmationSecondaryTextLoggedOut` | `string` | Can be null |
| `paymentConfirmationSecondaryTextLoggedIn` | `string` | Can be null |
| `headerColor` | `string` | Can be null |
| `headerTextColor` | `string` | Can be null |
| `primaryButtonColor` | `string` | Can be null |
| `primaryButtonHoverColor` | `string` | Can be null |
| `primaryButtonTextColor` | `string` | Can be null |
| `primaryStepColor` | `string` | Can be null |
| `onboardingFlow` | `boolean` |   |
| `invoiceLogo` | `string` | Can be null |
| `allowedDaysAfterExpiry` | `number` | `minimum`: `0` |
| `onNewUserCompletedPackageId` | `number` | Can be null |
| `allowBuyNewSubsFromMypage` | `boolean` |   |
| `allowBuyGiftSubsFromMypage` | `boolean` |   |
| `onNewUserCompletedNewsletterAndConsent` | `boolean` |   |
| `showBuyNewSubscriptionCTA` | `boolean` |   |
| `buyNewSubscriptionPackageId` | `number` | Can be null |
| `showPodcastSearch` | `boolean` |   |
| `eInvoicePaymentPreference` (Required) | `EInvoicePaymentPreference` |   |
| `eInvoicePaymentPreference.initialActivation` (Required) | `INITIAL_ACTIVATION` | Allowed values: `"ON_PAYMENT"`, `"ON_ORDER"` |
| `eInvoicePaymentPreference.dueDaysAfterOrderForInitial` (Required) | `number` |   |
| `eInvoicePaymentPreference.initialDeactivation` (Required) | `DEACTIVATION_POLICY` | Allowed values: `"ON_DUE"`, `"ON_RENEWAL"`, `"NEVER"` |
| `eInvoicePaymentPreference.initialOnDueDeactivationBufferDays` (Required) | `number` |   |
| `eInvoicePaymentPreference.orderDaysBeforeRenewal` (Required) | `number` |   |
| `eInvoicePaymentPreference.dueDaysAfterOrderForRecurring` (Required) | `number` |   |
| `eInvoicePaymentPreference.recurringDeactivation` (Required) | `DEACTIVATION_POLICY` | Allowed values: `"ON_DUE"`, `"ON_RENEWAL"`, `"NEVER"` |
| `eInvoicePaymentPreference.recurringOnDueDeactivationBufferDays` (Required) | `number` |   |
| `checkoutWelcomeCTAConfig` (Required) | `CheckoutWelcomeCTAConfig` |   |
| `checkoutWelcomeCTAConfig.default` (Required) | `boolean` |   |
| `checkoutWelcomeCTAConfig.primary` (Required) | `CheckoutWelcomeCTAButtonConfig` |   |
| `checkoutWelcomeCTAConfig.primary.text` (Required) | `Translation` | Nested fields omitted: depth limit. |
| `checkoutWelcomeCTAConfig.primary.url` (Required) | `string` |   |
| `checkoutWelcomeCTAConfig.primary.type` (Required) | `string` | Allowed values: `"main_site"`, `"my_page"`, `"custom"` |
| `checkoutWelcomeCTAConfig.secondary` (Required) | `CheckoutWelcomeCTASecondaryButtonConfig` |   |
| `checkoutWelcomeCTAConfig.secondary.text` (Required) | `Translation` | Nested fields omitted: depth limit. |
| `checkoutWelcomeCTAConfig.secondary.url` (Required) | `string` |   |
| `checkoutWelcomeCTAConfig.secondary.type` (Required) | `string` | Allowed values: `"main_site"`, `"my_page"`, `"custom"` |
| `checkoutWelcomeCTAConfig.secondary.show` (Required) | `boolean` |   |
| `giftSubscriptionConfirmationTextLoggedIn` | `string` | Can be null |
| `giftSubscriptionWelcomeHelpText` | `string` | Can be null |
| `systemUpgradeNotification` (Required) | `Translation` | Can be null |
| `systemUpgradeNotification.en` (Required when parent is present) | `string` |   |
| `systemUpgradeNotification.no` (Required when parent is present) | `string` |   |
| `systemUpgradeNotification.sv` | `string` |   |
| `systemUpgradeNotification.da` | `string` |   |
| `systemUpgradeNotification.key` | `string` |   |
| `orderCtaLabel` | `Translation` | Can be null |
| `orderCtaLabel.en` (Required when parent is present) | `string` |   |
| `orderCtaLabel.no` (Required when parent is present) | `string` |   |
| `orderCtaLabel.sv` | `string` |   |
| `orderCtaLabel.da` | `string` |   |
| `orderCtaLabel.key` | `string` |   |
| `inputFieldConfig` (Required) | `array of PageInputFieldConfig` |   |
| `inputFieldConfig[].page` (Required when parent is present) | `string` |   |
| `inputFieldConfig[].systemFields` (Required when parent is present) | `array of SystemFieldConfig` | Nested fields omitted: field limit. |
| `inputFieldConfig[].customProperties` (Required when parent is present) | `array of string` |   |
| `maintenanceModeConfig` (Required) | `MaintenanceModeConfig` | Can be null |
| `maintenanceModeConfig.enabled` (Required when parent is present) | `boolean` |   |
| `maintenanceModeConfig.globalMessage` (Required when parent is present) | `GlobalMessage` | Nested fields omitted: field limit. |
| `permissionLevelForBuyingMultipleSubscriptions` (Required) | `PermissionLevelForBuyingMultipleSubscriptions` | Allowed values: `"allow"`, `"warn"`, `"block"` |
| `theme` | `ThemeConfig` | Can be null |
| `theme.typography` (Required when parent is present) | `TypographyConfig` | Nested fields omitted: field limit. |
| `customFieldsOnMemberCard` | `array of string` |   |
| `visibleAdditionalFieldsOnMypage` (Required) | `array of string` |   |
| `customFieldsOnInvoice` (Required) | `array of CustomFieldsOnInvoiceDto` | Can be null |
| `customFieldsOnInvoice[].paymentProvider` (Required when parent is present) | `PaymentProvider` | Allowed values: `"stripe"`, `"vipps"`, `"external"`, `"nets"`, `"efaktura-avtalegiro-ehf"`, `"swedbankpay"` |
| `customFieldsOnInvoice[].properties` (Required when parent is present) | `array of PropertiesConfig` | Nested fields omitted: field limit. |
| `myPagePackageSort` (Required) | `MyPagePackageSortConfig` |   |
| `myPagePackageSort.mode` (Required) | `MyPagePackageSortMode` | Allowed values: `"name"`, `"custom"` |
| `myPagePackageSort.direction` (Required) | `MyPagePackageSortDirection` | Allowed values: `"asc"`, `"desc"` |

#### 400

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

Body validation failed or the id is not an integer; field codes in errors\[\]

Same fields as [Get all tenants (400)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants).

**Example response**

`application/json`

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

#### 401

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

unauthorized

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 404

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

tenantNotFound, tenantPreferenceNotFound

Same fields as [Update a tenant settings (404)](https://www.subrite.no/developers/tenant?md=true#patch-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/tenants/{id}/preference' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "welcomeImage": "string",
  "headerText": "string",
  "headerLogoHeight": 1,
  "welcomePrimaryText": "string",
  "welcomeSecondaryText": "string",
  "memberInfoText": "string",
  "paymentConfirmationImage": "string",
  "subscriptionChangeCompleteScreenImage": "string",
  "paymentConfirmationPrimaryText": "string",
  "paymentConfirmationSecondaryTextLoggedOut": "string",
  "paymentConfirmationSecondaryTextLoggedIn": "string",
  "headerColor": "string",
  "headerTextColor": "string",
  "primaryButtonColor": "string",
  "primaryButtonHoverColor": "string",
  "primaryButtonTextColor": "string",
  "primaryStepColor": "string",
  "onboardingFlow": true,
  "invoiceLogo": "string",
  "allowedDaysAfterExpiry": 0,
  "onNewUserCompletedPackageId": 0,
  "allowBuyNewSubsFromMypage": true,
  "allowBuyGiftSubsFromMypage": true,
  "onNewUserCompletedNewsletterAndConsent": true,
  "showBuyNewSubscriptionCTA": true,
  "buyNewSubscriptionPackageId": 0,
  "showPodcastSearch": true,
  "eInvoicePaymentPreference": {
    "initialActivation": "ON_PAYMENT",
    "dueDaysAfterOrderForInitial": 0,
    "initialDeactivation": "ON_DUE",
    "initialOnDueDeactivationBufferDays": 0,
    "orderDaysBeforeRenewal": 0,
    "dueDaysAfterOrderForRecurring": 0,
    "recurringDeactivation": "ON_DUE",
    "recurringOnDueDeactivationBufferDays": 0
  },
  "checkoutWelcomeCTAConfig": {
    "default": true,
    "primary": {},
    "secondary": {}
  },
  "giftSubscriptionConfirmationTextLoggedIn": "string",
  "giftSubscriptionWelcomeHelpText": "string",
  "systemUpgradeNotification": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "orderCtaLabel": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "inputFieldConfig": [
    {
      "systemFields": [],
      "customProperties": []
    }
  ],
  "maintenanceModeConfig": {
    "enabled": true,
    "globalMessage": {}
  },
  "permissionLevelForBuyingMultipleSubscriptions": "allow",
  "theme": {
    "typography": {}
  },
  "customFieldsOnMemberCard": [
    "string"
  ],
  "visibleAdditionalFieldsOnMypage": [
    "string"
  ],
  "customFieldsOnInvoice": [
    {
      "properties": []
    }
  ],
  "myPagePackageSort": {
    "mode": "name",
    "direction": "asc"
  }
}'
```

### Example response

200 · `application/json`

```json
{
  "welcomeImage": "string",
  "headerText": "string",
  "headerLogoHeight": 1,
  "welcomePrimaryText": "string",
  "welcomeSecondaryText": "string",
  "memberInfoText": "string",
  "paymentConfirmationImage": "string",
  "subscriptionChangeCompleteScreenImage": "string",
  "paymentConfirmationPrimaryText": "string",
  "paymentConfirmationSecondaryTextLoggedOut": "string",
  "paymentConfirmationSecondaryTextLoggedIn": "string",
  "headerColor": "string",
  "headerTextColor": "string",
  "primaryButtonColor": "string",
  "primaryButtonHoverColor": "string",
  "primaryButtonTextColor": "string",
  "primaryStepColor": "string",
  "onboardingFlow": true,
  "invoiceLogo": "string",
  "allowedDaysAfterExpiry": 0,
  "onNewUserCompletedPackageId": 0,
  "allowBuyNewSubsFromMypage": true,
  "allowBuyGiftSubsFromMypage": true,
  "onNewUserCompletedNewsletterAndConsent": true,
  "showBuyNewSubscriptionCTA": true,
  "buyNewSubscriptionPackageId": 0,
  "showPodcastSearch": true,
  "eInvoicePaymentPreference": {
    "initialActivation": "ON_PAYMENT",
    "dueDaysAfterOrderForInitial": 0,
    "initialDeactivation": "ON_DUE",
    "initialOnDueDeactivationBufferDays": 0,
    "orderDaysBeforeRenewal": 0,
    "dueDaysAfterOrderForRecurring": 0,
    "recurringDeactivation": "ON_DUE",
    "recurringOnDueDeactivationBufferDays": 0
  },
  "checkoutWelcomeCTAConfig": {
    "default": true,
    "primary": {},
    "secondary": {}
  },
  "giftSubscriptionConfirmationTextLoggedIn": "string",
  "giftSubscriptionWelcomeHelpText": "string",
  "systemUpgradeNotification": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "orderCtaLabel": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "inputFieldConfig": [
    {
      "systemFields": [],
      "customProperties": []
    }
  ],
  "maintenanceModeConfig": {
    "enabled": true,
    "globalMessage": {}
  },
  "permissionLevelForBuyingMultipleSubscriptions": "allow",
  "theme": {
    "typography": {}
  },
  "customFieldsOnMemberCard": [
    "string"
  ],
  "visibleAdditionalFieldsOnMypage": [
    "string"
  ],
  "customFieldsOnInvoice": [
    {
      "properties": []
    }
  ],
  "myPagePackageSort": {
    "mode": "name",
    "direction": "asc"
  }
}
```

<a id="get-api-v1-tenants-hostname-hostname"></a>
## Get a tenant details by hostname

`GET /api/v1/tenants/hostname/{hostname}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `isOnboarding` (Required) | `boolean` | Onboarding mode. The member-facing site is replaced by the maintenance screen while true, because the imported data is still being validated. The admin route group is not gated, so the onboarding team and the customer admins keep full access. |
| `market` (Required) | `string` | Operating market of the tenant. · Allowed values: `"NO"`, `"SE"`, `"DK"` |
| `productName` | `string` | Product name for the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `additionalFeatures` | `array of string` | Additional features enabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `disabledFeatures` | `array of string` | Features disabled for the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `featuresMap` (Required) | `object` |   |
| `featuresMap.email` | `object` |   |
| `featuresMap.email.enabled` | `boolean` |   |
| `featuresMap.email.upgradable` | `boolean` |   |
| `featuresMap.sms` | `object` |   |
| `featuresMap.sms.enabled` | `boolean` |   |
| `featuresMap.sms.upgradable` | `boolean` |   |
| `featuresMap.push` | `object` | Nested fields omitted: field limit. |
| `featuresMap.podcasts` | `object` | Nested fields omitted: field limit. |
| `featuresMap.subscription` | `object` | Nested fields omitted: field limit. |
| `featuresMap.insights` | `object` | Nested fields omitted: field limit. |
| `featuresMap.dashboard` | `object` | Nested fields omitted: field limit. |
| `featuresMap.automation` | `object` | Nested fields omitted: field limit. |
| `featuresMap.export` | `object` | Nested fields omitted: field limit. |
| `featuresMap.accounting` | `object` | Nested fields omitted: field limit. |
| `featuresMap.invoices` | `object` | Nested fields omitted: field limit. |
| `featuresMap.ai` | `object` | Nested fields omitted: field limit. |
| `id` (Required) | `number` |   |
| `name` (Required) | `string` |   |
| `isActive` (Required) | `boolean` |   |
| `defaultLanguage` (Required) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `hostName` (Required) | `string` |   |
| `logo` (Required) | `string` |   |
| `favicon` (Required) | `string` |   |
| `authLogo` (Required) | `string` |   |
| `authLogoHeight` (Required) | `number` | Can be null |
| `siteUrl` (Required) | `string` |   |
| `termsUrl` (Required) | `string` |   |
| `privacyUrl` (Required) | `string` |   |
| `gtm` (Required) | `string` |   |
| `taxRates` | `array of number` |   |
| `tenantContact` (Required) | `string` |   |
| `defaultLogoutURL` (Required) | `string` |   |
| `postalAddress` (Required) | `string` |   |
| `preference` (Required) | `PreferenceResponseDto` | Nested fields omitted: field limit. |
| `settings` (Required) | `TenantSettingsResponseDto` |   |
| `settings.kilkayaEnabled` (Required) | `boolean` |   |
| `settings.kilkayaHost` (Required) | `string` | Can be null |
| `settings.kilkayaCustomerId` (Required) | `string` | Can be null |
| `settings.discardTopicsInPushNotifications` (Required) | `boolean` |   |
| `settings.aiResidency` (Required) | `object` |   |
| `settings.isOnboarding` (Required) | `boolean` |   |
| `settings.wentLiveAt` (Required) | `string (date-time)` | Can be null |
| `settings.emailOtpEnabled` (Required) | `boolean` |   |
| `settings.smsOtpEnabled` (Required) | `boolean` |   |
| `settings.smsOtpFallbackEnabled` (Required) | `boolean` |   |
| `settings.primaryOtpChannel` (Required) | `string` | Allowed values: `"email"`, `"sms"` |
| `settings.diEnabled` (Required) | `boolean` |   |
| `settings.diCustomerSystem` (Required) | `string` | Can be null |
| `settings.tenantId` (Required) | `number` |   |
| `settings.tenant` (Required) | `Tenant` | Nested fields omitted: field limit. |
| `settings.id` (Required) | `number` |   |
| `settings.createdAt` (Required) | `string (date-time)` |   |
| `settings.updatedAt` (Required) | `string (date-time)` |   |
| `settings.deletedAt` (Required) | `string (date-time)` |   |
| `settings.metaData` (Required) | `object` |   |
| `oauthProviders` (Required) | `array of PublicOAuthProvider` |   |
| `oauthProviders[].id` (Required when parent is present) | `string` |   |
| `oauthProviders[].clientId` (Required when parent is present) | `string` |   |
| `oauthProviders[].name` (Required when parent is present) | `string` |   |
| `emailProvider` (Required) | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `createdAt` (Required) | `string (date-time)` |   |
| `updatedAt` (Required) | `string (date-time)` |   |
| `address` | `Address` | Nested fields omitted: field limit. |
| `otpTemplateId` | `Translation` | Nested fields omitted: field limit. |
| `brandKitId` | `string` |   |
| `smsOtp` (Required) | `boolean` |   |
| `smsSenderId` | `number` |   |
| `smsSender` | `CommunicationSenderResponseDto` | Nested fields omitted: field limit. |
| `emailSenderId` | `number` |   |
| `emailSender` | `CommunicationSenderResponseDto` | Nested fields omitted: field limit. |
| `emailOtpEnabled` (Required) | `boolean` |   |
| `smsOtpEnabled` (Required) | `boolean` |   |
| `smsOtpFallbackEnabled` (Required) | `boolean` |   |
| `primaryOtpChannel` (Required) | `string` | Allowed values: `"email"`, `"sms"` |

#### 400

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

The path segment is not a registrable hostname

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

**Example response**

`application/json`

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

#### 401

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

unauthorized

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

#### 404

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

tenantNotFound

Same fields as [Get tenants settings (404)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

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

### Example response

200 · `application/json`

```json
{
  "isOnboarding": true,
  "market": "NO",
  "productName": "enterprise",
  "additionalFeatures": [
    "email"
  ],
  "disabledFeatures": [
    "email"
  ],
  "featuresMap": {
    "email": {},
    "sms": {},
    "push": {},
    "podcasts": {},
    "subscription": {},
    "insights": {},
    "dashboard": {},
    "automation": {},
    "export": {},
    "accounting": {},
    "invoices": {},
    "ai": {},
    "property1": {},
    "property2": {}
  },
  "id": 0,
  "name": "string",
  "isActive": true,
  "defaultLanguage": "en",
  "hostName": "string",
  "logo": "string",
  "favicon": "string",
  "authLogo": "string",
  "authLogoHeight": 0,
  "siteUrl": "string",
  "termsUrl": "string",
  "privacyUrl": "string",
  "gtm": "string",
  "taxRates": [
    0
  ],
  "tenantContact": "string",
  "defaultLogoutURL": "string",
  "postalAddress": "<postalAddress>",
  "preference": {
    "welcomeImage": "string",
    "headerText": "string",
    "headerLogoHeight": 1,
    "welcomePrimaryText": "string",
    "welcomeSecondaryText": "string",
    "memberInfoText": "string",
    "paymentConfirmationImage": "string",
    "subscriptionChangeCompleteScreenImage": "string",
    "paymentConfirmationPrimaryText": "string",
    "paymentConfirmationSecondaryTextLoggedOut": "string",
    "paymentConfirmationSecondaryTextLoggedIn": "string",
    "headerColor": "string",
    "headerTextColor": "string",
    "primaryButtonColor": "string",
    "primaryButtonHoverColor": "string",
    "primaryButtonTextColor": "string",
    "primaryStepColor": "string",
    "onboardingFlow": true,
    "invoiceLogo": "string",
    "allowedDaysAfterExpiry": 0,
    "onNewUserCompletedPackageId": 0,
    "allowBuyNewSubsFromMypage": true,
    "allowBuyGiftSubsFromMypage": true,
    "onNewUserCompletedNewsletterAndConsent": true,
    "showBuyNewSubscriptionCTA": true,
    "buyNewSubscriptionPackageId": 0,
    "showPodcastSearch": true,
    "eInvoicePaymentPreference": {},
    "checkoutWelcomeCTAConfig": {},
    "giftSubscriptionConfirmationTextLoggedIn": "string",
    "giftSubscriptionWelcomeHelpText": "string",
    "systemUpgradeNotification": {},
    "orderCtaLabel": {},
    "inputFieldConfig": [],
    "maintenanceModeConfig": {},
    "permissionLevelForBuyingMultipleSubscriptions": "allow",
    "theme": {},
    "customFieldsOnMemberCard": [],
    "visibleAdditionalFieldsOnMypage": [],
    "customFieldsOnInvoice": [],
    "myPagePackageSort": {}
  },
  "settings": {
    "kilkayaEnabled": true,
    "kilkayaHost": "string",
    "kilkayaCustomerId": "string",
    "discardTopicsInPushNotifications": true,
    "aiResidency": {},
    "isOnboarding": true,
    "wentLiveAt": "2019-08-24T14:15:22Z",
    "emailOtpEnabled": true,
    "smsOtpEnabled": true,
    "smsOtpFallbackEnabled": true,
    "primaryOtpChannel": "email",
    "diEnabled": true,
    "diCustomerSystem": "string",
    "tenantId": 0,
    "tenant": {
      "additionalFeatures": [],
      "disabledFeatures": [],
      "taxRates": [],
      "products": [],
      "users": [],
      "members": [],
      "roles": [],
      "subscriptionPlans": [],
      "packages": [],
      "invoices": [],
      "orders": [],
      "paymentProviders": [],
      "newslettersProviderConfig": [],
      "paymentProviderConfigs": [],
      "oidcClients": [],
      "oauthProviders": [],
      "activityLogs": [],
      "m2m_api_clients": [],
      "customProperties": [],
      "consents": [],
      "communicationTemplates": [],
      "additionalHostnames": [],
      "exportHistory": [],
      "arReportHistory": [],
      "mypageCardsSettings": [],
      "webhooks": [],
      "customOrders": [],
      "customOrderSources": [],
      "brandKits": [],
      "communicationReceivers": [],
      "metaData": {}
    },
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "oauthProviders": [
    {}
  ],
  "emailProvider": "brevo",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "address": {
    "entityId": "string",
    "entity": "string",
    "companyName": "string",
    "organizationNo": "string",
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postCode": "string",
    "country": "string",
    "addressType": "primary",
    "name": "string",
    "email": "string",
    "invoiceReference": "string",
    "isSynced": true,
    "lastSyncedAt": "2019-08-24T14:15:22Z",
    "route": "string",
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "otpTemplateId": {
    "en": "string",
    "no": "string",
    "sv": "string",
    "da": "string",
    "key": "string"
  },
  "brandKitId": "string",
  "smsOtp": true,
  "smsSenderId": 0,
  "smsSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "emailSenderId": 0,
  "emailSender": {
    "id": 0,
    "senderName": "<senderName>",
    "senderEmail": "string",
    "replyTo": "string",
    "status": "pending",
    "communicationChannel": "sms",
    "requestSentAt": "2019-08-24T14:15:22Z",
    "providerRegion": "global"
  },
  "emailOtpEnabled": true,
  "smsOtpEnabled": true,
  "smsOtpFallbackEnabled": true,
  "primaryOtpChannel": "email"
}
```

<a id="get-api-v1-tenants-additional-hostname-available"></a>
## Get all available hostnames. (Not occupied by any brand kit)

`GET /api/v1/tenants/additional-hostname/available`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

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

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl https://api.subrite.no/api/v1/tenants/additional-hostname/available \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "id": 0,
    "hostName": "string",
    "tenantId": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "brandKitId": "string",
    "brandKit": {
      "hostnames": []
    }
  }
]
```

<a id="get-api-v1-tenants-additional-hostname-id"></a>
## Get additional hostnames of a tenant

`GET /api/v1/tenants/additional-hostname/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

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

#### 400

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

The id is not an integer

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound

Same fields as [Get tenants settings (404)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

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

### Example response

200 · `application/json`

```json
[
  {
    "id": 0,
    "hostName": "string",
    "tenantId": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "brandKitId": "string",
    "brandKit": {
      "hostnames": []
    }
  }
]
```

<a id="post-api-v1-tenants-additional-hostname-id"></a>
## Add additional hostname to a tenant

`POST /api/v1/tenants/additional-hostname/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `hostName` (Required) | `string` |   |
| `brandKitId` | `string (uuid)` | Can be null |

**Example request body**

`application/json`

```json
{
  "hostName": "string",
  "brandKitId": "0d0050df-b55b-4bc4-9157-db98df0f07d0"
}
```

### Responses

#### 201

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

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

#### 400

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

Body validation failed or the id is not an integer; mustBeAValidDomainName arrives in errors\[\] against hostName

Same fields as [Get all tenants (400)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants).

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound

Same fields as [Get tenants settings (404)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 409

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

The hostname is already registered; the code arrives in errors\[\] against hostName

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"hostnameAlreadyInUse"` |
| `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": "hostnameAlreadyInUse",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/tenants/additional-hostname/{id}' \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "hostName": "string",
  "brandKitId": "0d0050df-b55b-4bc4-9157-db98df0f07d0"
}'
```

### Example response

201 · `application/json`

```json
[
  {
    "id": 0,
    "hostName": "string",
    "tenantId": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "brandKitId": "string",
    "brandKit": {
      "hostnames": []
    }
  }
]
```

<a id="delete-api-v1-tenants-additional-hostname-id"></a>
## Remove additional hostname of a tenant

`DELETE /api/v1/tenants/additional-hostname/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `hostName` (Required) | `string` |   |

**Example request body**

`application/json`

```json
{
  "hostName": "string"
}
```

### Responses

#### 200

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

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

#### 400

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

Body validation failed or the id is not an integer; field codes in errors\[\]

Same fields as [Get all tenants (400)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants).

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound, hostnameNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"tenantNotFound"`, `"hostnameNotFound"` |
| `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": "tenantNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/tenants/additional-hostname/{id}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "hostName": "string"
}'
```

### Example response

200 · `application/json`

```json
[
  {
    "id": 0,
    "hostName": "string",
    "tenantId": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "brandKitId": "string",
    "brandKit": {
      "hostnames": []
    }
  }
]
```

<a id="patch-api-v1-tenants-additional-hostname-id"></a>
## Update additional hostname of a tenant

`PATCH /api/v1/tenants/additional-hostname/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `newHostName` (Required) | `string` |   |
| `hostName` (Required) | `string` |   |
| `brandKitId` | `string (uuid)` | Can be null |

**Example request body**

`application/json`

```json
{
  "newHostName": "string",
  "hostName": "string",
  "brandKitId": "0d0050df-b55b-4bc4-9157-db98df0f07d0"
}
```

### Responses

#### 200

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

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

#### 400

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

Body validation failed or the id is not an integer; mustBeAValidDomainName arrives in errors\[\] against hostName or newHostName

Same fields as [Get all tenants (400)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants).

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

**Example response**

`application/json`

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

#### 404

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

tenantNotFound, hostnameNotFound

Same fields as [Remove additional hostname of a tenant (404)](https://www.subrite.no/developers/tenant?md=true#delete-api-v1-tenants-additional-hostname-id).

**Example response**

`application/json`

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

#### 409

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

The new hostname is already registered; the code arrives in errors\[\] against newHostName

Same fields as [Add additional hostname to a tenant (409)](https://www.subrite.no/developers/tenant?md=true#post-api-v1-tenants-additional-hostname-id).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [Get tenants settings (403)](https://www.subrite.no/developers/tenant?md=true#get-api-v1-tenants-settings).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/tenants/additional-hostname/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "newHostName": "string",
  "hostName": "string",
  "brandKitId": "0d0050df-b55b-4bc4-9157-db98df0f07d0"
}'
```

### Example response

200 · `application/json`

```json
[
  {
    "id": 0,
    "hostName": "string",
    "tenantId": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "brandKitId": "string",
    "brandKit": {
      "hostnames": []
    }
  }
]
```
