---
title: "Patch a workflow"
method: PATCH
path: "/workflows/{workflowId}"
tags: ["Workflows"]
---

# Patch a workflow

`PATCH /workflows/{workflowId}`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/workflows/{workflowId}`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `flow`, `flow:workflows`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/workflows/:workflowId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a workflow.

## Path parameters

- `workflowId` string, required

## Request body

- PatchWorkflowRequest
  - `name` string: A name to describe the workflow
  - `active` boolean: Indicates whether the workflow is currently active
  - `conditions` WorkflowCondition[]: One or more workflow conditions
    - union: The workflow condition
      - object: Condition that enables a source
        - `type` string, required: The type of the workflow condition
        - `events` SourceEventsHashmap, required
      - object: The condition that filters, based on the NAS entity. It does not apply to MBC accounts.
        - `type` string, required: The type of the workflow condition
        - `entities` string[], required: ent_axclravnqf5u5ejkweijnp5zc4
      - object: Condition that filters based on the NAS processing channel. It's not applicable for MBC accounts
        - `type` string, required: The type of the workflow condition
        - `processing_channels` string[], required: pc_axclravnqf5u5ejkweijnp5zc4
  - `actions` PatchWorkflowAction[]: One or more workflow actions
    - `workflow_action_id` string: The workflow action identifier needed to update an existing action ID. Do not include this property if you want to add a new action.
    - `type` string, required: The type of workflow action
    - `url` string, uri, required: Your webhook endpoint URL
    - `headers` object: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
    - `signature` object: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. On receipt of a webhook, you can compute this value to validate its authenticity.
      - `method` string: The signing method, defaults to `HMACSHA256`
      - `key` string, required: The key used the sign the webhook

## Response `200`

Workflow updated successfully

- PatchWorkflowResponse
  - `id` string: The workflow identifier
  - `name` string: A name you can use to describe your workflow
  - `active` boolean: Indicates whether the workflow is currently active
  - `conditions` PatchWorkflowCondition[]: One or more workflow conditions
    - union: The workflow condition
      - object: The condition that enables a source
        - `id` string, required: The workflow condition identifier
        - `type` string, required: The type of the workflow condition
        - `events` SourceEventsHashmap, required
      - object: The condition that filters, based on the NAS entity. It does not apply to MBC accounts.
        - `id` string, required: The workflow condition identifier
        - `type` string, required: The type of the workflow condition
        - `entities` string[], required: ent_axclravnqf5u5ejkweijnp5zc4
      - object: The condition that filters, based on the NAS processing channel. It does not apply to MBC accounts.
        - `id` string, required: The workflow condition identifier
        - `type` string, required: The type of the workflow condition
        - `processing_channels` string[], required: pc_axclravnqf5u5ejkweijnp5zc4
  - `actions` PatchResponseWorkflowAction[]: One or more workflow actions
    - `id` string, required: The workflow action identifier
    - `type` string, required: The type of workflow action
    - `url` string, uri, required: Your webhook endpoint URL
    - `headers` object: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
    - `signature` object: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header. On receipt of a webhook, you can compute this value to validate its authenticity.
      - `method` string: The signing method, defaults to `HMACSHA256`
      - `key` string, required: The key used the sign the webhook
  - `_links` WorkflowLinks: Links related to the workflow
    - `self` Link, required
      - `href` string, required: The link URL

## Other responses

- `401`: Unauthorized
- `404`: Workflow not found
- `422`: Invalid data was sent
- `500`: Internal Error

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
