> ## Documentation Index
> Fetch the complete documentation index at: https://novu-c5de82d9-docs-homepage-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a workflow

> Partially updates a workflow by its unique identifier **workflowId**



## OpenAPI

````yaml https://spec.speakeasy.com/novu/novu/json-development-with-code-samples patch /v2/workflows/{workflowId}
openapi: 3.0.0
info:
  title: Novu API
  description: >-
    Novu REST API. Please see https://docs.novu.co/api-reference for more
    details.
  version: 3.15.0
  contact:
    name: Novu Support
    url: https://discord.gg/novu
    email: support@novu.co
  termsOfService: https://novu.co/terms
  license:
    name: MIT
    url: https://opensource.org/license/mit
servers:
  - url: https://api.novu.co
  - url: https://eu.api.novu.co
security:
  - secretKey: []
tags:
  - name: Events
    description: >-
      Events represent a change in state of a subscriber. They are used to
      trigger workflows, and enable you to send notifications to subscribers
      based on their actions.
    externalDocs:
      url: https://docs.novu.co/workflows
  - name: Subscribers
    description: >-
      A subscriber in Novu represents someone who should receive a message. A
      subscriber's profile information contains important attributes about the
      subscriber that will be used in messages (name, email). The subscriber
      object can contain other key-value pairs that can be used to further
      personalize your messages.
    externalDocs:
      url: https://docs.novu.co/subscribers/subscribers
  - name: Topics
    description: >-
      Topics are a way to group subscribers together so that they can be
      notified of events at once. A topic is identified by a custom key. This
      can be helpful for things like sending out marketing emails or notifying
      users of new features. Topics can also be used to send notifications to
      the subscribers who have been grouped together based on their interests,
      location, activities and much more.
    externalDocs:
      url: https://docs.novu.co/subscribers/topics
  - name: Integrations
    description: >-
      With the help of the Integration Store, you can easily integrate your
      favorite delivery provider. During the runtime of the API, the
      Integrations Store is responsible for storing the configurations of all
      the providers.
    externalDocs:
      url: https://docs.novu.co/platform/integrations/overview
  - name: Workflows
    description: >-
      All notifications are sent via a workflow. Each workflow acts as a
      container for the logic and blueprint that are associated with a type of
      notification in your system.
    externalDocs:
      url: https://docs.novu.co/workflows
  - name: Messages
    description: >-
      A message in Novu represents a notification delivered to a recipient on a
      particular channel. Messages contain information about the request that
      triggered its delivery, a view of the data sent to the recipient, and a
      timeline of its lifecycle events. Learn more about messages.
    externalDocs:
      url: https://docs.novu.co/workflows/messages
  - name: Environments
    description: >-
      Environments allow you to manage different stages of your application
      development lifecycle. Each environment has its own set of API keys and
      configurations, enabling you to separate development, staging, and
      production workflows.
    externalDocs:
      url: https://docs.novu.co/platform/environments
  - name: Layouts
    description: Layouts are reusable wrappers for your email notifications.
    externalDocs:
      url: https://docs.novu.co/platform/workflow/layouts
  - name: Translations
    description: Used to localize your notifications to different languages.
    externalDocs:
      url: https://docs.novu.co/platform/workflow/advanced-features/translations
  - name: Domains
    description: Used to manage your inbound email domains.
    externalDocs:
      url: https://docs.novu.co/platform/domains
externalDocs:
  description: Novu Documentation
  url: https://docs.novu.co
