---
title: "Update the default workflow configuration"
method: PUT
path: "/merchant/workflows/{workflowCode}/versions/default"
tags: ["Workflows"]
---

# Update the default workflow configuration

`PUT /merchant/workflows/{workflowCode}/versions/default`

Update the default workflow configuration version.

## Path parameters

- `workflowCode` string, required — Machine-friendly code of Workflow.

## Headers

- `x-idempotency-key` string, uuid, required

## Request body

- object
  - `version` integer — Version of a Workflow Configuration.
  - `workspaceId` string, uuid — The workspace id corresponding to the default workflow configuration.
  - `versions` object[] — Rollout configuration for traffic splitting across multiple versions. If provided, weights must sum to 100 and each entry must be between 1 and 100.
    - `version` integer, required — The workflow config version.
    - `weight` integer, required — The weight of traffic to route to this version (1–100). All entries must sum to 100.

## Response `202`

New default version set.

- object
  - `workflowCode` string, required — The workflow code this default version applies to.
  - `version` integer, required — The config version which will be used for newly created executions.
  - `createdAt` string, date-time, required — When a version was first set as the default for this workflow.
  - `updatedAt` string, date-time, required — When this version was set as the default version.
  - `workspaceId` string, uuid — Workspace ID that the workflow configuration belongs to.
  - `updatedBy` string, nullable — User email who set this workflow version as default.
  - `versions` object[] — Current rollout configuration for traffic splitting between versions.
    - `version` integer, required — The workflow config version.
    - `weight` integer, required — The weight of traffic to route to this version (1–100). All entries must sum to 100.

## Other responses

- `401` — Unauthorized.
- `403` — Insufficient Scope.
- `404` — Not Found.
- `429` — Too Many Requests.

---

[API](https://skmtc.net/payrails/apis/payrails-api-reference.md) · [All operations](https://skmtc.net/payrails/apis/payrails-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/payrails/payrails-api-reference/revisions/9dd2f0158582/schema)
