---
title: "Create automation"
method: POST
path: "/user/automate/flows"
tags: ["Automations"]
---

# Create automation

`POST /user/automate/flows`

## Request

- Base URL: `https://app.famulor.de/api`
- URL: `https://app.famulor.de/api/user/automate/flows`
- Auth: HTTP bearer

Create a Famulor automation from a definition, activate it, and prove it with a real test run.

[Docs](https://docs.famulor.io/api-v1/automations/create)

## Request body

- object
  - `name` string, required: A short human name for the automation (max 255 characters)
  - `flow` object, required: The automation definition — `{"trigger": {...}, "steps": [...]}` as described above. Max 1 MB.
  - `sample` object: A realistically-shaped sample payload for the test run (what the trigger will receive). For assistant events, a canonical sample built from the assistant’s own variables is used when omitted. Max 256 KB.
  - `assistant_id` integer: Required for assistant-event automations (`phoneCallEnded`, `inboundCall`, `newConversation`, and `bind_webhook`): the assistant this automation attaches to. It starts receiving that assistant’s real events after the test passes. (For the platform triggers, selecting the assistant inside the trigger’s `settings.input.assistant` also works — the explicit parameter wins.)
  - `bind_webhook` string: For a webhook-triggered definition only: attach it to the assistant’s conversation-ended event. The only supported value is `conversation_ended`. Requires `assistant_id`.
  - `confirm_side_effects` boolean: Required (`true`) when the definition contains steps that send messages or emails, start calls, or make non-GET HTTP requests — the test run executes them for real.

## Response `201`

Created

- object
  - `automation_id` string: The ID of the created automation
  - `webhook_url` string, nullable: For webhook-triggered automations (including conversation-ended ones): the URL external systems call to fire it. `null` for assistant-event and schedule automations.
  - `status` string: `active` — the test run passed; the automation is live (and attached, for assistant events). `active_untested` — the trigger cannot be fired on demand (schedules, external integrations); the automation is live and armed, and the first real event is the proof. `test_failed` — the test run failed; the automation was left disabled. Read `test.steps` for the per-step classification.
  - `test` object: The test run result
    - `run_status` string: `SUCCEEDED`, `PAUSED`, `FAILED`, or `not_tested` (untestable triggers); rarely `no_run` when the test produced no execution record. `PAUSED` counts as success: the run is parked at a Delay step waiting for its target time — every step before the delay already ran.
    - `steps` object[]: Per-step outcome of the test run
      - `name` string: The step name (`trigger`, `step_1`, …)
      - `status` string: `SUCCEEDED`, `FAILED` or `PAUSED`
      - `classification` string: `ok`, `paused_at_delay`, or — for failures — `wiring_error` (the definition is wrong: fix it and repair via [Update automation](/en/api-reference/automations/update)), `missing_connection` (an account must be connected in the Famulor app first), `missing_record` (the sample referenced data that does not exist — often fine).
      - `error` string, nullable: The step’s error message, when it failed
  - `response` union: For synchronously-tested automations (webhook and inbound triggers): what the automation responded during the test run
    - object
    - string
  - `binding` object, nullable: For assistant-event automations: `{"type": "post_call" | "inbound" | "conversation" | "conversation_ended", "assistant_id": <id>, "bound": <bool>}`. `bound` is `true` only after a green test.

## Other responses

- `401`: Fehlender oder ungültiger API-Key.
- `422`: Validation Error

---

[API](https://skmtc.dev/famulor/apis/famulor-api.md) · [All operations](https://skmtc.dev/famulor/apis/famulor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/famulor/apis/famulor-api/revisions/3b938c370721?raw)
