# Update Workflow Step Configuration

Change how a step in the workflow's draft is set up. Only what you send changes: objects merge key by key, an array replaces, and null removes. Values are checked against the action's schema at the step's app version, and references must name a trigger or an earlier step. Send the revision you last read in If-Match; the response's meta.revision is the new one.

`PUT https://connect.mindcloud.co/v2/workflows/:workflowId/steps/:stepId/configuration`

Permissions: `workflow:edit`.

## Parameters

### Path

- `workflowId` (string, required): The workflow's id.
- `stepId` (string, required): The step's id, from List Workflow Steps or Get Workflow Definition.

### Headers

- `If-Match` (string, required): Required. The revision you last read: the `revision` from its read (Get Workflow Definition for a workflow, Get Analytics Page Definition for an Analytics page, Get Analytics Data Source Table for a fixed source's table), or `meta.revision` from your last change to it. The `ETag` header of either answer is the same value, ready to send back. The change applies only if nobody changed it since: otherwise it answers 412 with the current revision in `error.details.revision`. Send it as a strong entity tag (`"r_..."`): a weak one (`W/"..."`) never matches and answers 412. Without it the request answers 428.
- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Body

- `arguments` (object): Arguments to set, nested as the action's schema nests them.
  Arguments to set, nested as the schema nests them. Objects merge key by key; an array replaces; null removes. null for the whole object clears every argument.
- `options` (object): Options to set.
  Options to set: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. Sending one turns it on; null turns it off, as deleting it in the editor does. Objects merge key by key.
- `connection` (object): The connection to run with, or null for none.
  { "mode": "connection", "connectionId": "...", "rules": [...] }, { "mode": "environment" }, { "mode": "installation" } (integration workflows), or null for none. Replaced whole.

## Example request

```bash
curl --request PUT \
  --url 'https://connect.mindcloud.co/v2/workflows/Wq3kZ8pLx2Nb/steps/SyDtUxIQeocK/configuration' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "arguments": {
    "contact": {
      "FirstName": "{{ steps.khQc0sD8kKNn.output[0].firstname }}"
    }
  },
  "options": {
    "pagination": {
      "mode": "all"
    }
  },
  "connection": {
    "mode": "connection",
    "connectionId": "Cn4xPq7LmZ2a"
  }
}'
```

## Response fields

- `arguments` (object): The action's arguments, nested as the action's schema nests them. A string may hold {{ ... }} references to earlier steps' output.
- `options` (object): Step options: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. An option present is on; one left out is off.
- `connection` (object): The connection the step runs with. Null when none is set or the app takes none.
  - `mode` (string): connection: a chosen connection; environment: the workflow's connection for the run's environment; installation: each installation's own (integration workflows).
    Allowed values:
      - `connection`
      - `environment`
      - `installation`
  - `connectionId` (string): The connection's id, from List Connections. Null with rules and no default.
  - `rules` (object): Conditions that pick another connection, first match wins: a list of { when: { field, operator, value }, connectionId }, or { $legacy } when kept as stored.
- `isConfigured` (boolean): Whether the editor considers the step set up (nothing required is missing). A draft may be saved incomplete.
- `issues` (array of objects): Warnings about the stored configuration: required values missing, values kept as stored, connections that are gone.
  - `severity` (string): error refuses a write; warning does not.
    Allowed values:
      - `error`
      - `warning`
  - `code` (string): What is wrong, UPPER_SNAKE (REQUIRED_MISSING, LEGACY_VALUE_PRESERVED, INVALID_REFERENCE, ...).
  - `path` (string): Where, as a JSON Pointer into the configuration (/arguments/contact/FirstName).
  - `message` (string): What is wrong, for a person.
- `revision` (string): The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value.
