# CommunicationTemplate

**Summary:** Endpoints for CommunicationTemplate

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

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

`GET /api/v1/communication-template`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `[].name` (Required when parent is present) | `string` |   |
| `[].templateType` (Required when parent is present) | `string` | Allowed values: `"automation"`, `"crm"`, `"marketing"`, `"otp"`, `"information"`, `"emailStandard"`, `"jobCompletion"`, `"oneOff"` |
| `[].communicationChannel` (Required when parent is present) | `string` | Allowed values: `"sms"`, `"email"` |
| `[].locale` (Required when parent is present) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `[].template` (Required when parent is present) | `string` |   |
| `[].tenantId` (Required when parent is present) | `number` |   |
| `[].tenant` (Required when parent is present) | `Tenant` |   |
| `[].tenant.market` (Required when parent is present) | `string` | Operating market of the tenant (immutable post-install). · Allowed values: `"NO"`, `"SE"`, `"DK"` |
| `[].tenant.productName` | `string` | The product name of the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `[].tenant.additionalFeatures` | `array of string` | The additional features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `[].tenant.disabledFeatures` | `array of string` | The disabled features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `[].tenant.name` (Required when parent is present) | `string` |   |
| `[].tenant.isActive` (Required when parent is present) | `boolean` |   |
| `[].tenant.defaultLanguage` (Required when parent is present) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `[].tenant.hostName` (Required when parent is present) | `string` |   |
| `[].tenant.logo` (Required when parent is present) | `string` |   |
| `[].tenant.favicon` (Required when parent is present) | `string` |   |
| `[].tenant.authLogo` (Required when parent is present) | `string` |   |
| `[].tenant.authLogoHeight` (Required when parent is present) | `number` |   |
| `[].tenant.siteUrl` (Required when parent is present) | `string` |   |
| `[].tenant.termsUrl` (Required when parent is present) | `string` |   |
| `[].tenant.privacyUrl` (Required when parent is present) | `string` |   |
| `[].tenant.gtm` (Required when parent is present) | `string` |   |
| `[].tenant.taxRates` | `array of number` |   |
| `[].tenant.smsOtp` (Required when parent is present) | `boolean` |   |
| `[].tenant.emailProvider` (Required when parent is present) | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `[].tenant.tenantContact` (Required when parent is present) | `string` |   |
| `[].tenant.registeredBusinessNo` (Required when parent is present) | `string` |   |
| `[].tenant.bankAccountNo` (Required when parent is present) | `string` |   |
| `[].tenant.swiftCode` (Required when parent is present) | `string` |   |
| `[].tenant.iban` (Required when parent is present) | `string` |   |
| `[].tenant.defaultLogoutURL` (Required when parent is present) | `string` |   |
| `[].tenant.postalAddress` (Required when parent is present) | `string` |   |
| `[].tenant.otpTemplateId` | `Translation` | Nested fields omitted: field limit. |
| `[].tenant.smsSenderId` (Required when parent is present) | `number` |   |
| `[].tenant.emailSenderId` (Required when parent is present) | `number` |   |
| `[].tenant.smsSender` (Required when parent is present) | `CommunicationSender` | Nested fields omitted: field limit. |
| `[].tenant.emailSender` (Required when parent is present) | `CommunicationSender` | Nested fields omitted: field limit. |
| `[].tenant.products` (Required when parent is present) | `array of Product` | Nested fields omitted: field limit. |
| `[].tenant.users` (Required when parent is present) | `array of User` | Nested fields omitted: field limit. |
| `[].tenant.members` (Required when parent is present) | `array of Member` | Nested fields omitted: field limit. |
| `[].tenant.roles` (Required when parent is present) | `array of Role` | Nested fields omitted: field limit. |
| `[].tenant.subscriptionPlans` (Required when parent is present) | `array of SubscriptionPlan` | Nested fields omitted: field limit. |
| `[].tenant.packages` (Required when parent is present) | `array of Package` | Nested fields omitted: field limit. |
| `[].tenant.invoices` (Required when parent is present) | `array of Invoice` | Nested fields omitted: field limit. |
| `[].tenant.orders` (Required when parent is present) | `array of Order` | Nested fields omitted: field limit. |
| `[].tenant.paymentProviders` (Required when parent is present) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.newslettersProviderConfig` (Required when parent is present) | `array of NewsletterProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.paymentProviderConfigs` (Required when parent is present) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.oidcClients` (Required when parent is present) | `array of OidcClient` | Nested fields omitted: field limit. |
| `[].tenant.oauthProviders` (Required when parent is present) | `array of OauthProvider` | Nested fields omitted: field limit. |
| `[].tenant.activityLogs` (Required when parent is present) | `array of ActivityLog` | Nested fields omitted: field limit. |
| `[].tenant.m2m_api_clients` (Required when parent is present) | `array of M2MApiClient` | Nested fields omitted: field limit. |
| `[].tenant.customProperties` (Required when parent is present) | `array of CustomProperty` | Nested fields omitted: field limit. |
| `[].tenant.consents` (Required when parent is present) | `array of Consent` | Nested fields omitted: field limit. |
| `[].tenant.preference` (Required when parent is present) | `Preference` | Nested fields omitted: field limit. |
| `[].tenant.settings` (Required when parent is present) | `TenantSettings` | Nested fields omitted: field limit. |
| `[].tenant.communicationTemplates` (Required when parent is present) | `array of CommunicationTemplate` | Recursive schema; nested fields are not repeated. |
| `[].tenant.additionalHostnames` (Required when parent is present) | `array of TenantHostname` | Nested fields omitted: field limit. |
| `[].tenant.exportHistory` (Required when parent is present) | `array of ExportHistory` | Nested fields omitted: field limit. |
| `[].tenant.arReportHistory` (Required when parent is present) | `array of ArReportHistory` | Nested fields omitted: field limit. |
| `[].tenant.mypageCardsSettings` (Required when parent is present) | `array of MypageCardsSettings` | Nested fields omitted: field limit. |
| `[].tenant.webhooks` (Required when parent is present) | `array of Webhook` | Nested fields omitted: field limit. |
| `[].tenant.customOrders` (Required when parent is present) | `array of CustomOrder` | Nested fields omitted: field limit. |
| `[].tenant.customOrderSources` (Required when parent is present) | `array of CustomOrderSource` | Nested fields omitted: field limit. |
| `[].tenant.brandKits` (Required when parent is present) | `array of BrandKit` | Nested fields omitted: field limit. |
| `[].tenant.communicationReceivers` (Required when parent is present) | `array of CommunicationReceiver` | Nested fields omitted: field limit. |
| `[].tenant.id` (Required when parent is present) | `number` |   |
| `[].tenant.createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.metaData` (Required when parent is present) | `object` |   |
| `[].id` (Required when parent is present) | `number` |   |
| `[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].metaData` (Required when parent is present) | `object` |   |

