---
title: "Create or Update Workflow"
method: POST
path: "/v1/{workspace}/workflow/{slug}/"
---

# Create or Update Workflow

`POST /v1/{workspace}/workflow/{slug}/`

Create a new workflow or update the draft version of an existing one

## Path parameters

- `workspace` string, required
- `slug` string, required

## Query parameters

- `commit` boolean
- `commit_message` string

## Request body

- WorkflowCreateUpdate
  - `name` string, required — Human-readable name of the workflow. Workflow slug is generated from this name for new workflows.
  - `description` string, nullable — Description explaining the usecase of the workflow
  - `is_enabled` boolean — Whether the workflow should be enabled
  - `category` string, required — Notification category of the workflow. Used to apply category-specific settings and preferences.
  - `tags` string[] — Tags are used for grouping and filtering workflows in list.
  - `trigger_type` 'event' | 'api', required — You can trigger a workflow either via API by passing its slug directly, or through an event-based system where the workflow runs when a specific event occurs. You can compare both methods [here](https://docs.suprsend.com/docs/event-vs-api-trigger). If the workflow should run when a user enters or exits a list, use `trigger_type = event`.
  - `payload_schema` object, nullable — Schema to validate workflow api data structure. Used only when trigger_type = api.
    - `schema` string — Linked schema slug. You can create a schema via [Create Schema](/reference/create-schema) endpoint and then link it here.
    - `version_no` integer — Schema version number to link. By default, live version is always picked for validation
  - `trigger_events` string[] — Events that trigger this workflow (required if trigger_type = event). In case of list entry/exit, event names will be `$USER_ENTERED_LIST - <list_id>` and `$USER_EXITED_LIST - <list_id>` respectively.
  - `ratelimit` object, nullable — Throttle settings for the workflow. This is used to limit the number of times a workflow can be executed per user in a given time period.
    - `count` integer — Maximum number of executions allowed within the sliding window
    - `sliding_window` string — Time window for rate limiting to be passed in format `00d00h00m00s`, d (days), h (hours), m (minutes), s (seconds). Rate limit is applied within this window.
  - `conditions` object[], nullable — Trigger Conditions. Workflow will be executed if any of the conditions in this array evaluate to true.
    - `type` 'expression_v1' — Type of condition expression. Currently only `expression_v1` is supported.
    - `expression_v1` object — Expression object containing the condition logic
      - `op` 'AND' — Logical operator to combine conditions. Currently only `AND` is supported.
      - `args` object[] — Array of conditions. Each condition is defined as key (variable) <op> value. Refer to [how to construct a condition here](https://docs.suprsend.com/docs/branch#constructing-a-condition).
        - `op` '==' | '!=' | '>' | '<' | '>=' | '<=' | 'EMPTY' | 'NON_EMPTY' | 'CONTAINS' | 'NOT_CONTAINS' | 'ARRAY_INTERSECTS' | 'NOT_ARRAY_INTERSECTS' | 'DATETIME_EQUALS' | 'DATETIME_LT' | 'DATETIME_GT' — Comparison operator between variable and value. Refer to list of [comparison operators here](https://docs.suprsend.com/docs/branch#key-value-pair).
        - `value` string — Value to compare against. Can add fixed value as ".." or variable in JSONNET format as data.<prop>.
        - `variable` string — key from your trigger payload to compare the value against. Direct key name is passed here.
        - `variable_ns` '' | '$recipient' | '$tenant' — Variable namespace (empty for data passed in trigger, `$recipient` for recipient or object subscription properties, `$tenant` for tenant properties)
  - `override_recipients_type` 'user' | 'single_object_fields' — Override recipients using a property from the trigger payload. Type defines if the workflow should run for a list of users or a single [object](https://docs.suprsend.com/docs/objects). Only applicable for trigger_type = `event`.
  - `override_recipients_user_expr` string, nullable — JQ expression to override recipients when override_recipients_type = `user`. Only applicable for trigger_type = `event`.
  - `override_recipients_single_object_fields_expr` object, nullable — JQ expression to override recipients with object when override_recipients_type = `single_object_fields`. Only applicable for trigger_type = `event`.
    - `id` string — JQ expression to extract object ID from trigger payload
    - `object_type` string — JQ expression to extract object type from trigger payload. You can also pass fixed value as "..".
    - `$object_subscriptions_query.depth` string — Depth [Optional] is used to specify how deep to traverse object subscriptions. `depth=0` would only send notification to object channels and not its subscribers, `depth=1` would fetch 1 level of subscriptions, `depth=2` (maximum) → Also fetches subscriptions of child objects, eg. <department -> teams -> team members>.
  - `override_actor_user_expr` string, nullable — JQ expression to override actor. Only applicable for trigger_type = `event`.
  - `override_tenant_expr` string, nullable — JQ expression to override [tenant](https://docs.suprsend.com/docs/tenants). Only applicable for trigger_type = `event`.
  - `tree` object, required — Node tree structure of the workflow. Contains the nodes array with all workflow nodes and their configuration.
    - `nodes` union[] — Array of nodes in the workflow tree structure.
      - union
        - DelayNode — [**Delay**](https://docs.suprsend.com/docs/delay): Pauses workflow execution for a specified duration.
          - `name` string, required — Human-readable name of the node
          - `description` string, nullable — Description of what this node does
          - `node_type` 'delay', required
          - `delay_type` 'fixed' | 'dynamic' | 'relative_to', required — Type of delay. Determines how the duration is calculated. **Fixed**: Static duration added as XXdXXhXXmXXs. **Dynamic**: duration is passed as variable in your trigger payload in jq format. Eg. `.delay_duration`, `$recipient.delay_duration`, `$actor.delay_duration`, `$tenant.delay_duration`. **Relative to**: delay is relative to a future timestamp passed in your trigger payload. Eg. `.start_time` before 15m.
          - `duration` string — Duration value. Required for 'fixed' and 'dynamic' delay types.
          - `relative_to` object — Relative delay configuration. Required when delay_type is 'relative_to'.
            - `pivot_expr` string — (jq-expression) variable defining the future timestamp from trigger payload relative to which delay is calculated.
            - `offset_type` 'before' | 'after' — Whether offset is to be added or subtracted from pivot_expr.
            - `offset_value_type` 'fixed' | 'dynamic' — Defines if the offset value is fixed or dynamic. **Fixed**: Static duration added as XXdXXhXXmXXs. Eg. 15m before meeting_start_time. **Dynamic**: offset is passed as variable in your trigger payload or recipient, tenant properties in jq format. Eg. `$recipient.reminder_offset` before meeting_start_time.
            - `offset_value` string — Offset value
        - BatchNode — [**Batch**](https://docs.suprsend.com/docs/batch): Batches incoming workflow triggers/events for a duration to send consolidated notifications.
          - `name` string, required — Human-readable name of the node
          - `description` string, nullable — Description of what this node does
          - `node_type` 'batch', required
          - `mode` 'accumulate_all' | 'flush_leading_item', required — **accumulate_all**: All events are accumulated in the batch and notification is sent once after batch window closes. **flush_leading_item**: Notification is sent immediately for the first event in the batch and rest of the events are batched and sent after batch window closes. Eg. Send anomaly alert with first notification sent at the occurrence of first error and next alert sent after 30 minutes if there are further errors.
          - `window_type` 'fixed' | 'dynamic' | 'relative_to', required — Type of batching window. **fixed**: Static window duration added as XXdXXhXXmXXs. Eg. 30s, 1h, 1d. **dynamic**: Batch window duration is passed as variable in your trigger payload. Add the variable in jq format. Eg. `.window_duration`, `$recipient.batch_duration`, `$actor.window_duration`, `$tenant.window_duration`. **relative_to**: Batch window is relative to a future timestamp passed in your trigger payload. Eg. 15 m before `.task_end_time`.
          - `fixed_window` string — Batch window when window_type is 'fixed'. Static batch window for all users. Format: XXdXXhXXmXXs.
          - `dynamic_window_expr` string — Batch window when window_type is 'dynamic'. jq-expression for deriving batch window duration at runtime.
          - `relative_to` object — Batch window when window_type is 'relative_to'. Batch window is calculated relative to a future timestamp.
            - `pivot_expr` string — (jq-expression) variable defining the future timestamp from trigger payload relative to which batch window is calculated.
            - `offset_type` 'before' | 'after' — Whether offset is to be added or subtracted from pivot timestamp.
            - `offset_value_type` 'fixed' | 'dynamic' — Defines if the offset value is fixed or dynamic. **Fixed**: Static duration added as XXdXXhXXmXXs. Eg. 15m before meeting_start_time. **Dynamic**: offset is passed as variable in your trigger payload or recipient, tenant properties in jq format. Eg. `$recipient.reminder_offset` before meeting_start_time.
            - `offset_value` string — Offset value.
          - `retain_count` integer — Maximum number of items to retain after batch closes (1-100). The output variable set will have the latest or first n items based on the retain_order.
          - `retain_order` 'first' | 'last' — Retain items in this order when retain_count is specified.
          - `batch_key` string — jq-expression used to group events into separate batches. For example, when sending batched notifications for comments on different documents, use `.document_id` as the batch key to ensure comments from different documents are not combined into the same batch.
        - DigestNode — [**Digest**](https://docs.suprsend.com/docs/digest): Batches and sends summary notifications at a recurring digest schedule.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'digest', required
          - `description` string, nullable — Description of what this node does
          - `schedule_type` 'static' | 'dynamic' | 'category_digest_schedule', required — Type of schedule. Determines how the digest schedule is resolved. **static**: Schedule is fixed and will be used for all recipients. **dynamic**: Schedule is dynamic and will be computed at runtime using the `dynamic_schedule_expr`. **category_digest_schedule**: Uses the digest schedule configured on the notification category linked to this workflow. The recipient's selected digest option (or the category default) determines the schedule.
          - `dynamic_schedule_expr` string — jq-expression for deriving dynamic digest schedule at runtime. Eg. `.digest_schedule`
          - `schedule` Schedule — Static schedule configuration for digest notifications.
            - `frequency` 'minutely' | 'hourly' | 'daily' | 'weekly_mo2fr' | 'weekly' | 'monthly' — Frequency of the digest schedule.
            - `interval` integer — Multiplier for recurrence schedule. Eg. 2 for every 2 hours, 3 for every 3 days, etc.
            - `weekdays` string[] — Which days to include when frequency is 'weekly'.
            - `monthdays` object[] — Which days to include when frequency is 'monthly'.
              - …
            - `time` string — Time of day to send digest in HH:MM format (24-hour).
            - `dtstart` string — When to start schedule calculation from in ISO datetime format.
            - `tz_selection` 'fixed' | 'recipient' — timezone of the recurring schedule. **fixed**: Fixed timezone. **recipient**: Recipient's timezone picked from user properties.
            - `tz_fixed` string — Fixed IANA timezone.
          - `retain_count` integer — Maximum number of items to retain after digest closes (1-100). By default, 10 items are retained.
          - `retain_order` 'first' | 'last' — Retain items in this order when retain_count is specified.
          - `trigger_min_count` integer — Digest will be sent if number of triggers in the batch are greater than or equal to this count, else skipped.
        - HttpApiWebhookNode — [**Webhook**](https://docs.suprsend.com/docs/webhook): Makes an HTTP API request to an endpoint.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'httpapi_webhook', required
          - `description` string, nullable — Description of what this node does
          - `http_method` 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE', required — HTTP method of the API call.
          - `url` string, uri, required — Endpoint URL of the API call. You can add variables in JSONNET format. Eg. `"https://api.example.com/webhook?id="+data["$recipient"].id`
          - `headers` object[] — List of headers as key-value pairs. You can add variables in JSONNET format. Eg. `"Bearer"+data["$tenant"].api_key`
            - `key` string — header key
            - `value` string — header value
          - `body_content_type` string — Content type for the body.
          - `body` string — JSONNET script to evaluate request body.
          - `query_params` object[] — List of query parameters as key-value pairs. You can add variables in JSONNET format. Eg. `data["$recipient"].id`
            - `key` string — Query Parameter Key
            - `value` string — Query Parameter Value
          - `output_key` string — Optional key to store the response body of API call. If not provided, the response will be appended at the root of the workflow payload. It's recommended to provide a unique key here to avoid overwriting existing data.
        - HttpApiFetchNode — [**Fetch**](https://docs.suprsend.com/docs/fetch): Fetches data from an API endpoint using GET method only.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'httpapi_fetch', required
          - `description` string, nullable — Description of what this node does
          - `http_method` 'GET', required — HTTP method to use. Only GET is supported for fetch operations.
          - `url` string, required — Endpoint URL to fetch data from.
          - `headers` object[] — List of headers as key-value pairs. You can add variables in JSONNET format. Eg. `"Bearer"+data["$tenant"].api_key`
            - `key` string — header key
            - `value` string — header value
          - `query_params` object[] — List of query parameters as key-value pairs. You can add variables in JSONNET format. Eg. `data["$recipient"].id`
            - `key` string — Query Parameter Key
            - `value` string — Query Parameter Value
          - `output_key` string — Optional key to store the response of API call. If not provided, the response will be appended at the root of the workflow payload. It's recommended to provide a unique key here to avoid overwriting existing data.
        - BranchWaitUntilNode — [**Wait Until**](https://docs.suprsend.com/docs/wait-until): Waits until a condition is met or the maximum time is reached. Uses branch structure with conditions.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'branch_waituntil', required
          - `description` string, nullable — Description of what this node does
          - `branches` object[], required — Array of branches with conditions to evaluate. Minimum 2 branches required.
            - `name` string — Name of the branch for identification.
            - `description` string — Description of what this branch does.
            - `is_default` boolean — Whether this is the default branch. In case of wait until, branch with condition->type as 'delay' (max time) should always be the default branch.
            - `conditions` object[] — Array of conditions to evaluate for this branch.
              - …
            - `nodes` unknown[] — Array of nodes to execute when this branch condition is met. Minimum 1 node required.
              - …
        - BranchNode — [**Branch**](https://docs.suprsend.com/docs/branch): Divides the workflow in different branches and executes the first branch that matches the branch condition.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'branch', required
          - `description` string, nullable — Description of what this node does
          - `branches` object[], required — Array of branches with conditions to evaluate. Minimum 2 branches required.
            - `name` string — Name of the branch for identification.
            - `description` string — Description of what this branch does.
            - `is_default` boolean — Whether this is the default branch. Default branch is executed if no other branch conditions are met.
            - `conditions` object[] — Array of conditions to evaluate for this branch.
              - …
            - `nodes` unknown[] — Array of nodes to execute when this branch condition is met.
              - …
        - TransformNode — [**Data Transform**](https://docs.suprsend.com/docs/data-transform): Transforms data or generates/overrides variables using scripting languages like JSONNET or Handlebars.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'transform', required
          - `description` string, nullable — Description of what this node does
          - `variables` object[], required — Array of variables to generate or override. Each variable must have a unique key.
            - `key` string — Literal string key for the variable.
            - `value_lang` 'jsonnet' | 'handlebars' — Scripting language to use for deriving the variable value at runtime.
            - `value` string — Script in the selected language to derive the value of the variable at runtime.
        - TimeWindowNode — [**Time Window**](https://docs.suprsend.com/docs/time-window): Restricts workflow execution to specific time windows based on recurrence rules.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'timewindow', required
          - `description` string, nullable — Description of what this node does
          - `windows` object[], required — Array of time windows defined using recurrence rule structure.
            - `frequency` 'daily' | 'weekly_mo2fr' | 'weekly' | 'monthly' — Frequency of the time window recurrence.
            - `weekdays` string[] — Which days to include when frequency is 'weekly'.
            - `monthdays` object[] — Which days to include when frequency is 'monthly'.
              - …
            - `stime` string — Clock start time of the window in HH:MM format (24-hour).
            - `etime` string — Clock end time of the window in HH:MM format (24-hour).
          - `tz_selection` 'fixed' | 'recipient' — Where to pick timezone from for calculating datetime from recurrence rule. **fixed**: Use a fixed timezone. **recipient**: Use the timezone set in recipient properties.
          - `tz_fixed` string — Fixed IANA timezone for calculating datetime in recurrence rule.
        - SubscriberListOperationAddUserNode — [**Add User to List**](https://docs.suprsend.com/docs/add-user-to-list): Adds users (actor or recipient) to a subscriber list. Can create the list if it doesn't exist.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'subscriberlistoperation_adduser', required
          - `description` string, nullable — Description of what this node does
          - `is_list_id_dynamic` boolean — Whether list_id is a static literal string or a handlebars expression.
          - `list_id` string, required — List identifier. Can be a static literal string or a handlebars expression added as {{list_id}}.
          - `create_list_if_missing` boolean — Whether to create the list if it doesn't exist.
          - `list_name` string — Name for the list when creating it. Pass when `create_list_if_missing` is true.
          - `user_selection` string[], required — Which users to add to the list. Can select actor, recipient, or both.
        - SubscriberListOperationRemoveUserNode — [**Remove User from List**](https://docs.suprsend.com/docs/remove-user-from-list): Removes users (actor or recipient) from the list. List must exist for the operation to succeed.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'subscriberlistoperation_removeuser', required
          - `description` string, nullable — Description of what this node does
          - `is_list_id_dynamic` boolean — Whether list_id is a static literal string or a handlebars expression.
          - `list_id` string, required — List identifier. Can be a static literal string or a handlebars expression (to compute the list id at runtime. Eg. {{list_id}}).
          - `user_selection` string[], required — Which users to remove from the list. Can select actor, recipient, or both.
        - ObjectOperationAddSubscriptionNode — [**Subscribe to Object**](https://docs.suprsend.com/docs/subscribe-to-object): Adds users (actor or recipient) as subscribers to an object. Can create the object if it doesn't exist.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'objectoperation_addsubscription', required
          - `description` string, nullable — Description of what this node does
          - `is_object_id_dynamic` boolean — Whether object_type and object_id are static literal strings or handlebars expressions.
          - `object_type` string, required — Type/collection name of the object.
          - `object_id` string, required — Unique identifier of the object within the object_type.
          - `create_object_if_missing` boolean — Whether to create the object if it doesn't exist.
          - `user_selection` string[], required — Which users to add as subscribers to the object. Can select actor, recipient, or both.
          - `subscription_properties` string — Additional subscription properties which defines the relationship between object and user. Eg. role, designation, etc. Pass as JSONNET expression.
        - ObjectOperationRemoveSubscriptionNode — [**Unsubscribe from Object**](https://docs.suprsend.com/docs/unsubscribe-from-object): Removes users (actor or recipient) as subscribers from an object. Object must exist for the operation to succeed.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'objectoperation_removesubscription', required
          - `description` string, nullable — Description of what this node does
          - `is_object_id_dynamic` boolean — Whether object_type and object_id are static literal strings or handlebars expressions.
          - `object_type` string, required — Type/collection name of the object.
          - `object_id` string, required — Unique identifier of the object within the object_type.
          - `user_selection` string[], required — Which users to remove as subscribers from the object. Can select actor, recipient, or both.
        - UserUpdateNode — [**Update User Profile**](https://docs.suprsend.com/docs/update-user-profile): Updates user profile properties for either the actor or recipient using JSONNET expression.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'userupdate', required
          - `description` string, nullable — Description of what this node does
          - `user_selection` 'actor' | 'recipient', required — Select which user to update - actor who triggered the workflow or the recipient of the workflow.
          - `properties` string, required — JSONNET script that evaluates at runtime to a map/dictionary of user properties to update.
        - InvokeWorkflowNode — [**Invoke Workflow**](https://docs.suprsend.com/docs/invoke-workflow): Triggers another workflow using data from the current workflow run. Generally used when you have to notify different recipients at different stages of the workflow.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'invokeworkflow', required
          - `description` string, nullable — Description of what this node does
          - `workflow` string, required — Slug of the workflow to invoke.
          - `actor_selection` string — Where to pick the actor from for the invoke-workflow payload. **recipient**: Use the recipient of the current workflow run. **actor**: Use the actor who triggered the current workflow run. **expression**: Use a JSONNET expression to derive the actor at runtime using data from the current workflow run.
          - `actor_expression` string — JSONNET expression to derive the actor at runtime for the invoked workflow. Pass when `actor_selection` is 'expression'. Eg. `data["$recipient"].id`
          - `recipient_selection` 'recipient' | 'actor' | 'expression', required — Where to pick the recipient from for the invoke-workflow payload. **recipient**: Use the recipient of the current workflow run. **actor**: Use the actor who triggered the current workflow run. **expression**: Use a JSONNET expression to derive the recipient at runtime using data from the current workflow run.
          - `recipient_expression` string — JSONNET expression to derive the recipient at runtime for the invoked workflow. Pass when `recipient_selection` is 'expression'. Eg. `data["$recipient"].manager_id`
          - `data` string — JSONNET expression to derive the data field for the invoke-workflow payload.
          - `append_current_run_data` boolean — Whether the current workflow-run data should be passed as payload of the invoked workflow.
        - SendEmailNode — [**Email**](https://docs.suprsend.com/docs/delivery-single-channel): Sends email notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_email', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for notification content.
        - SendSmsNode — [**SMS**](https://docs.suprsend.com/docs/delivery-single-channel)): Sends SMS text message notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_sms', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for SMS notification content.
        - SendWhatsappNode — [**WhatsApp**](https://docs.suprsend.com/docs/delivery-single-channel): Sends WhatsApp message notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_whatsapp', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for WhatsApp notification content.
        - SendMobilePushNode — [**Mobile Push**](https://docs.suprsend.com/docs/delivery-single-channel): Sends push notifications to mobile devices (Android and iOS) using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_mobile_push', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for mobile push notification content.
        - SendInboxNode — [**Inbox**](https://docs.suprsend.com/docs/delivery-single-channel): Sends in-app inbox notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_inbox', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for in-app inbox notification content.
        - SendWebpushNode — [**Web Push**](https://docs.suprsend.com/docs/delivery-single-channel): Sends web push notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_webpush', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for web push notification content.
        - SendSlackNode — [**Slack**](https://docs.suprsend.com/docs/delivery-single-channel): Sends Slack message notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_slack', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for Slack notification content.
        - SendMsTeamsNode — [**Microsoft Teams**](https://docs.suprsend.com/docs/delivery-single-channel): Sends Microsoft Teams chat notifications using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_ms_teams', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for Microsoft Teams notification content.
        - SendMultiChannelNode — [**Multi-Channel**](https://docs.suprsend.com/docs/delivery-multi-channel): Sends notifications across multiple channels simultaneously using a specified template.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_multi_channel', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for notification content across all channels.
          - `channels` string[] — Specific channels to use when sending multi-channel notification. If not provided, all channels will be used.
          - `channels_expr` string — jq-expression for preparing channel list dynamically at runtime.
        - SendSmartChannelRoutingNode — [**Smart Channel Routing**](https://docs.suprsend.com/docs/smart-delivery): Sends notification subsequently at each consecutive channel with a delay (computed using time-to-live) between each channel.
          - `name` string, required — Human-readable name of the node
          - `node_type` 'send_smart_channel_routing', required
          - `description` string, nullable — Description of what this node does
          - `template` string, required — Slug of the template used for smart channel routing notification content.
          - `channels` string[] — Available channels for smart routing algorithm to choose from.
          - `channels_expr` string — jq-expression for preparing available channel list dynamically at runtime.
          - `success` string — Success metric to track for smart channel routing.
          - `success_is_event` boolean — Whether the success metric is a custom event. If not, notification status will be used to determine success.
          - `ttl_value` string — Time-to-live value for the smart channel routing notification in static duration format.
          - `mandatory_channels` string[] — Channels that will be sent immediately regardless of smart routing logic.
          - `routing_basis` 'cost_low_to_high' — Basis for smart channel routing. Determines the order in which channels are tried. Right now only `cost_low_to_high` is supported. We'll be adding more routing rules like in the order of engagement in future.

## Response `201`

The response includes the same workflow object as input along with a validation_result field that indicates whether the workflow configuration is valid.

- object
  - `validation_result` object
    - `is_valid` boolean — Whether the workflow configuration is valid and can be committed
    - `errors` string[] — List of validation errors if the workflow is invalid and `is_valid` is false.

## Other responses

- `401` — Authentication failed
- `404` — Resource not found

---

[API](https://skmtc.net/suprsend/apis/suprsend-api.md) · [All operations](https://skmtc.net/suprsend/apis/suprsend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/suprsend/suprsend-api/versions/8bd2574bd2c3/schema)