paths:
  /v2/workflows/{workflowId}:
    patch:
      tags:
        - Workflows
      summary: Update a workflow
      description: Partially updates a workflow by its unique identifier **workflowId**
      operationId: WorkflowController_patchWorkflow
      parameters:
        - name: workflowId
          required: true
          in: path
          schema:
            type: string
        - name: idempotency-key
          in: header
          description: A header for idempotency purposes
          required: false
          schema:
            type: string
      requestBody:
        required: true
        description: Workflow patch details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchWorkflowDto'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponseDto'
        '400':
          description: Bad Request
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '403':
          description: Forbidden
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '404':
          description: Not Found
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '409':
          description: Conflict
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '413':
          description: Payload Too Large
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '414':
          description: URI Too Long
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '415':
          description: Unsupported Media Type
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '422':
          description: Unprocessable Entity
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorDto'
        '429':
          description: 'The client has sent too many requests in a given amount of time. '
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
          content:
            application/json:
              schema:
                type: string
                example: API rate limit exceeded
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '503':
          description: >-
            The server is currently unable to handle the request due to a
            temporary overload or scheduled maintenance, which will likely be
            alleviated after some delay.
          headers:
            Content-Type:
              $ref: '#/components/headers/Content-Type'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            Idempotency-Replay:
              $ref: '#/components/headers/Idempotency-Replay'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
          content:
            application/json:
              schema:
                type: string
                example: Please wait some time, then try again.
      security:
        - secretKey: []
      x-codeSamples:
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use novu;
            use novu\Models\Components;

            $sdk = novu\Novu::builder()
                ->setSecurity(
                    'YOUR_SECRET_KEY_HERE'
                )
                ->build();

            $patchWorkflowDto = new Components\PatchWorkflowDto();

            $response = $sdk->workflows->patch(
                workflowId: '<id>',
                patchWorkflowDto: $patchWorkflowDto

            );

            if ($response->workflowResponseDto !== null) {
                // handle response
            }
        - lang: python
          label: Python
          source: |-
            from novu_py import Novu


            with Novu(
                secret_key="YOUR_SECRET_KEY_HERE",
            ) as novu:

                res = novu.workflows.patch(workflow_id="<id>", patch_workflow_dto={})

                # Handle response
                print(res)
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/novuhq/novu-go/v3\"\n\t\"github.com/novuhq/novu-go/v3/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := v3.New(\n        v3.WithSecurity(\"YOUR_SECRET_KEY_HERE\"),\n    )\n\n    res, err := s.Workflows.Patch(ctx, \"<id>\", components.PatchWorkflowDto{}, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.WorkflowResponseDto != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: TypeScript
          source: |-
            import { Novu } from "@novu/api";

            const novu = new Novu({
              secretKey: "YOUR_SECRET_KEY_HERE",
            });

            async function run() {
              const result = await novu.workflows.patch({}, "<id>");

              console.log(result);
            }

            run();
        - lang: csharp
          label: Csharp (SDK)
          source: |-
            using Novu;
            using Novu.Models.Components;

            var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");

            var res = await sdk.Workflows.PatchAsync(
                workflowId: "<id>",
                patchWorkflowDto: new PatchWorkflowDto() {}
            );

            // handle response