#### 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": [
    {}
  ]
}
```

#### 500

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

internalServerError

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

### Example request

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

### Example response

200 · `application/json`

```json
[
  {
    "name": "string",
    "templateType": "automation",
    "communicationChannel": "sms",
    "locale": "en",
    "template": "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": {}
  }
]
```

<a id="post-api-v1-communication-template"></a>
## Create communication template

`POST /api/v1/communication-template`

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` |   |
| `templateType` (Required) | `string` | Allowed values: `"automation"`, `"crm"`, `"marketing"`, `"otp"`, `"information"`, `"emailStandard"`, `"jobCompletion"`, `"oneOff"` |
| `communicationChannel` (Required) | `string` | Allowed values: `"sms"`, `"email"` |
| `locale` (Required) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `template` (Required) | `string` |   |

**Example request body**

`application/json`

```json
{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string"
}
```

### Responses

#### 201

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

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` |   |
| `templateType` (Required) | `string` | Allowed values: `"automation"`, `"crm"`, `"marketing"`, `"otp"`, `"information"`, `"emailStandard"`, `"jobCompletion"`, `"oneOff"` |
| `communicationChannel` (Required) | `string` | Allowed values: `"sms"`, `"email"` |
| `locale` (Required) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `template` (Required) | `string` |   |
| `tenantId` (Required) | `number` |   |
| `tenant` (Required) | `Tenant` |   |
| `tenant.market` (Required) | `string` | Operating market of the tenant (immutable post-install). · Allowed values: `"NO"`, `"SE"`, `"DK"` |
| `tenant.productName` | `string` | The product name of the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `tenant.additionalFeatures` | `array of string` | The additional features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `tenant.disabledFeatures` | `array of string` | The disabled features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `tenant.name` (Required) | `string` |   |
| `tenant.isActive` (Required) | `boolean` |   |
| `tenant.defaultLanguage` (Required) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `tenant.hostName` (Required) | `string` |   |
| `tenant.logo` (Required) | `string` |   |
| `tenant.favicon` (Required) | `string` |   |
| `tenant.authLogo` (Required) | `string` |   |
| `tenant.authLogoHeight` (Required) | `number` |   |
| `tenant.siteUrl` (Required) | `string` |   |
| `tenant.termsUrl` (Required) | `string` |   |
| `tenant.privacyUrl` (Required) | `string` |   |
| `tenant.gtm` (Required) | `string` |   |
| `tenant.taxRates` | `array of number` |   |
| `tenant.smsOtp` (Required) | `boolean` |   |
| `tenant.emailProvider` (Required) | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `tenant.tenantContact` (Required) | `string` |   |
| `tenant.registeredBusinessNo` (Required) | `string` |   |
| `tenant.bankAccountNo` (Required) | `string` |   |
| `tenant.swiftCode` (Required) | `string` |   |
| `tenant.iban` (Required) | `string` |   |
| `tenant.defaultLogoutURL` (Required) | `string` |   |
| `tenant.postalAddress` (Required) | `string` |   |
| `tenant.otpTemplateId` | `Translation` | Nested fields omitted: field limit. |
| `tenant.smsSenderId` (Required) | `number` |   |
| `tenant.emailSenderId` (Required) | `number` |   |
| `tenant.smsSender` (Required) | `CommunicationSender` | Nested fields omitted: field limit. |
| `tenant.emailSender` (Required) | `CommunicationSender` | Nested fields omitted: field limit. |
| `tenant.products` (Required) | `array of Product` | Nested fields omitted: field limit. |
| `tenant.users` (Required) | `array of User` | Nested fields omitted: field limit. |
| `tenant.members` (Required) | `array of Member` | Nested fields omitted: field limit. |
| `tenant.roles` (Required) | `array of Role` | Nested fields omitted: field limit. |
| `tenant.subscriptionPlans` (Required) | `array of SubscriptionPlan` | Nested fields omitted: field limit. |
| `tenant.packages` (Required) | `array of Package` | Nested fields omitted: field limit. |
| `tenant.invoices` (Required) | `array of Invoice` | Nested fields omitted: field limit. |
| `tenant.orders` (Required) | `array of Order` | Nested fields omitted: field limit. |
| `tenant.paymentProviders` (Required) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `tenant.newslettersProviderConfig` (Required) | `array of NewsletterProviderConfig` | Nested fields omitted: field limit. |
| `tenant.paymentProviderConfigs` (Required) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `tenant.oidcClients` (Required) | `array of OidcClient` | Nested fields omitted: field limit. |
| `tenant.oauthProviders` (Required) | `array of OauthProvider` | Nested fields omitted: field limit. |
| `tenant.activityLogs` (Required) | `array of ActivityLog` | Nested fields omitted: field limit. |
| `tenant.m2m_api_clients` (Required) | `array of M2MApiClient` | Nested fields omitted: field limit. |
| `tenant.customProperties` (Required) | `array of CustomProperty` | Nested fields omitted: field limit. |
| `tenant.consents` (Required) | `array of Consent` | Nested fields omitted: field limit. |
| `tenant.preference` (Required) | `Preference` | Nested fields omitted: field limit. |
| `tenant.settings` (Required) | `TenantSettings` | Nested fields omitted: field limit. |
| `tenant.communicationTemplates` (Required) | `array of CommunicationTemplate` | Recursive schema; nested fields are not repeated. |
| `tenant.additionalHostnames` (Required) | `array of TenantHostname` | Nested fields omitted: field limit. |
| `tenant.exportHistory` (Required) | `array of ExportHistory` | Nested fields omitted: field limit. |
| `tenant.arReportHistory` (Required) | `array of ArReportHistory` | Nested fields omitted: field limit. |
| `tenant.mypageCardsSettings` (Required) | `array of MypageCardsSettings` | Nested fields omitted: field limit. |
| `tenant.webhooks` (Required) | `array of Webhook` | Nested fields omitted: field limit. |
| `tenant.customOrders` (Required) | `array of CustomOrder` | Nested fields omitted: field limit. |
| `tenant.customOrderSources` (Required) | `array of CustomOrderSource` | Nested fields omitted: field limit. |
| `tenant.brandKits` (Required) | `array of BrandKit` | Nested fields omitted: field limit. |
| `tenant.communicationReceivers` (Required) | `array of CommunicationReceiver` | Nested fields omitted: field limit. |
| `tenant.id` (Required) | `number` |   |
| `tenant.createdAt` (Required) | `string (date-time)` |   |
| `tenant.updatedAt` (Required) | `string (date-time)` |   |
| `tenant.deletedAt` (Required) | `string (date-time)` |   |
| `tenant.metaData` (Required) | `object` |   |
| `id` (Required) | `number` |   |
| `createdAt` (Required) | `string (date-time)` |   |
| `updatedAt` (Required) | `string (date-time)` |   |
| `deletedAt` (Required) | `string (date-time)` |   |
| `metaData` (Required) | `object` |   |

#### 400

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

invalidMjmlFormat

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

#### 500

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

internalServerError

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

### Example request

```bash
curl https://api.subrite.no/api/v1/communication-template \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string"
}'
```

### Example response

201 · `application/json`

```json
{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string",
  "tenantId": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "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": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```

<a id="post-api-v1-communication-template-preview"></a>
## Compile a draft template to preview HTML

`POST /api/v1/communication-template/preview`

Compiles MJML to the HTML an email would use, without saving anything. Returns partial HTML alongside any validation errors so an editor can preview a template while it is still being written.

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `template` (Required) | `string` | MJML source to compile. Not persisted. · `maxLength`: `100000` |
| `locale` | `string` | Language for sample content and date formatting. Defaults to the tenant's. · Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `sampleData` | `boolean` | Fill the tokens a send supplies per recipient, and inject sample body content. Tenant tokens resolve either way — they are real values, not samples. · Default: `true` |

**Example request body**

`application/json`

```json
{
  "template": "string",
  "locale": "en",
  "sampleData": true
}
```

### Responses

#### 201

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

| Name | Type | Description |
| --- | --- | --- |
| `html` (Required) | `string` | Compiled email HTML. Partial when the template has errors, empty when it cannot compile at all. |
| `errors` (Required) | `array of MjmlValidationErrorDto` |   |
| `errors[].line` (Required when parent is present) | `number` | 1-based line in the MJML source, 0 when not attributable. |
| `errors[].message` (Required when parent is present) | `string` |   |
| `errors[].tagName` (Required when parent is present) | `string` | Offending MJML tag, empty when not tied to one. |
| `sections` (Required) | `number` | Number of mj-section elements, for the editor status line. |
| `previewText` (Required) | `string` | Contents of mj-preview, or null when the template declares none. · Can be null |

#### 400

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

badRequest

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

```bash
curl https://api.subrite.no/api/v1/communication-template/preview \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "template": "string",
  "locale": "en",
  "sampleData": true
}'
```

### Example response

201 · `application/json`

```json
{
  "html": "string",
  "errors": [
    {}
  ],
  "sections": 0,
  "previewText": "string"
}
```

<a id="post-api-v1-communication-template-generate"></a>
## Write a template from a description

`POST /api/v1/communication-template/generate`

Returns MJML for a template described in plain language. Answers with the model's template or with an error — never a substitute, since the caller's editor holds the author's own markup. A tenant on the EU residency default has no model available and is refused.

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `prompt` (Required) | `string` | Plain-language description of the template to write. · `maxLength`: `2000` |
| `templateType` | `string` | What the template is for. Decides which merge tags the writing is steered towards — an OTP mail is built around the code, a marketing one must carry an unsubscribe link. · Allowed values: `"automation"`, `"crm"`, `"marketing"`, `"otp"`, `"information"`, `"emailStandard"`, `"jobCompletion"`, `"oneOff"` |
| `locale` | `string` | Language for the template's fixed copy. Defaults to the tenant's. · Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `currentTemplate` | `string` | The template currently in the editor. When given, the prompt is applied to it as a change rather than starting a new template — which is what a second instruction almost always means. · `maxLength`: `60000` |
| `conversationId` | `string` | Identifies one editing session. Every call made under it is grouped in the AI usage ledger as a single admin action. Returned in the response; send it back on the next call. · `maxLength`: `36` |

**Example request body**

`application/json`

```json
{
  "prompt": "string",
  "templateType": "automation",
  "locale": "en",
  "currentTemplate": "string",
  "conversationId": "string"
}
```

### Responses

#### 201

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

| Name | Type | Description |
| --- | --- | --- |
| `template` (Required) | `string` | MJML for the generated template. |
| `conversationId` (Required) | `string` | The editing session this call was attributed to. Send it back with the next prompt so the whole session groups into one entry in the AI usage ledger. |

#### 400

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

badRequest

Same fields as [Compile a draft template to preview HTML (400)](https://www.subrite.no/developers/communication-template?md=true#post-api-v1-communication-template-preview).

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 422

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

emailTemplateGenerationFailed

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

#### 500

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

internalServerError

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

### Example request

```bash
curl https://api.subrite.no/api/v1/communication-template/generate \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "string",
  "templateType": "automation",
  "locale": "en",
  "currentTemplate": "string",
  "conversationId": "string"
}'
```

### Example response

201 · `application/json`

```json
{
  "template": "string",
  "conversationId": "string"
}
```

<a id="get-api-v1-communication-template-id"></a>
## Get an communication template

`GET /api/v1/communication-template/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

