# Validate Workflow Step Configuration

Send what you would send to Update Workflow Step Configuration and see what it would do: valid is false with every error in issues, or true with the configuration it would leave and the required values still missing. Nothing changes.

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

Permissions: `workflow:view`.

## 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

- `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 check.
  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 check.
  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): A connection to check, or null.
  { "mode": "connection", "connectionId": "...", "rules": [...] }, { "mode": "environment" }, { "mode": "installation" } (integration workflows), or null for none. Replaced whole.

## Example request

```bash
curl --request POST \
  --url 'https://connect.mindcloud.co/v2/workflows/Wq3kZ8pLx2Nb/steps/SyDtUxIQeocK/configuration/validate' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "arguments": {
    "total": 5
  },
  "options": {
    "retries": {
      "enabled": true
    }
  },
  "connection": {
    "mode": "environment"
  }
}'
```

## Response fields

- `valid` (boolean): True when Update would accept the change.
- `configuration` (object): The configuration the change would leave, before it is saved.
  - `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.
- `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 revision of the draft that was checked.
