---
title: "Create a layout"
method: POST
path: "/v2/layouts"
tags: ["Layouts"]
---

# Create a layout

`POST /v2/layouts`

Creates a new layout in the Novu Cloud environment

## Headers

- `idempotency-key` string

## Request body

- CreateLayoutDto
  - `layoutId` string, required — Unique identifier for the layout
  - `name` string, required — Name of the layout
  - `isTranslationEnabled` boolean — Enable or disable translations for this layout
  - `__source` 'dashboard' — Source of layout creation

## Response `201`

Created

- LayoutResponseDto
  - `_id` string, required — Unique internal identifier of the layout
  - `layoutId` string, required — Unique identifier for the layout
  - `slug` string, required — Slug of the layout
  - `name` string, required — Name of the layout
  - `isDefault` boolean, required — Whether the layout is the default layout
  - `isTranslationEnabled` boolean, required — Whether the layout translations are enabled
  - `updatedAt` string, required — Last updated timestamp
  - `updatedBy` UserResponseDto
    - `_id` string, required — User ID
    - `firstName` string, nullable — User first name
    - `lastName` string, nullable — User last name
    - `externalId` string, nullable — User external ID
  - `createdAt` string, required — Creation timestamp
  - `origin` 'novu-cloud' | 'novu-cloud-v1' | 'external', required — Origin of the layout
  - `type` 'REGULAR' | 'ECHO' | 'BRIDGE', required — Type of the layout
  - `variables` object, nullable — The variables JSON Schema for the layout
  - `controls` LayoutControlsDto, required
    - `dataSchema` object — JSON Schema for data
    - `uiSchema` UiSchema
      - `group` 'IN_APP' | 'EMAIL' | 'DIGEST' | 'DELAY' | 'THROTTLE' | 'SMS' | 'CHAT' | 'PUSH' | 'TOOL' | 'SKIP' | 'LAYOUT' | 'HTTP_REQUEST' — Group of the UI Schema
      - `properties` object — Properties of the UI Schema
    - `values` LayoutControlValuesDto, required
      - `email` EmailControlsDto
        - `body` string, required — Body of the layout.
        - `editorType` 'html' | 'block', required — Editor type of the layout.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `413` — Payload Too Large
- `414` — URI Too Long
- `415` — Unsupported Media Type
- `422` — Unprocessable Entity
- `429` — The client has sent too many requests in a given amount of time.
- `500` — Internal Server Error
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

[API](https://skmtc.net/novu/apis/novu-api.md) · [All operations](https://skmtc.net/novu/apis/novu-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/novu/novu-api/versions/e4a270f838f0/schema)
