---
title: "Add a workflow condition"
method: POST
path: "/workflows/{workflowId}/conditions"
tags: ["Workflows"]
---

# Add a workflow condition

`POST /workflows/{workflowId}/conditions`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/workflows/{workflowId}/conditions`
- 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/conditions/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a workflow condition. Conditions determine when the workflow will trigger.

## Path parameters

- `workflowId` string, required

## Request body

- AddUpdateWorkflowConditionRequest: The workflow condition
  - `type` string, required

## Response `201`

Workflow condition added successfully

- AddWorkflowConditionResponse
  - `id` string: The workflow condition identifier
  - `_links` WorkflowConditionLinks: Links related to the workflow condition
    - `self` Link
      - `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)
