---
title: "Creates a new automation workflow rule."
method: POST
path: "/rules"
tags: ["Automation Workflow Rules"]
---

# Creates a new automation workflow rule.

`POST /rules`

Creates a new automation workflow rule. Ensure that you check the available triggers, conditions, and actions to use valid options.

Use the following endpoints to check which options are available before creating a rule:
- `/triggers` – lists available triggers
- `/conditions` – lists available conditions
- `/actions` – lists available actions

## Request body

- AutomationWorkflowRuleBody
  - `name` string, required
  - `triggers` string[]
  - `steps` AutomationWorkflowStep[]
    - `step_triggers` string[]
    - `actions` AutomationWorkflowStepActionBase[]
      - union
        - AutomationWorkflowStepActionAgent
          - `action_type` string, required
          - `data` StepActionAgentData, required
            - `agent_id` string, required
            - `run_name` string
          - `is_valid` boolean
        - AutomationWorkflowStepAddToCollectionAction
          - `action_type` string, required
          - `data` StepAddToCollectionActionData, required
            - `collection_id` string, required
          - `is_valid` boolean
    - `conditions` AndCondition[]
      - `and` LeafCondition[]
        - `condition_type` string, required
        - `expression` ExpressionCondition, required
          - `term` Term[]
            - union
              - …
          - `operator` string, required
        - `is_valid` boolean

## Response `200`

- CreateAutomationWorkflowRuleResponse
  - `id` string, required
  - `status` string, required
  - `name` string, required
  - `account_id` string, required
  - `created_by_id` string, required
  - `edited_by_id` string
  - `date_created` string, required
  - `date_modified` string, required

## Other responses

- `400`
- `401`

---

[API](https://skmtc.net/bynder/apis/oauth-2-0.md) · [All operations](https://skmtc.net/bynder/apis/oauth-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bynder/oauth-2-0/revisions/bb9efc864ce1/schema)
