Layouts

Generate layout preview

Generates a preview for a layout by its unique identifier layoutId

post/v2/layouts/{layoutId}/preview

Path parameters

layoutIdstring required

Headers

idempotency-keystring

A header for idempotency purposes

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 12 revisions of this API.268

  • 24e82408dec7112See the full diff
    • removed the enum value novu-agent-chat of the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-removed

    • added the new novu-web-chat enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-added

    • removed the novu-agent-chat enum value from the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      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

  • c2b2fa0d5d48112See the full diff
    • removed the enum value novu-web-chat of the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-removed

    • added the new novu-agent-chat enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new novu-agent-chat enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-added

    • removed the novu-web-chat enum value from the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-removed

  • 8092e41edd5711See the full diff
    • added the new novu-web-chat enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      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

  • c69777f6018433See the full diff
    • added the new line enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new sendblue enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new webex-messaging enum value to the previewPayloadExample/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId response property for the response status 201

      response-property-enum-value-added

    • added the new line enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-added

    • added the new sendblue enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-added

    • added the new webex-messaging enum value to the request property previewPayload/allOf[LayoutPreviewPayloadDto]/subscriber/allOf[SubscriberResponseDtoOptional]/channels/items/providerId

      request-property-enum-value-added