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

# Creates a new automation workflow rule.

`POST /rules`

## Request

- Base URL: `https://{your-bynder-domain}/api/1/automation-workflow`
- URL: `https://{your-bynder-domain}/api/1/automation-workflow/rules`
- Auth: one of:
  - none
  - HTTP bearer

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.dev/bynder/apis/automation-workflow-api.md) - [All operations](https://skmtc.dev/bynder/apis/automation-workflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bynder/apis/automation-workflow-api/revisions/319a1f8547d0?raw)
