> ## Documentation index
> Fetch the complete documentation index at: https://novu.docs7.io/llms.txt
> Ask it with GET https://novu.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Sync a workflow

> Synchronizes a workflow to the target environment

`PUT /v2/workflows/{workflowId}/sync`

## OpenAPI

````yaml https://spec.speakeasy.com/novu/novu/json-development-with-code-samples put /v2/workflows/{workflowId}/sync
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.19.2
  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
  - name: Agents
    description: Agents are conversational assistants that receive inbound messages
      from connected channels and respond through a custom code bridge or a
      managed runtime provider.
    externalDocs:
      url: https://docs.novu.co/agents
paths:
  /v2/workflows/{workflowId}/sync:
    put:
      description: Synchronizes a workflow to the target environment
      operationId: WorkflowController_sync
      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: Sync workflow details
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SyncWorkflowDto"
      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":
          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"
          description: Conflict
          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: []
      summary: Sync a workflow
      tags:
        - Workflows
      x-speakeasy-name-override: sync
      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();

            $syncWorkflowDto = new Components\SyncWorkflowDto(
                targetEnvironmentId: '<id>',
            );

            $response = $sdk->workflows->sync(
                workflowId: '<id>',
                syncWorkflowDto: $syncWorkflowDto

            );

            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.sync(workflow_id="<id>", sync_workflow_dto={
                    "target_environment_id": "<id>",
                })

                # Handle response
                print(res)
        - lang: go
          label: Go
          source: >-
            package main


            import(
            	"context"
            	"github.com/novuhq/novu-go/v3"
            	"github.com/novuhq/novu-go/v3/models/components"
            	"log"
            )


            func main() {
                ctx := context.Background()

                s := v3.New(
                    v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
                )

                res, err := s.Workflows.Sync(ctx, "<id>", components.SyncWorkflowDto{
                    TargetEnvironmentID: "<id>",
                }, nil)
                if err != nil {
                    log.Fatal(err)
                }
                if res.WorkflowResponseDto != nil {
                    // handle response
                }
            }
        - 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.sync({
                targetEnvironmentId: "<id>",
              }, "<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.SyncAsync(
                workflowId: "<id>",
                syncWorkflowDto: new SyncWorkflowDto() {
                    TargetEnvironmentId = "<id>",
                }
            );

            // handle response
