Layouts

Generate layout preview

Generates a preview for a layout by its unique identifier layoutId

post/v2/layouts/{layoutId}/preview

Request

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

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

Example response

{
  "data": {
    "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

No recorded changes to this operation across all 1 revision of this API.