Layouts

Generate layout preview

Generates a preview for a layout by its unique identifier layoutId

post/v2/layouts/{layoutId}/preview

Path parameters

layoutIdstring required

Request body

controlValuesobject

Optional control values for layout preview

Example request

{
  "previewPayload": {
    "subscriber": {
      "channels": [
        {
          "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"
          }
        }
      ]
    }
  }
}

Response

Created

schemaobject nullable

The payload schema that was used to generate the preview payload example

Example response

{
  "previewPayloadExample": {
    "subscriber": {
      "channels": [
        {
          "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"
          }
        }
      ]
    }
  }
}

Changes

Changed in 4 of the 13 revisions of this API.268

  • 8bc1670bbd13112See the full diff
    • removed the enum value novu-agent-chat of the request property ////////////

      request-property-enum-value-removed

    • added the new novu-web-chat enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property ////////////

      request-property-enum-value-added

    • removed the novu-agent-chat enum value from the //////////// response property for the response status

      response-property-enum-value-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • d7137c47680a112See the full diff
    • removed the enum value novu-web-chat of the request property ////////////

      request-property-enum-value-removed

    • added the new novu-agent-chat enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new novu-agent-chat enum value to the request property ////////////

      request-property-enum-value-added

    • removed the novu-web-chat enum value from the //////////// response property for the response status

      response-property-enum-value-removed

  • 47f16ff4d42711See the full diff
    • added the new novu-web-chat enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property ////////////

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 2e115ea8160c33See the full diff
    • added the new line enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new sendblue enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new webex-messaging enum value to the //////////// response property for the response status

      response-property-enum-value-added

    • added the new line enum value to the request property ////////////

      request-property-enum-value-added

    • added the new sendblue enum value to the request property ////////////

      request-property-enum-value-added

    • added the new webex-messaging enum value to the request property ////////////

      request-property-enum-value-added