Workflows

Generate a step preview

Generates a preview for a specific workflow step by its unique identifier stepId

post/v2/workflows/{workflowId}/step/{stepId}/preview

Path parameters

workflowIdstring required
stepIdstring required

Request body

controlValuesobject

Optional control values

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"
          }
        }
      ]
    },
    "actor": {
      "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

novuSignaturestring

Sample novu-signature header value for HTTP request steps

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"
          }
        }
      ]
    },
    "actor": {
      "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 5 of the 13 revisions of this API.61217

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

      request-property-enum-value-removed

    • 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 //////////// 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

    • 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

    • 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

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

      request-property-enum-value-removed

    • 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 //////////// 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

    • 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

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

      response-property-enum-value-removed

    • the response property /// became optional for the status

      response-property-became-optional

    • added the optional property /// to the response with the status

      response-optional-property-added

  • 47f16ff4d42722See 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 //////////// 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

    • 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

  • 2e115ea8160c166See the full diff
    • added subschema #8 to the response property oneOf list for the response status

      response-property-one-of-added

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

      response-property-enum-value-added

    • 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 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 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 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 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

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

      request-property-enum-value-added