Retrieve a layout
Fetches details of a specific layout by its unique identifier layoutId
Authorization
Authorization<token>API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
In: header
Path Parameters
layoutIdRequiredstringHeader Parameters
idempotency-keystringA header for idempotency purposes
Response Body
OK
_idRequiredstringUnique internal identifier of the layout
layoutIdRequiredstringUnique identifier for the layout
slugRequiredstringSlug of the layout
nameRequiredstringName of the layout
isDefaultRequiredbooleanWhether the layout is the default layout
isTranslationEnabledRequiredbooleanWhether the layout translations are enabled
updatedAtRequiredstringLast updated timestamp
updatedByobjectUser who last updated the layout
createdAtRequiredstringCreation timestamp
originRequiredstringOrigin of the layout
Value in:
"novu-cloud" | "novu-cloud-v1" | "external"typeRequiredstringType of the layout
Value in:
"REGULAR" | "ECHO" | "BRIDGE"variablesobject | nullThe variables JSON Schema for the layout
controlsRequiredobjectControls metadata for the layout
export interface Response {
/**
* Unique internal identifier of the layout
*/
_id: string;
/**
* Unique identifier for the layout
*/
layoutId: string;
/**
* Slug of the layout
*/
slug: string;
/**
* Name of the layout
*/
name: string;
/**
* Whether the layout is the default layout
*/
isDefault: boolean;
/**
* Whether the layout translations are enabled
*/
isTranslationEnabled: boolean;
/**
* Last updated timestamp
*/
updatedAt: string;
/**
* User who last updated the layout
*/
updatedBy?: UserResponseDto;
/**
* Creation timestamp
*/
createdAt: string;
/**
* Origin of the layout
*/
origin: "novu-cloud" | "novu-cloud-v1" | "external";
/**
* Type of the layout
*/
type: "REGULAR" | "ECHO" | "BRIDGE";
/**
* The variables JSON Schema for the layout
*/
variables?: {
[k: string]: unknown;
} | null;
/**
* Controls metadata for the layout
*/
controls: LayoutControlsDto;
}
export interface UserResponseDto {
/**
* User ID
*/
_id: string;
/**
* User first name
*/
firstName?: string | null;
/**
* User last name
*/
lastName?: string | null;
/**
* User external ID
*/
externalId?: string | null;
}
export interface LayoutControlsDto {
/**
* JSON Schema for data
*/
dataSchema?: {
[k: string]: unknown;
};
/**
* UI Schema for rendering
*/
uiSchema?: UiSchema;
/**
* Email layout controls
*/
values: LayoutControlValuesDto;
}
export interface UiSchema {
/**
* Group of the UI Schema
*/
group?: "IN_APP" | "EMAIL" | "DIGEST" | "DELAY" | "THROTTLE" | "SMS" | "CHAT" | "PUSH" | "SKIP" | "LAYOUT";
/**
* Properties of the UI Schema
*/
properties?: {
[k: string]: UiSchemaProperty;
};
}
export interface UiSchemaProperty {
/**
* Placeholder for the UI Schema Property
*/
placeholder?:
| string
| number
| boolean
| {
[k: string]: unknown;
}
| (
| string
| number
| boolean
| {
[k: string]: unknown;
}
)[];
/**
* Component type for the UI Schema Property
*/
component:
| "EMAIL_EDITOR_SELECT"
| "LAYOUT_SELECT"
| "BLOCK_EDITOR"
| "EMAIL_BODY"
| "TEXT_FULL_LINE"
| "TEXT_INLINE_LABEL"
| "IN_APP_BODY"
| "IN_APP_AVATAR"
| "IN_APP_PRIMARY_SUBJECT"
| "IN_APP_BUTTON_DROPDOWN"
| "IN_APP_DISABLE_SANITIZATION_SWITCH"
| "DISABLE_SANITIZATION_SWITCH"
| "URL_TEXT_BOX"
| "DIGEST_AMOUNT"
| "DIGEST_UNIT"
| "DIGEST_TYPE"
| "DIGEST_KEY"
| "DIGEST_CRON"
| "DELAY_AMOUNT"
| "DELAY_UNIT"
| "DELAY_TYPE"
| "DELAY_CRON"
| "DELAY_DYNAMIC_KEY"
| "THROTTLE_TYPE"
| "THROTTLE_WINDOW"
| "THROTTLE_UNIT"
| "THROTTLE_DYNAMIC_KEY"
| "THROTTLE_THRESHOLD"
| "THROTTLE_KEY"
| "EXTEND_TO_SCHEDULE"
| "SMS_BODY"
| "CHAT_BODY"
| "PUSH_BODY"
| "PUSH_SUBJECT"
| "QUERY_EDITOR"
| "DATA"
| "LAYOUT_EMAIL";
/**
* Properties of the UI Schema
*/
properties?: {
[k: string]: UiSchemaProperty1;
};
}
export interface UiSchemaProperty1 {
/**
* Placeholder for the UI Schema Property
*/
placeholder?:
| string
| number
| boolean
| {
[k: string]: unknown;
}
| (
| string
| number
| boolean
| {
[k: string]: unknown;
}
)[];
/**
* Component type for the UI Schema Property
*/
component:
| "EMAIL_EDITOR_SELECT"
| "LAYOUT_SELECT"
| "BLOCK_EDITOR"
| "EMAIL_BODY"
| "TEXT_FULL_LINE"
| "TEXT_INLINE_LABEL"
| "IN_APP_BODY"
| "IN_APP_AVATAR"
| "IN_APP_PRIMARY_SUBJECT"
| "IN_APP_BUTTON_DROPDOWN"
| "IN_APP_DISABLE_SANITIZATION_SWITCH"
| "DISABLE_SANITIZATION_SWITCH"
| "URL_TEXT_BOX"
| "DIGEST_AMOUNT"
| "DIGEST_UNIT"
| "DIGEST_TYPE"
| "DIGEST_KEY"
| "DIGEST_CRON"
| "DELAY_AMOUNT"
| "DELAY_UNIT"
| "DELAY_TYPE"
| "DELAY_CRON"
| "DELAY_DYNAMIC_KEY"
| "THROTTLE_TYPE"
| "THROTTLE_WINDOW"
| "THROTTLE_UNIT"
| "THROTTLE_DYNAMIC_KEY"
| "THROTTLE_THRESHOLD"
| "THROTTLE_KEY"
| "EXTEND_TO_SCHEDULE"
| "SMS_BODY"
| "CHAT_BODY"
| "PUSH_BODY"
| "PUSH_SUBJECT"
| "QUERY_EDITOR"
| "DATA"
| "LAYOUT_EMAIL";
/**
* Properties of the UI Schema
*/
properties?: {
[k: string]: UiSchemaProperty1;
};
}
export interface LayoutControlValuesDto {
/**
* Email layout controls
*/
email?: EmailControlsDto;
}
export interface EmailControlsDto {
/**
* Body of the layout.
*/
body: string;
/**
* Editor type of the layout.
*/
editorType: "html" | "block";
}
curl -X GET "https://api.novu.co/v2/layouts/string" \
-H "idempotency-key: string" \
-H "Authorization: <token>"{
"_id": "string",
"layoutId": "string",
"slug": "string",
"name": "string",
"isDefault": true,
"isTranslationEnabled": true,
"updatedAt": "string",
"updatedBy": {
"_id": "string",
"firstName": "string",
"lastName": "string",
"externalId": "string"
},
"createdAt": "string",
"origin": "novu-cloud",
"type": "REGULAR",
"variables": {},
"controls": {
"dataSchema": {},
"uiSchema": {
"group": "IN_APP",
"properties": {
"property1": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {
"property1": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {}
},
"property2": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {}
}
}
},
"property2": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {
"property1": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {}
},
"property2": {
"placeholder": "string",
"component": "EMAIL_EDITOR_SELECT",
"properties": {}
}
}
}
}
},
"values": {
"email": {
"body": "string",
"editorType": "html"
}
}
}
}