> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withverifa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withverifa.com/_mcp/server.

# Update a workflow

PATCH https://api.withverifa.com/api/v1/workflows/{workflow_id}
Content-Type: application/json

Updates a workflow's configuration. Creates a new version.


Reference: https://docs.withverifa.com/api-reference/workflows/update-workflow

## Authentication

- `X-API-Key` header (required) — Organization API key. Keys are prefixed with `vk_live_` (production) or `vk_sandbox_` (sandbox).

## Request

### Path parameters

- `workflow_id` (string, required) — Workflow ID (`wfl_*`).

### Headers

- `Verifa-Version` (date, optional) — API version date string (e.g. `2026-02-01`). If omitted, the version pinned to your API key is used.
- `Key-Inflection` (enum, optional, default: snake) — Response key casing. Defaults to `snake`.
  - Allowed values: `camel`, `kebab`, `snake`

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional)
- `description` (string, optional, nullable)
- `steps` (list of map from string to any, optional)
- `data_requirements` (map from string to any, optional, nullable)
- `screening_settings` (map from string to any, optional, nullable)
- `graph_layout` (map from string to any, optional, nullable)
- `rollout_percentage` (integer, optional, nullable)
- `purpose` (enum, optional) — Declares what the workflow is used for. Downstream checks like consortium matching use this to score cross-org matches contextually.
  - Allowed values: `general_kyc`, `enrollment_precheck`, `financial_aid_precheck`, `disbursement_reverification`, `employee_onboarding`, `age_verification`, `online_proctoring`, `account_recovery`
- `compliance_level` (enum, optional) — Compliance standard to enforce. When set to "ial2", workflow validation enforces NIST SP 800-63-3 IAL2 requirements.
  - Allowed values: `ial2`

## Response

### 200

Updated workflow.

- `id` (string, required)
- `name` (string, required)
- `version` (integer, required)
- `steps` (list of WorkflowStep, required) — Ordered list of workflow steps.
- `is_default` (boolean, required)
- `is_active` (boolean, required)
- `created_at` (datetime, required)
- `description` (string, optional, nullable)
- `step_count` (integer, optional) — Number of steps in the workflow.
- `updated_at` (datetime, optional)
- `data_requirements` (map from string to any, optional, nullable) — Data requirements configuration for this workflow. Keys: selfie (bool), document (\{enabled, accepted\_types} — set enabled to false for document-free selfie-only workflows; requires selfie true), user\_info (\{enabled, fields, required\_fields, verify\_phone, verify\_email}), proof\_of\_address (\{enabled, accepted\_types} — accepted\_types holds PoaDocumentType keys; leave it empty to accept everything the organization's proof-of-address policy allows).
- `format` (enum, optional, default: steps) — Workflow format — "steps" for legacy array format, "graph" for DAG format.
  - Allowed values: `steps`, `graph`
- `graph` (map from string to any, optional, nullable) — DAG graph representation of the workflow. Present when format is "graph". Contains "nodes" (dict of node objects) and "entry" (start node ID).
- `purpose` (enum, optional) — What the workflow is used for. Used by consortium matching to apply purpose-aware scoring — e.g., financial aid matches are scored higher than enrollment matches.
  - Allowed values: `general_kyc`, `enrollment_precheck`, `financial_aid_precheck`, `disbursement_reverification`, `employee_onboarding`, `age_verification`, `online_proctoring`, `account_recovery`
- `compliance_level` (enum, optional) — Compliance standard enforced on this workflow. "ial2" enforces NIST SP 800-63-3 identity proofing requirements.
  - Allowed values: `ial2`

## Errors

### 401 Unauthorized Error

Missing or invalid API key.

- `error` (string, required) — Short error code.
- `status_code` (integer, required) — HTTP status code.
- `detail` (string, optional) — Human-readable error description.

### 404 Not Found Error

Resource not found.

- `error` (string, required) — Short error code.
- `status_code` (integer, required) — HTTP status code.
- `detail` (string, optional) — Human-readable error description.

### 422 Unprocessable Entity Error

Request validation failed.

- `error` (string, required) — Short error code.
- `status_code` (integer, required) — HTTP status code.
- `detail` (string, optional) — Human-readable error description.

## Types

### WorkflowStep

- `policy` (string, required) — Policy identifier for this step.
- `label` (string, required) — Human-readable step label.
- `config` (map from string to any, optional) — Step-specific configuration parameters.
- `on_fail` (string, optional) — Action when this step fails. One of `review`, `reject`, `continue`, or `goto:<policy>` to jump to another step (forward only).
- `on_pass` (string, optional, nullable) — Action when this step passes. Either `continue` (default — advance to next step) or `goto:<policy>` to skip ahead. Null means continue.
- `on_error` (string, optional, deprecated) — Deprecated. Errors are automatically retried and routed to review. This field is accepted for backward compatibility but ignored.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "wfl_abc123",
  "name": "Standard KYC",
  "version": 3,
  "steps": [
    {
      "policy": "document_ocr",
      "label": "Document OCR",
      "config": {},
      "on_fail": "review",
      "on_pass": null,
      "on_error": "review"
    }
  ],
  "is_default": true,
  "is_active": true,
  "created_at": "2024-01-15T09:30:00Z",
  "description": "string",
  "step_count": 4,
  "updated_at": "2024-01-15T09:30:00Z",
  "data_requirements": {},
  "format": "steps",
  "graph": {},
  "purpose": "general_kyc",
  "compliance_level": "ial2"
}
```

**SDK Code**

```python
import requests

url = "https://api.withverifa.com/api/v1/workflows/workflow_id"

payload = {}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.withverifa.com/api/v1/workflows/workflow_id';
const options = {
  method: 'PATCH',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withverifa.com/api/v1/workflows/workflow_id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.withverifa.com/api/v1/workflows/workflow_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.withverifa.com/api/v1/workflows/workflow_id")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.withverifa.com/api/v1/workflows/workflow_id', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.withverifa.com/api/v1/workflows/workflow_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withverifa.com/api/v1/workflows/workflow_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```