components:
  schemas:
    PatchWorkflowDto:
      type: object
      properties:
        active:
          type: boolean
          description: Activate or deactivate the workflow
        name:
          type: string
          description: New name for the workflow
        description:
          type: string
          description: Updated description of the workflow
        tags:
          description: Tags associated with the workflow
          type: array
          items:
            type: string
        payloadSchema:
          type: object
          description: The payload JSON Schema for the workflow
          nullable: true
          additionalProperties: true
        validatePayload:
          type: boolean
          description: Enable or disable payload schema validation
        isTranslationEnabled:
          type: boolean
          description: Enable or disable translations for this workflow
    WorkflowResponseDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the workflow
        description:
          type: string
          description: Description of the workflow
        tags:
          description: Tags associated with the workflow
          type: array
          items:
            type: string
        active:
          type: boolean
          description: Whether the workflow is active
          default: false
        validatePayload:
          type: boolean
          description: Enable or disable payload schema validation
        payloadSchema:
          type: object
          description: The payload JSON Schema for the workflow
          nullable: true
          additionalProperties: true
        isTranslationEnabled:
          type: boolean
          description: Enable or disable translations for this workflow
          default: false
        _id:
          type: string
          description: Database identifier of the workflow
        workflowId:
          type: string
          description: Workflow identifier
        slug:
          type: string
          description: Slug of the workflow
        updatedAt:
          type: string
          description: Last updated timestamp
        createdAt:
          type: string
          description: Creation timestamp
        updatedBy:
          description: User who last updated the workflow
          nullable: true
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
        lastPublishedAt:
          type: string
          description: Timestamp of the last workflow publication
          nullable: true
        lastPublishedBy:
          description: User who last published the workflow
          nullable: true
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
        steps:
          type: array
          description: Steps of the workflow
          items:
            oneOf:
              - $ref: '#/components/schemas/InAppStepResponseDto'
              - $ref: '#/components/schemas/EmailStepResponseDto'
              - $ref: '#/components/schemas/SmsStepResponseDto'
              - $ref: '#/components/schemas/PushStepResponseDto'
              - $ref: '#/components/schemas/ChatStepResponseDto'
              - $ref: '#/components/schemas/DelayStepResponseDto'
              - $ref: '#/components/schemas/DigestStepResponseDto'
              - $ref: '#/components/schemas/CustomStepResponseDto'
              - $ref: '#/components/schemas/ThrottleStepResponseDto'
              - $ref: '#/components/schemas/HttpRequestStepResponseDto'
            discriminator:
              propertyName: type
              mapping:
                in_app:
                  $ref: '#/components/schemas/InAppStepResponseDto'
                email:
                  $ref: '#/components/schemas/EmailStepResponseDto'
                sms:
                  $ref: '#/components/schemas/SmsStepResponseDto'
                push:
                  $ref: '#/components/schemas/PushStepResponseDto'
                chat:
                  $ref: '#/components/schemas/ChatStepResponseDto'
                delay:
                  $ref: '#/components/schemas/DelayStepResponseDto'
                digest:
                  $ref: '#/components/schemas/DigestStepResponseDto'
                custom:
                  $ref: '#/components/schemas/CustomStepResponseDto'
                throttle:
                  $ref: '#/components/schemas/ThrottleStepResponseDto'
                http_request:
                  $ref: '#/components/schemas/HttpRequestStepResponseDto'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        preferences:
          description: Preferences for the workflow
          allOf:
            - $ref: '#/components/schemas/WorkflowPreferencesResponseDto'
        status:
          $ref: '#/components/schemas/WorkflowStatusEnum'
        issues:
          type: object
          description: Runtime issues for workflow creation and update
          additionalProperties:
            $ref: '#/components/schemas/RuntimeIssueDto'
        lastTriggeredAt:
          type: string
          description: Timestamp of the last workflow trigger
          nullable: true
        payloadExample:
          type: object
          description: Generated payload example based on the payload schema
          nullable: true
          additionalProperties: true
        severity:
          $ref: '#/components/schemas/SeverityLevelEnum'
      required:
        - name
        - _id
        - workflowId
        - slug
        - updatedAt
        - createdAt
        - steps
        - origin
        - preferences
        - status
        - severity
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error response.
          example: 404
        timestamp:
          type: string
          description: Timestamp of when the error occurred.
          example: '2024-12-12T13:00:00Z'
        path:
          type: string
          description: The path where the error occurred.
          example: /api/v1/resource
        message:
          description: Value that failed validation
          oneOf:
            - type: string
              nullable: true
            - type: number
            - type: boolean
            - type: object
              nullable: true
            - type: array
              items:
                anyOf:
                  - type: string
                    nullable: true
                  - type: number
                  - type: boolean
                  - type: object
                    additionalProperties: true
          example: 'xx xx xx '
        ctx:
          type: object
          description: Optional context object for additional error details.
          additionalProperties: true
          example:
            workflowId: some_wf_id
            stepId: some_wf_id
        errorId:
          type: string
          description: >-
            Optional unique identifier for the error, useful for tracking using
            Sentry and 
                  New Relic, only available for 500.
          example: abc123
      required:
        - statusCode
        - timestamp
        - path
    ValidationErrorDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error response.
          example: 404
        timestamp:
          type: string
          description: Timestamp of when the error occurred.
          example: '2024-12-12T13:00:00Z'
        path:
          type: string
          description: The path where the error occurred.
          example: /api/v1/resource
        message:
          description: Value that failed validation
          oneOf:
            - type: string
              nullable: true
            - type: number
            - type: boolean
            - type: object
              nullable: true
            - type: array
              items:
                anyOf:
                  - type: string
                    nullable: true
                  - type: number
                  - type: boolean
                  - type: object
                    additionalProperties: true
          example: 'xx xx xx '
        ctx:
          type: object
          description: Optional context object for additional error details.
          additionalProperties: true
          example:
            workflowId: some_wf_id
            stepId: some_wf_id
        errorId:
          type: string
          description: >-
            Optional unique identifier for the error, useful for tracking using
            Sentry and 
                  New Relic, only available for 500.
          example: abc123
        errors:
          type: object
          description: A record of validation errors keyed by field name
          additionalProperties:
            $ref: '#/components/schemas/ConstraintValidation'
          example:
            fieldName1:
              messages:
                - Field is required
                - Must be a valid email address
              value: invalidEmail
            fieldName2:
              messages:
                - Must be at least 18 years old
              value: 17
            fieldName3:
              messages:
                - Must be a boolean value
              value: true
            fieldName4:
              messages:
                - Must be a valid object
              value:
                key: value
            fieldName5:
              messages:
                - Field is missing
              value: null
            fieldName6:
              messages:
                - Undefined value
      required:
        - statusCode
        - timestamp
        - path
        - errors
    UserResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: User ID
        firstName:
          type: string
          description: User first name
          nullable: true
        lastName:
          type: string
          description: User last name
          nullable: true
        externalId:
          type: string
          description: User external ID
          nullable: true
      required:
        - _id
    InAppStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the in-app step
          allOf:
            - $ref: '#/components/schemas/InAppControlsMetadataResponseDto'
        controlValues:
          description: Control values for the in-app step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/InAppControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    EmailStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the email step
          allOf:
            - $ref: '#/components/schemas/EmailControlsMetadataResponseDto'
        controlValues:
          description: Control values for the email step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/EmailControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    SmsStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the SMS step
          allOf:
            - $ref: '#/components/schemas/SmsControlsMetadataResponseDto'
        controlValues:
          description: Control values for the SMS step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/SmsControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    PushStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the push step
          allOf:
            - $ref: '#/components/schemas/PushControlsMetadataResponseDto'
        controlValues:
          description: Control values for the push step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/PushControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    ChatStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the chat step
          allOf:
            - $ref: '#/components/schemas/ChatControlsMetadataResponseDto'
        controlValues:
          description: Control values for the chat step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/ChatControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    DelayStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the delay step
          allOf:
            - $ref: '#/components/schemas/DelayControlsMetadataResponseDto'
        controlValues:
          description: Control values for the delay step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/DelayControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    DigestStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the digest step
          allOf:
            - $ref: '#/components/schemas/DigestControlsMetadataResponseDto'
        controlValues:
          description: Control values for the digest step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/DigestControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    CustomStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the custom step
          allOf:
            - $ref: '#/components/schemas/CustomControlsMetadataResponseDto'
        controlValues:
          description: Control values for the custom step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/CustomControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    ThrottleStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the throttle step
          allOf:
            - $ref: '#/components/schemas/ThrottleControlsMetadataResponseDto'
        controlValues:
          description: Control values for the throttle step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/ThrottleControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    HttpRequestStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the HTTP request step
          allOf:
            - $ref: '#/components/schemas/HttpRequestControlsMetadataResponseDto'
        controlValues:
          description: Control values for the HTTP request step
          additionalProperties: true
          allOf:
            - $ref: '#/components/schemas/HttpRequestControlDto'
        variables:
          type: object
          description: JSON Schema for variables, follows the JSON Schema standard
          additionalProperties: true
        stepId:
          type: string
          description: Unique identifier of the step
        _id:
          type: string
          description: Database identifier of the step
        name:
          type: string
          description: Name of the step
        slug:
          type: string
          description: Slug of the step
        type:
          $ref: '#/components/schemas/StepTypeEnum'
        origin:
          $ref: '#/components/schemas/ResourceOriginEnum'
        workflowId:
          type: string
          description: Workflow identifier
        workflowDatabaseId:
          type: string
          description: Workflow database identifier
        issues:
          description: Issues associated with the step
          allOf:
            - $ref: '#/components/schemas/StepIssuesDto'
        stepResolverHash:
          type: string
          description: Hash identifying the deployed Cloudflare Worker for this step
      required:
        - controls
        - variables
        - stepId
        - _id
        - name
        - slug
        - type
        - origin
        - workflowId
        - workflowDatabaseId
    ResourceOriginEnum:
      type: string
      description: Origin of the layout
      enum:
        - novu-cloud
        - novu-cloud-v1
        - external
    WorkflowPreferencesResponseDto:
      type: object
      properties:
        user:
          description: User-specific workflow preferences
          nullable: true
          allOf:
            - $ref: '#/components/schemas/WorkflowPreferencesDto'
        default:
          description: Default workflow preferences
          allOf:
            - $ref: '#/components/schemas/WorkflowPreferencesDto'
      required:
        - default
    WorkflowStatusEnum:
      type: string
      description: Status of the workflow
      enum:
        - ACTIVE
        - INACTIVE
        - ERROR
    RuntimeIssueDto:
      type: object
      properties: {}
    SeverityLevelEnum:
      type: string
      description: Severity of the workflow
      enum:
        - high
        - medium
        - low
        - none
    ConstraintValidation:
      type: object
      properties:
        messages:
          type: array
          items:
            type: string
          description: List of validation error messages
          example:
            - Field is required
            - Invalid format
        value:
          description: Value that failed validation
          oneOf:
            - type: string
              nullable: true
            - type: number
            - type: boolean
            - type: object
            - type: array
              items:
                anyOf:
                  - type: string
                    nullable: true
                  - type: number
                  - type: boolean
                  - type: object
                    additionalProperties: true
          example: 'xx xx xx '
      required:
        - messages
    InAppControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to In-App
          allOf:
            - $ref: '#/components/schemas/InAppControlDto'
      required:
        - values
    InAppControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        body:
          type: string
          description: Content/body of the in-app message. Required if subject is empty.
          minLength: 1
        subject:
          type: string
          description: Subject/title of the in-app message. Required if body is empty.
          minLength: 1
        avatar:
          type: string
          description: >-
            URL for an avatar image. Must be a valid URL or start with / or {{
            variable }}.
        primaryAction:
          description: Primary action button details.
          allOf:
            - $ref: '#/components/schemas/ActionDto'
        secondaryAction:
          description: Secondary action button details.
          allOf:
            - $ref: '#/components/schemas/ActionDto'
        redirect:
          description: >-
            Redirection URL configuration for the main content click (if no
            actions defined/clicked)..
          allOf:
            - $ref: '#/components/schemas/RedirectDto'
        disableOutputSanitization:
          type: boolean
          description: Disable sanitization of the output.
          default: false
        data:
          type: object
          description: Additional data payload for the step.
          additionalProperties: true
    StepTypeEnum:
      type: string
      description: Type of the step
      enum:
        - in_app
        - email
        - sms
        - chat
        - push
        - digest
        - trigger
        - delay
        - throttle
        - custom
        - http_request
    StepIssuesDto:
      type: object
      properties:
        controls:
          type: object
          description: Controls-related issues
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/StepContentIssueDto'
        integration:
          type: object
          description: Integration-related issues
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/StepIntegrationIssue'
    EmailControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Email
          allOf:
            - $ref: '#/components/schemas/EmailControlDto'
      required:
        - values
    EmailControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        subject:
          type: string
          description: Subject of the email.
          minLength: 1
        body:
          type: string
          description: >-
            Body content of the email, either a valid Maily JSON object, or html
            string.
          default: ''
        editorType:
          type: string
          description: Type of editor to use for the body.
          enum:
            - block
            - html
          default: block
        disableOutputSanitization:
          type: boolean
          description: Disable sanitization of the output.
          default: false
        layoutId:
          type: string
          description: >-
            Layout ID to use for the email. Null means no layout, undefined
            means default layout.
          nullable: true
      required:
        - subject
        - body
    SmsControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to SMS
          allOf:
            - $ref: '#/components/schemas/SmsControlDto'
      required:
        - values
    SmsControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        body:
          type: string
          description: Content of the SMS message.
    PushControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Push
          allOf:
            - $ref: '#/components/schemas/PushControlDto'
      required:
        - values
    PushControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        subject:
          type: string
          description: Subject/title of the push notification.
        body:
          type: string
          description: Body content of the push notification.
    ChatControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Chat
          allOf:
            - $ref: '#/components/schemas/ChatControlDto'
      required:
        - values
    ChatControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        body:
          type: string
          description: Content of the chat message.
    DelayControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Delay
          allOf:
            - $ref: '#/components/schemas/DelayControlDto'
      required:
        - values
    DelayControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        type:
          type: string
          description: >-
            Type of the delay. Currently only 'regular' is supported by the
            schema.
          enum:
            - regular
            - timed
          default: regular
        amount:
          type: number
          description: Amount of time to delay.
          minimum: 1
        unit:
          type: string
          description: Unit of time for the delay amount.
          enum:
            - seconds
            - minutes
            - hours
            - days
            - weeks
            - months
        cron:
          type: string
          description: Cron expression for the delay. Min length 1.
      required:
        - type
    DigestControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Digest
          allOf:
            - $ref: '#/components/schemas/DigestControlDto'
      required:
        - values
    DigestControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        type:
          type: string
          description: The type of digest strategy. Determines which fields are applicable.
          enum:
            - regular
            - timed
        amount:
          type: number
          description: >-
            The amount of time for the digest interval (for REGULAR type). Min
            1.
          minimum: 1
        unit:
          type: string
          description: The unit of time for the digest interval (for REGULAR type).
          enum:
            - seconds
            - minutes
            - hours
            - days
            - weeks
            - months
        lookBackWindow:
          description: Configuration for look-back window (for REGULAR type).
          allOf:
            - $ref: '#/components/schemas/LookBackWindowDto'
        cron:
          type: string
          description: Cron expression for TIMED digest. Min length 1.
        digestKey:
          type: string
          description: >-
            Specify a custom key for digesting events instead of the default
            event key.
    CustomControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Custom step
          allOf:
            - $ref: '#/components/schemas/CustomControlDto'
      required:
        - values
    CustomControlDto:
      type: object
      properties:
        custom:
          type: object
          description: Custom control values for the step.
          additionalProperties: true
    ThrottleControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to Throttle
          allOf:
            - $ref: '#/components/schemas/ThrottleControlDto'
      required:
        - values
    ThrottleControlDto:
      type: object
      properties:
        skip:
          type: object
          description: >-
            JSONLogic filter conditions for conditionally skipping the step
            execution. Supports complex logical operations with AND, OR, and
            comparison operators. See https://jsonlogic.com/ for full typing
            reference.
          example:
            and:
              - '==':
                  - var: payload.tier
                  - pro
              - '==':
                  - var: subscriber.data.role
                  - admin
              - '>':
                  - var: payload.amount
                  - '4'
          additionalProperties: true
        type:
          type: string
          description: The type of throttle window.
          enum:
            - fixed
            - dynamic
          default: fixed
        amount:
          type: number
          description: >-
            The amount of time for the throttle window (required for fixed
            type).
          minimum: 1
        unit:
          type: string
          description: The unit of time for the throttle window (required for fixed type).
          enum:
            - minutes
            - hours
            - days
        dynamicKey:
          type: string
          description: >-
            Key path to retrieve dynamic window value (required for dynamic
            type).
          example: payload.timestamp
        threshold:
          type: number
          description: >-
            The maximum number of executions allowed within the window. Defaults
            to 1.
          minimum: 1
          default: 1
        throttleKey:
          type: string
          description: >-
            Optional key for grouping throttle rules. If not provided, defaults
            to workflow and subscriber combination.
      required:
        - type
    HttpRequestControlsMetadataResponseDto:
      type: object
      properties:
        dataSchema:
          type: object
          description: JSON Schema for data
          additionalProperties: true
        uiSchema:
          description: UI Schema for rendering
          allOf:
            - $ref: '#/components/schemas/UiSchema'
        values:
          description: Control values specific to HTTP Request step
          allOf:
            - $ref: '#/components/schemas/HttpRequestControlDto'
      required:
        - values
    HttpRequestControlDto:
      type: object
      properties:
        method:
          $ref: '#/components/schemas/HttpMethodEnum'
        url:
          type: string
          description: Target URL for the HTTP request
        headers:
          description: Request headers as key-value pairs
          type: array
          items:
            $ref: '#/components/schemas/HttpRequestKeyValuePairDto'
        body:
          description: >-
            Request body as a raw JSON string. Key-value arrays are supported
            for legacy workflows.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/HttpRequestKeyValuePairDto'
        responseBodySchema:
          type: object
          description: JSON schema to validate response body against
          additionalProperties: true
        enforceSchemaValidation:
          type: boolean
          description: Whether to enforce response body schema validation
        continueOnFailure:
          type: boolean
          description: Whether to continue workflow execution on failure
      required:
        - method
        - url
    WorkflowPreferencesDto:
      type: object
      properties:
        all:
          description: >-
            A preference for the workflow. The values specified here will be
            used if no preference is specified for a channel.
          oneOf:
            - $ref: '#/components/schemas/WorkflowPreferenceDto'
          allOf:
            - $ref: '#/components/schemas/WorkflowPreferenceDto'
        channels:
          type: object
          description: Preferences for different communication channels
          additionalProperties:
            $ref: '#/components/schemas/ChannelPreferenceDto'
          example:
            email:
              enabled: true
            sms:
              enabled: false
      required:
        - all
        - channels
    UiSchema:
      type: object
      properties:
        group:
          $ref: '#/components/schemas/UiSchemaGroupEnum'
        properties:
          type: object
          description: Properties of the UI Schema
          additionalProperties:
            $ref: '#/components/schemas/UiSchemaProperty'
    ActionDto:
      type: object
      properties:
        label:
          type: string
          description: Label for the action button.
        redirect:
          description: Redirect configuration for the action.
          allOf:
            - $ref: '#/components/schemas/RedirectDto'
    RedirectDto:
      type: object
      properties:
        url:
          type: string
          description: URL to redirect to
        target:
          type: string
          description: Target attribute for the redirect link
          enum:
            - _self
            - _blank
            - _parent
            - _top
            - _unfencedTop
      required:
        - url
    StepContentIssueDto:
      type: object
      properties:
        issueType:
          $ref: '#/components/schemas/ContentIssueEnum'
        variableName:
          type: string
          description: Name of the variable related to the issue
        message:
          type: string
          description: Detailed message describing the issue
      required:
        - issueType
        - message
    StepIntegrationIssue:
      type: object
      properties:
        issueType:
          $ref: '#/components/schemas/IntegrationIssueEnum'
        variableName:
          type: string
          description: Name of the variable related to the issue
        message:
          type: string
          description: Detailed message describing the issue
      required:
        - issueType
        - message
    LookBackWindowDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount of time for the look-back window.
          minimum: 1
        unit:
          type: string
          description: Unit of time for the look-back window.
          enum:
            - seconds
            - minutes
            - hours
            - days
            - weeks
            - months
      required:
        - amount
        - unit
    HttpMethodEnum:
      type: string
      description: HTTP method
      enum:
        - GET
        - POST
        - PUT
        - DELETE
        - PATCH
    HttpRequestKeyValuePairDto:
      type: object
      properties:
        key:
          type: string
          description: Key of the key-value pair
        value:
          type: string
          description: Value of the key-value pair
      required:
        - key
        - value
    WorkflowPreferenceDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            A flag specifying if notification delivery is enabled for the
            workflow. If true, notification delivery is enabled by default for
            all channels. This setting can be overridden by the channel
            preferences.
          default: true
        readOnly:
          type: boolean
          description: >-
            A flag specifying if the preference is read-only. If true, the
            preference cannot be changed by the Subscriber.
          default: false
      required:
        - enabled
        - readOnly
    ChannelPreferenceDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            A flag specifying if notification delivery is enabled for the
            channel. If true, notification delivery is enabled.
          default: true
      required:
        - enabled
    UiSchemaGroupEnum:
      type: string
      description: Group of the UI Schema
      enum:
        - IN_APP
        - EMAIL
        - DIGEST
        - DELAY
        - THROTTLE
        - SMS
        - CHAT
        - PUSH
        - SKIP
        - LAYOUT
        - HTTP_REQUEST
    UiSchemaProperty:
      type: object
      properties:
        placeholder:
          description: Placeholder for the UI Schema Property
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: object
              additionalProperties: true
            - type: array
              items:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                    additionalProperties: true
          nullable: true
        component:
          $ref: '#/components/schemas/UiComponentEnum'
        properties:
          type: object
          description: Properties of the UI Schema
          additionalProperties:
            $ref: '#/components/schemas/UiSchemaProperty'
      required:
        - component
    ContentIssueEnum:
      type: string
      description: Type of step content issue
      enum:
        - ILLEGAL_VARIABLE_IN_CONTROL_VALUE
        - INVALID_FILTER_ARG_IN_VARIABLE
        - INVALID_URL
        - MISSING_VALUE
        - TIER_LIMIT_EXCEEDED
    IntegrationIssueEnum:
      type: string
      description: Type of integration issue
      enum:
        - MISSING_INTEGRATION
        - INBOX_NOT_CONNECTED
    UiComponentEnum:
      type: string
      description: Component type for the UI Schema Property
      enum:
        - EMAIL_EDITOR_SELECT
        - LAYOUT_SELECT
        - BLOCK_EDITOR
        - EMAIL_BODY
        - TEXT_FULL_LINE
        - TEXT_INLINE_LABEL
        - IN_APP_BODY
        - IN_APP_AVATAR
        - IN_APP_PRIMARY_SUBJECT
        - IN_APP_BUTTON_DROPDOWN
        - IN_APP_DISABLE_SANITIZATION_SWITCH
        - DISABLE_SANITIZATION_SWITCH
        - URL_TEXT_BOX
        - DIGEST_AMOUNT
        - DIGEST_UNIT
        - DIGEST_TYPE
        - DIGEST_KEY
        - DIGEST_CRON
        - DELAY_AMOUNT
        - DELAY_UNIT
        - DELAY_TYPE
        - DELAY_CRON
        - DELAY_DYNAMIC_KEY
        - THROTTLE_TYPE
        - THROTTLE_WINDOW
        - THROTTLE_UNIT
        - THROTTLE_DYNAMIC_KEY
        - THROTTLE_THRESHOLD
        - THROTTLE_KEY
        - EXTEND_TO_SCHEDULE
        - SMS_BODY
        - CHAT_BODY
        - PUSH_BODY
        - PUSH_SUBJECT
        - QUERY_EDITOR
        - DATA
        - LAYOUT_EMAIL
        - DESTINATION_METHOD
        - DESTINATION_URL
        - DESTINATION_HEADERS
        - DESTINATION_BODY
        - DESTINATION_RESPONSE_BODY_SCHEMA
        - DESTINATION_ENFORCE_SCHEMA_VALIDATION
        - DESTINATION_CONTINUE_ON_FAILURE
        - DESTINATION_TIMEOUT
      x-speakeasy-unknown-values: allow
  headers:
    Content-Type:
      required: true
      description: The MIME type of the response body.
      schema:
        type: string
      example: application/json
    RateLimit-Limit:
      required: false
      description: >-
        The number of requests that the client is permitted to make per second.
        The actual maximum may differ when burst is enabled.
      schema:
        type: string
      example: '100'
    RateLimit-Remaining:
      required: false
      description: The number of requests remaining until the next window.
      schema:
        type: string
      example: '93'
    RateLimit-Reset:
      required: false
      description: >-
        The remaining seconds until a request of the same cost will be
        refreshed.
      schema:
        type: string
      example: '8'
    RateLimit-Policy:
      required: false
      description: The rate limit policy that was used to evaluate the request.
      schema:
        type: string
      example: >-
        100;w=1;burst=110;comment="token
        bucket";category="trigger";cost="single"
    Idempotency-Key:
      required: false
      description: The idempotency key used to evaluate the request.
      schema:
        type: string
      example: '8'
    Idempotency-Replay:
      required: false
      description: Whether the request was a replay of a previous request.
      schema:
        type: string
      example: 'true'
    Retry-After:
      required: false
      description: >-
        The number of seconds after which the client may retry the request that
        was previously rejected.
      schema:
        type: string
      example: '8'
  securitySchemes:
    secretKey:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        API key authentication. Allowed headers-- "Authorization: ApiKey
        <novu_secret_key>".
      x-speakeasy-example: YOUR_SECRET_KEY_HERE

````