---
title: "Update a workflow"
method: PUT
path: "/workflows/{id}"
tags: ["Workflows"]
---

# Update a workflow

`PUT /workflows/{id}`

## Path parameters

- `id` number, required

## Request body

- object
  - `name` string, required
  - `filter` object — When you provide `ids`, all other filter options are ignored.
    - `ids` number[]
  - `individual_record_filter` object
    - `condition` 'AND' | 'OR', required
    - `rules` object[], required
      - `id` string, required
      - `query_builder_id` string
      - `customfield_id` string, required
      - `label` string
      - `type` 'integer' | 'double' | 'boolean' | 'tri_state_boolean' | 'string' | 'long_string' | 'select' | 'date' | 'datetime' | 'file'
      - `input` string
      - `operator` 'equal' | 'not_equal' | 'in' | 'not_in' | 'less' | 'less_or_equal' | 'greater' | 'greater_or_equal' | 'between' | 'not_between' | 'begins_with' | 'not_begins_with' | 'contains' | 'not_contains' | 'ends_with' | 'not_ends_with' | 'is_empty' | 'is_not_empty' | 'is_null' | 'is_not_null' | 'true' | 'false' | 'past_less' | 'past_exactly' | 'past_more_than' | 'future_less' | 'future_exactly' | 'future_more_than' | 'after' | 'on' | 'before' | 'is' | 'is_not', required
      - `value` string[]
      - `entity` 'account' | 'person' | 'opportunity' | 'campaign' | 'tag' | 'task' | 'workflow' | 'workflow_record' | 'workflow_step_record' | 'lead'
      - `display_entity` 'Account' | 'Contact' | 'Opportunity' | 'Campaign' | 'Tag' | 'Task' | 'Workflow' | 'Lead'
      - `pipeline` number
      - `enabled` string, required
      - `internal` boolean
    - `order_by` string — Sort instructions. Provide either 'key' (ascending) or 'key desc' (descending). Default sort order is ascending. You can fetch available sort keys via a discover mode call.
    - `not` boolean
    - `valid` boolean
    - `search` string
  - `status` 'live' | 'paused' | 'scheduled' | 'draft'
  - `status_message` string
  - `record_type` 'contact'
  - `goal` 'opened' | 'clicked' | 'replied'
  - `continuous` boolean
  - `exit_after_days` number
  - `schedule_date` string, date-time
  - `schedule_time_start` string
  - `schedule_time_end` string
  - `schedule_days` number[]
  - `steps` object[]
    - `id` number
    - `name` string
    - `order` number, required
    - `filter` object
      - `condition` 'AND' | 'OR', required
      - `rules` object[], required
        - `id` string, required
        - `query_builder_id` string
        - `customfield_id` string, required
        - `label` string
        - `type` 'integer' | 'double' | 'boolean' | 'tri_state_boolean' | 'string' | 'long_string' | 'select' | 'date' | 'datetime' | 'file'
        - `input` string
        - `operator` 'equal' | 'not_equal' | 'in' | 'not_in' | 'less' | 'less_or_equal' | 'greater' | 'greater_or_equal' | 'between' | 'not_between' | 'begins_with' | 'not_begins_with' | 'contains' | 'not_contains' | 'ends_with' | 'not_ends_with' | 'is_empty' | 'is_not_empty' | 'is_null' | 'is_not_null' | 'true' | 'false' | 'past_less' | 'past_exactly' | 'past_more_than' | 'future_less' | 'future_exactly' | 'future_more_than' | 'after' | 'on' | 'before' | 'is' | 'is_not', required
        - `value` string[]
        - `entity` 'account' | 'person' | 'opportunity' | 'campaign' | 'tag' | 'task' | 'workflow' | 'workflow_record' | 'workflow_step_record' | 'lead'
        - `display_entity` 'Account' | 'Contact' | 'Opportunity' | 'Campaign' | 'Tag' | 'Task' | 'Workflow' | 'Lead'
        - `pipeline` number
        - `enabled` string, required
        - `internal` boolean
      - `order_by` string — Sort instructions. Provide either 'key' (ascending) or 'key desc' (descending). Default sort order is ascending. You can fetch available sort keys via a discover mode call.
      - `not` boolean
      - `valid` boolean
      - `search` string
    - `trigger_step` number
    - `trigger_step_index` number
    - `trigger_after_days` number
    - `trigger` 'sent' | 'opened' | 'clicked' | 'replied' | 'not_opened' | 'not_replied' | 'not_clicked'
    - `action_type` 'send_email'
    - `action_config` object
    - `action_status` string
    - `action_source` number
    - `action_source_email` string
    - `analytics` object
      - `total` object
        - `name` string
        - `value` number
        - `type` 'absolute' | 'percentage'
      - `sent` object
        - `name` string
        - `value` number
        - `type` 'absolute' | 'percentage'
      - `interacted` object
        - `name` string
        - `value` number
        - `type` 'absolute' | 'percentage'
      - `replied` object
        - `name` string
        - `value` number
        - `type` 'absolute' | 'percentage'
      - `failed` object
        - `name` string
        - `value` number
        - `type` 'absolute' | 'percentage'
    - `metrics_data` object

## Response `200`

Successful

---

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