Notifly
API ReferenceLayouts

Generate layout preview

Generates a preview for a layout by its unique identifier **layoutId**

POST
/v2/layouts/{layoutId}/preview

Generates a preview for a layout by its unique identifier layoutId

Authorization

secretKey
Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".

In: header

Path Parameters

layoutId*string

Request Body

application/json

Layout preview generation details

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v2/layouts/string/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "previewPayloadExample": {      "subscriber": {        "_id": "string",        "firstName": "string",        "lastName": "string",        "email": "string",        "phone": "string",        "avatar": "string",        "locale": "string",        "channels": [          {            "providerId": "slack",            "integrationIdentifier": "string",            "credentials": {              "webhookUrl": "https://example.com/webhook",              "channel": "general",              "deviceTokens": [                "token1",                "token2",                "token3"              ],              "alertUid": "12345-abcde",              "title": "Critical Alert",              "imageUrl": "https://example.com/image.png",              "state": "resolved",              "externalUrl": "https://example.com/details"            },            "_integrationId": "string"          }        ],        "topics": [          "string"        ],        "isOnline": true,        "lastOnlineAt": "string",        "__v": 0,        "data": {},        "timezone": "string"      }    },    "schema": {},    "result": {      "type": "email",      "preview": {        "body": "string"      }    }  }}