components:
  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
  schemas:
    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
    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
    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
    SeverityLevelEnum:
      type: string
      enum:
        - high
        - medium
        - low
        - none
      description: Override the severity of the workflow
    StepTypeEnum:
      type: string
      enum:
        - in_app
        - email
        - sms
        - chat
        - push
        - tool
        - digest
        - trigger
        - delay
        - throttle
        - custom
        - http_request
      description: Channels of the notification
    ResourceOriginEnum:
      type: string
      enum:
        - novu-cloud
        - novu-cloud-v1
        - external
      description: Origin of the workflow
    RedirectDto:
      type: object
      properties:
        url:
          type: string
          description: URL to redirect to
        target:
          enum:
            - _self
            - _blank
            - _parent
            - _top
            - _unfencedTop
          type: string
          description: Target attribute for the redirect link
      required:
        - url
    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
    UiComponentEnum:
      type: string
      enum:
        - EMAIL_EDITOR_SELECT
        - CHAT_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
        - TOOL_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
      description: Component type for the UI Schema Property
      x-speakeasy-unknown-values: allow
    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:
          description: Component type for the UI Schema Property
          $ref: "#/components/schemas/UiComponentEnum"
        properties:
          type: object
          description: Properties of the UI Schema
          additionalProperties:
            $ref: "#/components/schemas/UiSchemaProperty"
      required:
        - component
    UiSchemaGroupEnum:
      type: string
      enum:
        - IN_APP
        - EMAIL
        - DIGEST
        - DELAY
        - THROTTLE
        - SMS
        - CHAT
        - PUSH
        - TOOL
        - SKIP
        - LAYOUT
        - HTTP_REQUEST
      description: Group of the UI Schema
    UiSchema:
      type: object
      properties:
        group:
          description: Group of the UI Schema
          $ref: "#/components/schemas/UiSchemaGroupEnum"
        properties:
          type: object
          description: Properties of the UI Schema
          additionalProperties:
            $ref: "#/components/schemas/UiSchemaProperty"
    WorkflowIssueTypeEnum:
      type: string
      enum:
        - MISSING_VALUE
        - MAX_LENGTH_ACCESSED
        - WORKFLOW_ID_ALREADY_EXISTS
        - DUPLICATED_VALUE
        - LIMIT_REACHED
    RuntimeIssueDto:
      type: object
      properties:
        issueType:
          $ref: "#/components/schemas/WorkflowIssueTypeEnum"
        variableName:
          type: string
          description: Variable associated with the issue
        message:
          type: string
          description: Human-readable issue message
      required:
        - issueType
        - message
    ContentIssueEnum:
      type: string
      enum:
        - ILLEGAL_VARIABLE_IN_CONTROL_VALUE
        - INVALID_FILTER_ARG_IN_VARIABLE
        - INVALID_URL
        - MISSING_VALUE
        - TIER_LIMIT_EXCEEDED
        - UNSUPPORTED_PROPERTY
        - CHAT_CARD_LIMIT_EXCEEDED
        - CHAT_CARD_INVALID_BUTTON
      description: Type of step content issue
    StepIssueSeverityEnum:
      type: string
      enum:
        - error
        - warning
      description: Blocking severity of the issue. `error` (default when omitted)
        blocks save; `warning` is a non-blocking notice.
    StepContentIssueDto:
      type: object
      properties:
        issueType:
          description: Type of step content issue
          $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
        severity:
          description: Blocking severity of the issue. `error` (default when omitted)
            blocks save; `warning` is a non-blocking notice.
          $ref: "#/components/schemas/StepIssueSeverityEnum"
      required:
        - issueType
        - message
    IntegrationIssueEnum:
      type: string
      enum:
        - MISSING_INTEGRATION
        - INBOX_NOT_CONNECTED
      description: Type of integration issue
    StepIntegrationIssue:
      type: object
      properties:
        issueType:
          description: Type of integration issue
          $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
        severity:
          description: Blocking severity of the issue. `error` (default when omitted)
            blocks save; `warning` is a non-blocking notice.
          $ref: "#/components/schemas/StepIssueSeverityEnum"
      required:
        - issueType
        - message
    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"
    EmailFromControlDto:
      type: object
      properties:
        email:
          type: string
          description: Sender email address override for this step.
        name:
          type: string
          description: Sender display name override for this step.
    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
        from:
          description: Sender name and email overrides for this step.
          allOf:
            - $ref: "#/components/schemas/EmailFromControlDto"
        useProviderDefaults:
          type: boolean
          description: When true, sender name/email use the primary email integration
            defaults and skip workflow agent defaults.
        replyTo:
          type: string
          description: Step-level Reply-To override. When unset, inherits the workflow
            agent reply-to.
        preheader:
          type: string
          description: One-line inbox preview text shown next to the subject.
      required:
        - subject
        - body
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/EmailControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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.
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/SmsControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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.
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/PushControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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.
        editorType:
          type: string
          description: 'Type of editor to use for the body. When omitted, inferred from
            the body: Maily JSON is "block", otherwise "text".'
          enum:
            - block
            - text
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/ChatControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/DelayControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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
    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.
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/DigestControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/ThrottleControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    CustomControlDto:
      type: object
      properties:
        custom:
          type: object
          description: Custom control values for the step.
          additionalProperties: true
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/CustomControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    HttpMethodEnum:
      type: string
      enum:
        - GET
        - POST
        - PUT
        - DELETE
        - PATCH
      description: HTTP method
    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
    HttpRequestControlDto:
      type: object
      properties:
        method:
          description: HTTP 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
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/HttpRequestControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    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"
    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
    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
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/InAppControlDto"
    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"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    ToolControlDto:
      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 tool payload.
    ToolControlsMetadataResponseDto:
      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 Tool
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/ToolControlDto"
    ToolStepResponseDto:
      type: object
      properties:
        controls:
          description: Controls metadata for the tool step
          allOf:
            - $ref: "#/components/schemas/ToolControlsMetadataResponseDto"
        controlValues:
          description: Control values for the tool step
          additionalProperties: true
          allOf:
            - $ref: "#/components/schemas/ToolControlDto"
        providerOverrides:
          type: object
          description: Per-provider content overrides keyed by providerId. Stored
            separately from controlValues and merged over the default body at
            send time. Keys are ChatProviderIdEnum / ToolProviderIdEnum values
            (e.g. `slack`, `whatsapp-business`, `pagerduty`).
          example:
            slack:
              text: "{{payload.title}}"
              blocks:
                - type: divider
            whatsapp-business:
              type: text
              text:
                body: "{{payload.title}}"
            pagerduty:
              severity: warning
              source: novu
              summary: "{{payload.title}}"
          additionalProperties:
            type: object
            additionalProperties: true
          nullable: true
        integrationOverrides:
          type: object
          description: Per-integration content overrides keyed by providerId, then by
            integration identifier. Each entry is merged over the matching
            providerOverrides entry, only for sends through that integration.
            Trigger-time overrides still take precedence. Entries whose
            integration does not exist in the environment are kept but not
            applied.
          example:
            tool-webhook:
              prod-alerts:
                alert_type: incident
              staging-alerts:
                alert_type: test
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties: true
          nullable: true
        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:
          description: Type of the step
          $ref: "#/components/schemas/StepTypeEnum"
        origin:
          description: Origin of the step
          $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
    WorkflowAgentConfigDto:
      type: object
      properties:
        identifier:
          type: string
          description: Public agent identifier used to route this workflow through an
            agent's connected channels.
        providers:
          type: object
          description: Optional per-provider overrides keyed by providerId (e.g.
            novu-email-agent). Today only Novu Email replyTo is supported.
          additionalProperties:
            type: object
            properties:
              replyTo:
                type: string
      required:
        - identifier
    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
        condition:
          type: object
          additionalProperties: true
          description: JsonLogic condition controlling whether this preference applies
      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
    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
    WorkflowPreferencesResponseDto:
      type: object
      properties:
        user:
          description: User-specific workflow preferences
          nullable: true
          type: object
          allOf:
            - $ref: "#/components/schemas/WorkflowPreferencesDto"
        default:
          description: Default workflow preferences
          allOf:
            - $ref: "#/components/schemas/WorkflowPreferencesDto"
      required:
        - default
    WorkflowStatusEnum:
      type: string
      enum:
        - ACTIVE
        - INACTIVE
        - ERROR
      description: Status of the 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
        agent:
          description: Optional agent assignment used to route this workflow through an
            agent's connected channels. Null when unassigned.
          nullable: true
          type: object
          allOf:
            - $ref: "#/components/schemas/WorkflowAgentConfigDto"
        _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
          type: object
          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
          type: object
          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"
              - $ref: "#/components/schemas/ToolStepResponseDto"
            discriminator:
              propertyName: type
              mapping:
                in_app: "#/components/schemas/InAppStepResponseDto"
                email: "#/components/schemas/EmailStepResponseDto"
                sms: "#/components/schemas/SmsStepResponseDto"
                push: "#/components/schemas/PushStepResponseDto"
                chat: "#/components/schemas/ChatStepResponseDto"
                delay: "#/components/schemas/DelayStepResponseDto"
                digest: "#/components/schemas/DigestStepResponseDto"
                custom: "#/components/schemas/CustomStepResponseDto"
                throttle: "#/components/schemas/ThrottleStepResponseDto"
                http_request: "#/components/schemas/HttpRequestStepResponseDto"
                tool: "#/components/schemas/ToolStepResponseDto"
        origin:
          description: Origin of the workflow
          $ref: "#/components/schemas/ResourceOriginEnum"
        preferences:
          description: Preferences for the workflow
          allOf:
            - $ref: "#/components/schemas/WorkflowPreferencesResponseDto"
        status:
          description: Status of the workflow
          $ref: "#/components/schemas/WorkflowStatusEnum"
        issues:
          type: object
          description: Runtime issues for workflow creation and update
          additionalProperties:
            type: array
            items:
              $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:
          description: Severity of the workflow
          $ref: "#/components/schemas/SeverityLevelEnum"
      required:
        - name
        - _id
        - workflowId
        - slug
        - updatedAt
        - createdAt
        - steps
        - origin
        - preferences
        - status
        - severity
    SyncWorkflowDto:
      type: object
      properties:
        targetEnvironmentId:
          type: string
          description: Target environment identifier to sync the workflow to
      required:
        - targetEnvironmentId
  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"
    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"
    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"
````