Same fields as [Create communication template (201)](https://www.subrite.no/developers/communication-template?md=true#post-api-v1-communication-template).

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

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

### Example response

200 · `application/json`

```json
{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string",
  "tenantId": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "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": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```

<a id="patch-api-v1-communication-template-id"></a>
## Update a communication template

`PATCH /api/v1/communication-template/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

Same fields as [Create communication template (Request body)](https://www.subrite.no/developers/communication-template?md=true#post-api-v1-communication-template).

**Example request body**

`application/json`

```json
{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string"
}
```

### Responses

#### 200

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

Same fields as [Create communication template (201)](https://www.subrite.no/developers/communication-template?md=true#post-api-v1-communication-template).

#### 400

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

invalidMjmlFormat

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

#### 500

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

internalServerError

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

### Example request

```bash
curl 'https://api.subrite.no/api/v1/communication-template/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string"
}'
```

### Example response

200 · `application/json`

```json
{
  "name": "string",
  "templateType": "automation",
  "communicationChannel": "sms",
  "locale": "en",
  "template": "string",
  "tenantId": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "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": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```

<a id="get-api-v1-communication-template-communicationchannel-templatetype"></a>
## Get communication email templates by channel and type

`GET /api/v1/communication-template/{communicationChannel}/{templateType}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `[].name` (Required when parent is present) | `string` |   |
| `[].templateType` (Required when parent is present) | `string` | Allowed values: `"automation"`, `"crm"`, `"marketing"`, `"otp"`, `"information"`, `"emailStandard"`, `"jobCompletion"`, `"oneOff"` |
| `[].communicationChannel` (Required when parent is present) | `string` | Allowed values: `"sms"`, `"email"` |
| `[].locale` (Required when parent is present) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `[].template` (Required when parent is present) | `string` |   |
| `[].tenantId` (Required when parent is present) | `number` |   |
| `[].tenant` (Required when parent is present) | `Tenant` |   |
| `[].tenant.market` (Required when parent is present) | `string` | Operating market of the tenant (immutable post-install). · Allowed values: `"NO"`, `"SE"`, `"DK"` |
| `[].tenant.productName` | `string` | The product name of the tenant · Allowed values: `"enterprise"`, `"communication"`, `"custom"` |
| `[].tenant.additionalFeatures` | `array of string` | The additional features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `[].tenant.disabledFeatures` | `array of string` | The disabled features of the tenant · Allowed values: `"email"`, `"sms"`, `"push"`, `"podcasts"`, `"subscription"`, `"insights"`, `"dashboard"`, `"automation"`, `"export"`, `"accounting"`, `"invoices"`, `"ai"` |
| `[].tenant.name` (Required when parent is present) | `string` |   |
| `[].tenant.isActive` (Required when parent is present) | `boolean` |   |
| `[].tenant.defaultLanguage` (Required when parent is present) | `string` | Allowed values: `"en"`, `"no"`, `"sv"`, `"da"` |
| `[].tenant.hostName` (Required when parent is present) | `string` |   |
| `[].tenant.logo` (Required when parent is present) | `string` |   |
| `[].tenant.favicon` (Required when parent is present) | `string` |   |
| `[].tenant.authLogo` (Required when parent is present) | `string` |   |
| `[].tenant.authLogoHeight` (Required when parent is present) | `number` |   |
| `[].tenant.siteUrl` (Required when parent is present) | `string` |   |
| `[].tenant.termsUrl` (Required when parent is present) | `string` |   |
| `[].tenant.privacyUrl` (Required when parent is present) | `string` |   |
| `[].tenant.gtm` (Required when parent is present) | `string` |   |
| `[].tenant.taxRates` | `array of number` |   |
| `[].tenant.smsOtp` (Required when parent is present) | `boolean` |   |
| `[].tenant.emailProvider` (Required when parent is present) | `string` | Allowed values: `"brevo"`, `"sendgrid"` |
| `[].tenant.tenantContact` (Required when parent is present) | `string` |   |
| `[].tenant.registeredBusinessNo` (Required when parent is present) | `string` |   |
| `[].tenant.bankAccountNo` (Required when parent is present) | `string` |   |
| `[].tenant.swiftCode` (Required when parent is present) | `string` |   |
| `[].tenant.iban` (Required when parent is present) | `string` |   |
| `[].tenant.defaultLogoutURL` (Required when parent is present) | `string` |   |
| `[].tenant.postalAddress` (Required when parent is present) | `string` |   |
| `[].tenant.otpTemplateId` | `Translation` | Nested fields omitted: field limit. |
| `[].tenant.smsSenderId` (Required when parent is present) | `number` |   |
| `[].tenant.emailSenderId` (Required when parent is present) | `number` |   |
| `[].tenant.smsSender` (Required when parent is present) | `CommunicationSender` | Nested fields omitted: field limit. |
| `[].tenant.emailSender` (Required when parent is present) | `CommunicationSender` | Nested fields omitted: field limit. |
| `[].tenant.products` (Required when parent is present) | `array of Product` | Nested fields omitted: field limit. |
| `[].tenant.users` (Required when parent is present) | `array of User` | Nested fields omitted: field limit. |
| `[].tenant.members` (Required when parent is present) | `array of Member` | Nested fields omitted: field limit. |
| `[].tenant.roles` (Required when parent is present) | `array of Role` | Nested fields omitted: field limit. |
| `[].tenant.subscriptionPlans` (Required when parent is present) | `array of SubscriptionPlan` | Nested fields omitted: field limit. |
| `[].tenant.packages` (Required when parent is present) | `array of Package` | Nested fields omitted: field limit. |
| `[].tenant.invoices` (Required when parent is present) | `array of Invoice` | Nested fields omitted: field limit. |
| `[].tenant.orders` (Required when parent is present) | `array of Order` | Nested fields omitted: field limit. |
| `[].tenant.paymentProviders` (Required when parent is present) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.newslettersProviderConfig` (Required when parent is present) | `array of NewsletterProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.paymentProviderConfigs` (Required when parent is present) | `array of PaymentProviderConfig` | Nested fields omitted: field limit. |
| `[].tenant.oidcClients` (Required when parent is present) | `array of OidcClient` | Nested fields omitted: field limit. |
| `[].tenant.oauthProviders` (Required when parent is present) | `array of OauthProvider` | Nested fields omitted: field limit. |
| `[].tenant.activityLogs` (Required when parent is present) | `array of ActivityLog` | Nested fields omitted: field limit. |
| `[].tenant.m2m_api_clients` (Required when parent is present) | `array of M2MApiClient` | Nested fields omitted: field limit. |
| `[].tenant.customProperties` (Required when parent is present) | `array of CustomProperty` | Nested fields omitted: field limit. |
| `[].tenant.consents` (Required when parent is present) | `array of Consent` | Nested fields omitted: field limit. |
| `[].tenant.preference` (Required when parent is present) | `Preference` | Nested fields omitted: field limit. |
| `[].tenant.settings` (Required when parent is present) | `TenantSettings` | Nested fields omitted: field limit. |
| `[].tenant.communicationTemplates` (Required when parent is present) | `array of CommunicationTemplate` | Recursive schema; nested fields are not repeated. |
| `[].tenant.additionalHostnames` (Required when parent is present) | `array of TenantHostname` | Nested fields omitted: field limit. |
| `[].tenant.exportHistory` (Required when parent is present) | `array of ExportHistory` | Nested fields omitted: field limit. |
| `[].tenant.arReportHistory` (Required when parent is present) | `array of ArReportHistory` | Nested fields omitted: field limit. |
| `[].tenant.mypageCardsSettings` (Required when parent is present) | `array of MypageCardsSettings` | Nested fields omitted: field limit. |
| `[].tenant.webhooks` (Required when parent is present) | `array of Webhook` | Nested fields omitted: field limit. |
| `[].tenant.customOrders` (Required when parent is present) | `array of CustomOrder` | Nested fields omitted: field limit. |
| `[].tenant.customOrderSources` (Required when parent is present) | `array of CustomOrderSource` | Nested fields omitted: field limit. |
| `[].tenant.brandKits` (Required when parent is present) | `array of BrandKit` | Nested fields omitted: field limit. |
| `[].tenant.communicationReceivers` (Required when parent is present) | `array of CommunicationReceiver` | Nested fields omitted: field limit. |
| `[].tenant.id` (Required when parent is present) | `number` |   |
| `[].tenant.createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].tenant.metaData` (Required when parent is present) | `object` |   |
| `[].id` (Required when parent is present) | `number` |   |
| `[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].metaData` (Required when parent is present) | `object` |   |

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

```bash
curl 'https://api.subrite.no/api/v1/communication-template/{communicationChannel}/{templateType}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "name": "string",
    "templateType": "automation",
    "communicationChannel": "sms",
    "locale": "en",
    "template": "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": {}
  }
]
```
