---
title: "Update a layout"
method: PUT
path: "/v2/layouts/{layoutId}"
tags: ["Layouts"]
---

# Update a layout

`PUT /v2/layouts/{layoutId}`

## Request

- Base URL: `https://api.notifly.io`
- URL: `https://api.notifly.io/v2/layouts/{layoutId}`
- Auth: API key in header `Authorization`

Updates the details of an existing layout, here **layoutId** is the identifier of the layout

## Path parameters

- `layoutId` string, required

## Request body

- UpdateLayoutDto
  - `name` string, required: Name of the layout
  - `isTranslationEnabled` boolean: Enable or disable translations for this layout
  - `controlValues` LayoutControlValuesDto
    - `email` EmailControlsDto
      - `body` string, required: Body of the layout.
      - `editorType` 'html' | 'block', required: Editor type of the layout.

## Response `200`

OK

- object
  - `data` 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.dev/notifly/apis/notifly-api.md) · [All operations](https://skmtc.dev/notifly/apis/notifly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/notifly/apis/notifly-api/revisions/af909b9e1e57?raw)
