{ "message": "This automation contains steps that would REALLY send messages, emails or start calls during the test run: Send SMS. Confirm with the user first — point those steps at a safe recipient the user owns — then retry with confirm_side_effects set to true.", "error": "side_effects_require_confirmation"}
Automations
Create automation
Create an automation from a definition, activate it and prove it with a real test run
{ "message": "This automation contains steps that would REALLY send messages, emails or start calls during the test run: Send SMS. Confirm with the user first — point those steps at a safe recipient the user owns — then retry with confirm_side_effects set to true.", "error": "side_effects_require_confirmation"}
This endpoint creates an automation from its definition (a trigger and its chained steps), activates it, executes a real test run with your sample payload, and reports the result step by step. The test run is the gate: an automation whose test fails is left disabled, and an assistant-event automation is only attached to the assistant after its test passes.When a ready-made template matches what you need, applying it is simpler than writing a definition from scratch.
The test run executes the automation for real. Definitions containing steps that send messages or emails, or start calls, are refused unless you explicitly pass confirm_side_effects: true — and when you do, those steps really send during the test. Point them at recipients you own.
The steps are chained onto the trigger in the order given. The only nesting you write yourself is inside a step that needs it — a BRANCH step’s conditional steps go under its onSuccessAction / onFailureAction. (A hand-nested tree, where each step sits under the previous one’s nextAction, is also accepted.)A definition always replaces the whole automation — it is never merged. A trigger with no steps is rejected (no_steps): an automation that does nothing cannot be activated.Supported triggers (trigger.settings):
Trigger
pieceName / triggerName
Behavior
Webhook
@activepieces/piece-webhook / catch_webhook
You get a webhook_url to call from external systems. The payload arrives wrapped: reference fields as {{trigger['body']['field']}}. Tested synchronously with your sample.
Phone call ended
@integration-tools/piece-voice / phoneCallEnded
Requires assistant_id. Attached to the assistant after a green test. Payload fields live directly on the trigger: {{trigger['extracted_variables']['x']}}, {{trigger['customer_phone']}}, …
Inbound call
@integration-tools/piece-voice / inboundCall
Requires assistant_id. Runs before the assistant answers; must end in a respond step returning a flat map of strings.
Cannot be fired on demand — activates armed as active_untested; the first scheduled run is the proof (check runs).
External integrations
the integration’s own trigger (new spreadsheet row, new CRM contact, new lead, …)
Your connected account is attached automatically; if it is missing or expired you get a needs_connection / needs_reconnection error with the exact steps to fix it in the app. Activates as active_untested.
Steps reference earlier output by step name — {{step_1['body']['field']}} for HTTP steps (their JSON nests under body). Common step shapes: HTTP requests, code transforms, branches, delays, respond steps, and platform actions (send SMS/WhatsApp, start a call, re-queue a lead). The easiest way to learn a step’s exact shape is to read an existing automation with Get automation or apply a template and inspect what it built.
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.
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.)
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.
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.
Returns 201 when the automation is active (active / active_untested), 200 when it was built but its test run failed (test_failed), and 422 for a definition that never reached the test run (see error codes below).
For webhook-triggered automations (including conversation-ended ones): the URL external systems call to fire it. null for assistant-event and schedule automations.
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.
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.
ok, paused_at_delay, or — for failures — wiring_error (the definition is wrong: fix it and repair via Update automation), missing_connection (an account must be connected in the app first), missing_record (the sample referenced data that does not exist — often fine).
For assistant-event automations: {"type": "post_call" | "inbound" | "conversation" | "conversation_ended", "assistant_id": <id>, "bound": <bool>}. bound is true only after a green test.
Hard failures return {"message": "...", "error": "<code>"} and nothing is activated. Notable codes:
error
Meaning
side_effects_require_confirmation
The definition contains steps that would really send during the test — retry with confirm_side_effects: true after checking the recipients.
no_steps
The trigger has no steps chained to it.
invalid_definition / unsupported_trigger
The definition is missing its trigger, or uses a trigger type that is not supported.
assistant_required / assistant_not_found
The trigger needs an assistant_id, or the assistant does not belong to your account.
binding_conflict
The assistant already has an automation (or a custom webhook) for this event — an assistant has one slot per event type. Update the existing automation instead, or delete it first.
needs_connection / needs_reconnection
The trigger’s integration account must be connected (or reconnected) in the app first — the message contains the exact steps.
import_failed / publish_failed / create_failed
The definition was rejected or could not be activated.
{ "message": "This automation contains steps that would REALLY send messages, emails or start calls during the test run: Send SMS. Confirm with the user first — point those steps at a safe recipient the user owns — then retry with confirm_side_effects set to true.", "error": "side_effects_require_confirmation"}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Lacyai Support Docs","colors":{"primary":"#007BFF","light":null,"dark":null},"favicon":"https://mintcdn.com/lacyai/XShP4J2TcCKez9X5/favicon.png?fit=max\u0026auto=format\u0026n=XShP4J2TcCKez9X5\u0026q=85\u0026s=d87609b109d83d36abf64ad76fbaeb0c","logo":"https://mintcdn.com/lacyai/XShP4J2TcCKez9X5/logo.png?fit=max\u0026auto=format\u0026n=XShP4J2TcCKez9X5\u0026q=85\u0026s=09c7e2269ffc3d1d20220997a5184179","styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lacyai","hasAudioNarration":false,"actualSubdomain":"lacyai","customDomains":["docs.lacy.ai"],"gitSource":{"type":"github","owner":"lacyai","repo":"support-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"edits":false},"entitlements":{},"buildId":"6af4d90859c5b8c30a48eb5d","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":66},{"language":"default","tag":"AI Assistants Overview","count":21},{"language":"default","tag":"Assistants","count":16},{"language":"default","tag":"Automation \u0026 Integrations","count":16},{"language":"default","tag":"Troubleshooting \u0026 FAQs","count":14},{"language":"default","tag":"Platform Guide","count":12},{"language":"default","tag":"Knowledge Bases","count":10},{"language":"default","tag":"Phone Numbers","count":9},{"language":"default","tag":"Number Provisioning","count":9},{"language":"default","tag":"Platform Basics","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/automations/create-automation","slug":"/api-reference/automations/create-automation","pageMetadata":{"title":"Create automation","api":"POST /user/automate/flows","description":"Create an automation from a definition, activate it and prove it with a real test run","href":"/api-reference/automations/create-automation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an automation from a definition, activate it and prove it with a real test run\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This endpoint creates an automation from its definition (a trigger and its chained steps), activates it, executes a `,_jsx(_components.strong,{children:`real test run`}),` with your sample payload, and reports the result step by step. The test run is the gate: an automation whose test fails is left disabled, and an assistant-event automation is only attached to the assistant after its test passes.`]}),`\n`,_jsxs(_components.p,{children:[`When a ready-made `,_jsx(_components.a,{href:`/api-reference/automations/list-automation-templates`,children:`template`}),` matches what you need, `,_jsx(_components.a,{href:`/api-reference/automations/apply-automation-template`,children:`applying it`}),` is simpler than writing a definition from scratch.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The test run `,_jsx(_components.strong,{children:`executes the automation for real`}),`. Definitions containing steps that send messages or emails, or start calls, are refused unless you explicitly pass `,_jsx(_components.code,{children:`confirm_side_effects: true`}),` — and when you do, those steps really send during the test. Point them at recipients you own.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`the-definition-format`,children:`The definition format`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`flow`}),` object is the automation’s definition. The preferred shape is a flat list:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"steps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [ `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`step`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`step`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The steps are chained onto the trigger in the order given. The only nesting you write yourself is inside a step that needs it — a `,_jsx(_components.code,{children:`BRANCH`}),` step’s conditional steps go under its `,_jsx(_components.code,{children:`onSuccessAction`}),` / `,_jsx(_components.code,{children:`onFailureAction`}),`. (A hand-nested tree, where each step sits under the previous one’s `,_jsx(_components.code,{children:`nextAction`}),`, is also accepted.)`]}),`\n`,_jsxs(_components.p,{children:[`A definition `,_jsx(_components.strong,{children:`always replaces the whole automation`}),` — it is never merged. A trigger with no steps is rejected (`,_jsx(_components.code,{children:`no_steps`}),`): an automation that does nothing cannot be activated.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Supported triggers`}),` (`,_jsx(_components.code,{children:`trigger.settings`}),`):`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Trigger`}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`pieceName`}),` / `,_jsx(_components.code,{children:`triggerName`})]}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Webhook`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@activepieces/piece-webhook`}),` / `,_jsx(_components.code,{children:`catch_webhook`})]}),_jsxs(_components.td,{children:[`You get a `,_jsx(_components.code,{children:`webhook_url`}),` to call from external systems. The payload arrives wrapped: reference fields as `,_jsx(_components.code,{children:`{{trigger['body']['field']}}`}),`. Tested synchronously with your `,_jsx(_components.code,{children:`sample`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Phone call ended`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@integration-tools/piece-voice`}),` / `,_jsx(_components.code,{children:`phoneCallEnded`})]}),_jsxs(_components.td,{children:[`Requires `,_jsx(_components.code,{children:`assistant_id`}),`. Attached to the assistant after a green test. Payload fields live directly on the trigger: `,_jsx(_components.code,{children:`{{trigger['extracted_variables']['x']}}`}),`, `,_jsx(_components.code,{children:`{{trigger['customer_phone']}}`}),`, …`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Inbound call`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@integration-tools/piece-voice`}),` / `,_jsx(_components.code,{children:`inboundCall`})]}),_jsxs(_components.td,{children:[`Requires `,_jsx(_components.code,{children:`assistant_id`}),`. Runs before the assistant answers; must end in a respond step returning a flat map of strings.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`New conversation`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@integration-tools/piece-voice`}),` / `,_jsx(_components.code,{children:`newConversation`})]}),_jsxs(_components.td,{children:[`Requires `,_jsx(_components.code,{children:`assistant_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Conversation ended`}),_jsxs(_components.td,{children:[`webhook trigger + `,_jsx(_components.code,{children:`bind_webhook: \"conversation_ended\"`})]}),_jsxs(_components.td,{children:[`Requires `,_jsx(_components.code,{children:`assistant_id`}),`. Fires when a chat ends; payload arrives wrapped, so reference fields through `,_jsx(_components.code,{children:`{{trigger['body']['...']}}`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Schedule`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@activepieces/piece-schedule`}),` / `,_jsx(_components.code,{children:`every_x_minutes`}),`, `,_jsx(_components.code,{children:`every_day`}),`, …`]}),_jsxs(_components.td,{children:[`Cannot be fired on demand — activates armed as `,_jsx(_components.code,{children:`active_untested`}),`; the first scheduled run is the proof (check `,_jsx(_components.a,{href:`/api-reference/automations/list-automation-runs`,children:`runs`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`External integrations`}),_jsx(_components.td,{children:`the integration’s own trigger (new spreadsheet row, new CRM contact, new lead, …)`}),_jsxs(_components.td,{children:[`Your connected account is attached automatically; if it is missing or expired you get a `,_jsx(_components.code,{children:`needs_connection`}),` / `,_jsx(_components.code,{children:`needs_reconnection`}),` error with the exact steps to fix it in the app. Activates as `,_jsx(_components.code,{children:`active_untested`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Steps reference earlier output by step name — `,_jsx(_components.code,{children:`{{step_1['body']['field']}}`}),` for HTTP steps (their JSON nests under `,_jsx(_components.code,{children:`body`}),`). Common step shapes: HTTP requests, code transforms, branches, delays, respond steps, and platform actions (send SMS/WhatsApp, start a call, re-queue a lead). The easiest way to learn a step’s exact shape is to read an existing automation with `,_jsx(_components.a,{href:`/api-reference/automations/get-automation`,children:`Get automation`}),` or apply a template and inspect what it built.`]}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`A short human name for the automation (max 255 characters)`})}),`\n`,_jsx(ParamField,{body:`flow`,type:`object`,required:true,id:`param-flow`,children:_jsxs(_components.p,{children:[`The automation definition — `,_jsx(_components.code,{children:`{\"trigger\": {...}, \"steps\": [...]}`}),` as described above. Max 1 MB.`]})}),`\n`,_jsx(ParamField,{body:`sample`,type:`object`,optional:true,id:`param-sample`,children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(ParamField,{body:`assistant_id`,type:`integer`,optional:true,id:`param-assistant-id`,children:_jsxs(_components.p,{children:[`Required for assistant-event automations (`,_jsx(_components.code,{children:`phoneCallEnded`}),`, `,_jsx(_components.code,{children:`inboundCall`}),`, `,_jsx(_components.code,{children:`newConversation`}),`, and `,_jsx(_components.code,{children:`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 `,_jsx(_components.code,{children:`settings.input.assistant`}),` also works — the explicit parameter wins.)`]})}),`\n`,_jsx(ParamField,{body:`bind_webhook`,type:`string`,optional:true,id:`param-bind-webhook`,children:_jsxs(_components.p,{children:[`For a webhook-triggered definition only: attach it to the assistant’s conversation-ended event. The only supported value is `,_jsx(_components.code,{children:`conversation_ended`}),`. Requires `,_jsx(_components.code,{children:`assistant_id`}),`.`]})}),`\n`,_jsx(ParamField,{body:`confirm_side_effects`,type:`boolean`,optional:true,id:`param-confirm-side-effects`,children:_jsxs(_components.p,{children:[`Required (`,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`201`}),` when the automation is active (`,_jsx(_components.code,{children:`active`}),` / `,_jsx(_components.code,{children:`active_untested`}),`), `,_jsx(_components.code,{children:`200`}),` when it was built but its test run failed (`,_jsx(_components.code,{children:`test_failed`}),`), and `,_jsx(_components.code,{children:`422`}),` for a definition that never reached the test run (see error codes below).`]}),`\n`,_jsx(ResponseField,{name:`automation_id`,type:`string`,id:`param-automation-id`,children:_jsx(_components.p,{children:`The ID of the created automation`})}),`\n`,_jsx(ResponseField,{name:`webhook_url`,type:`string | null`,id:`param-webhook-url`,children:_jsxs(_components.p,{children:[`For webhook-triggered automations (including conversation-ended ones): the URL external systems call to fire it. `,_jsx(_components.code,{children:`null`}),` for assistant-event and schedule automations.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`active`}),` — the test run passed; the automation is live (and attached, for assistant events).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`test_failed`}),` — the test run failed; the automation was left disabled. Read `,_jsx(_components.code,{children:`test.steps`}),` for the per-step classification.`]}),`\n`]})}),`\n`,_jsxs(ResponseField,{name:`test`,type:`object`,id:`param-test`,children:[_jsx(_components.p,{children:`The test run result`}),_jsxs(Expandable,{title:`test properties`,children:[_jsx(ResponseField,{name:`run_status`,type:`string`,id:`param-run-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SUCCEEDED`}),`, `,_jsx(_components.code,{children:`PAUSED`}),`, `,_jsx(_components.code,{children:`FAILED`}),`, or `,_jsx(_components.code,{children:`not_tested`}),` (untestable triggers); rarely `,_jsx(_components.code,{children:`no_run`}),` when the test produced no execution record. `,_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`PAUSED`}),` counts as success`]}),`: the run is parked at a Delay step waiting for its target time — every step before the delay already ran.`]})}),_jsxs(ResponseField,{name:`steps`,type:`array`,id:`param-steps`,children:[_jsx(_components.p,{children:`Per-step outcome of the test run`}),_jsxs(Expandable,{title:`step properties`,children:[_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsxs(_components.p,{children:[`The step name (`,_jsx(_components.code,{children:`trigger`}),`, `,_jsx(_components.code,{children:`step_1`}),`, …)`]})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SUCCEEDED`}),`, `,_jsx(_components.code,{children:`FAILED`}),` or `,_jsx(_components.code,{children:`PAUSED`})]})}),_jsx(ResponseField,{name:`classification`,type:`string`,id:`param-classification`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ok`}),`, `,_jsx(_components.code,{children:`paused_at_delay`}),`, or — for failures — `,_jsx(_components.code,{children:`wiring_error`}),` (the definition is wrong: fix it and repair via `,_jsx(_components.a,{href:`/api-reference/automations/update-automation`,children:`Update automation`}),`), `,_jsx(_components.code,{children:`missing_connection`}),` (an account must be connected in the app first), `,_jsx(_components.code,{children:`missing_record`}),` (the sample referenced data that does not exist — often fine).`]})}),_jsx(ResponseField,{name:`error`,type:`string | null`,id:`param-error`,children:_jsx(_components.p,{children:`The step’s error message, when it failed`})})]})]})]})]}),`\n`,_jsx(ResponseField,{name:`response`,type:`object | string | null`,id:`param-response`,children:_jsx(_components.p,{children:`For synchronously-tested automations (webhook and inbound triggers): what the automation responded during the test run`})}),`\n`,_jsx(ResponseField,{name:`binding`,type:`object | null`,id:`param-binding`,children:_jsxs(_components.p,{children:[`For assistant-event automations: `,_jsx(_components.code,{children:`{\"type\": \"post_call\" | \"inbound\" | \"conversation\" | \"conversation_ended\", \"assistant_id\": \u003cid>, \"bound\": \u003cbool>}`}),`. `,_jsx(_components.code,{children:`bound`}),` is `,_jsx(_components.code,{children:`true`}),` only after a green test.`]})}),`\n`,_jsxs(Heading,{level:`3`,id:`error-codes-422`,children:[`Error codes (`,_jsx(_components.code,{children:`422`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`Hard failures return `,_jsx(_components.code,{children:`{\"message\": \"...\", \"error\": \"\u003ccode>\"}`}),` and nothing is activated. Notable codes:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`side_effects_require_confirmation`})}),_jsxs(_components.td,{children:[`The definition contains steps that would really send during the test — retry with `,_jsx(_components.code,{children:`confirm_side_effects: true`}),` after checking the recipients.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`no_steps`})}),_jsx(_components.td,{children:`The trigger has no steps chained to it.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_definition`}),` / `,_jsx(_components.code,{children:`unsupported_trigger`})]}),_jsx(_components.td,{children:`The definition is missing its trigger, or uses a trigger type that is not supported.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`assistant_required`}),` / `,_jsx(_components.code,{children:`assistant_not_found`})]}),_jsxs(_components.td,{children:[`The trigger needs an `,_jsx(_components.code,{children:`assistant_id`}),`, or the assistant does not belong to your account.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`binding_conflict`})}),_jsx(_components.td,{children:`The assistant already has an automation (or a custom webhook) for this event — an assistant has one slot per event type. Update the existing automation instead, or delete it first.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`needs_connection`}),` / `,_jsx(_components.code,{children:`needs_reconnection`})]}),_jsx(_components.td,{children:`The trigger’s integration account must be connected (or reconnected) in the app first — the message contains the exact steps.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`import_failed`}),` / `,_jsx(_components.code,{children:`publish_failed`}),` / `,_jsx(_components.code,{children:`create_failed`})]}),_jsx(_components.td,{children:`The definition was rejected or could not be activated.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create automation","api":"POST /user/automate/flows","description":"Create an automation from a definition, activate it and prove it with a real test run","href":"/api-reference/automations/create-automation"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[405,409,"Example,ResponseFiel"],[662,677,"Example)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingM"],[20009,20437,",`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`201 Response (webhook, test passed)`,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"automation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"f4EaLhOW2zoEsXXSOJP2r\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://automate.lacy.ai/api/v1/webhooks/your-webhook-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"test\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"run_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUCCEEDED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"steps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUCCEEDED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"classification\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"step_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUCCEEDED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"classification\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"echo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hello\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"binding\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`201 Response (schedule, activates untested)`,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"automation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aB3xYz01MnOpQrStUvWxY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active_untested\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"test\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"run_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_tested\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"steps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"binding\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Response (side effects not confirmed)`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This automation contains steps that would REALLY send messages, emails or start calls during the test run: Send SMS. Confirm with the user first — point those steps at a safe recipient the user owns — then retry with confirm_side_effects set to true.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"side_effects_require_confirmation\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"The definition format","slug":"the-definition-format","depth":3,"children":[]},{"title":"Request body","slug":"request-body","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Error codes (422)","slug":"error-codes-422","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"201 Response (webhook, test passed)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"automation_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"f4EaLhOW2zoEsXXSOJP2r\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"webhook_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://automate.lacy.ai/api/v1/webhooks/your-webhook-id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"test\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"run_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SUCCEEDED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"steps\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"trigger\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SUCCEEDED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"classification\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"step_1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SUCCEEDED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"classification\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"response\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"true\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"echo\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"hello\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"binding\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"201 Response (schedule, activates untested)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"automation_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"aB3xYz01MnOpQrStUvWxY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"webhook_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"active_untested\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"test\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"run_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"not_tested\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"steps\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"response\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"binding\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Response (side effects not confirmed)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"This automation contains steps that would REALLY send messages, emails or start calls during the test run: Send SMS. Confirm with the user first — point those steps at a safe recipient the user owns — then retry with confirm_side_effects set to true.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"side_effects_require_confirmation\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create automation","path":"/user/automate/flows","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"A short human name for the automation (max 255 characters)","required":true}],"flow":[{"type":"object","properties":{},"description":"The automation definition — `{\"trigger\": {...}, \"steps\": [...]}` as described above. Max 1 MB.","required":true}],"sample":[{"type":"object","properties":{},"description":"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":[{"type":"integer","description":"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":[{"type":"string","description":"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":[{"type":"boolean","description":"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."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","flow":{},"sample":{},"assistant_id":123,"bind_webhook":"\u003cstring>","confirm_side_effects":true}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"automation_id":[{"type":"string","description":"The ID of the created automation"}],"webhook_url":[{"type":"object","properties":{},"description":"For webhook-triggered automations (including conversation-ended ones): the URL external systems call to fire it. `null` for assistant-event and schedule automations."}],"status":[{"type":"string","description":"`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":[{"type":"object","properties":{"run_status":[{"type":"string","description":"`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":[{"type":"array","items":[{"type":"object","properties":{"name":[{"type":"string","description":"The step name ( `trigger` , `step_1` , …)"}],"status":[{"type":"string","description":"`SUCCEEDED` , `FAILED` or `PAUSED`"}],"classification":[{"type":"string","description":"`ok` , `paused_at_delay` , or — for failures — `wiring_error` (the definition is wrong: fix it and repair via Update automation ), `missing_connection` (an account must be connected in the app first), `missing_record` (the sample referenced data that does not exist — often fine)."}],"error":[{"type":"object","properties":{},"description":"The step’s error message, when it failed"}]}}],"description":"Per-step outcome of the test run"}]},"description":"The test run result"}],"response":[{"type":"object","properties":{},"description":"For synchronously-tested automations (webhook and inbound triggers): what the automation responded during the test run"}],"binding":[{"type":"object","properties":{},"description":"For assistant-event automations: `{\"type\": \"post_call\" | \"inbound\" | \"conversation\" | \"conversation_ended\", \"assistant_id\": \u003cid>, \"bound\": \u003cbool>}` . `bound` is `true` only after a green test."}]}}],"examples":{"example":{"value":{"automation_id":"\u003cstring>","webhook_url":{},"status":"\u003cstring>","test":{"run_status":"\u003cstring>","steps":[{"name":"\u003cstring>","status":"\u003cstring>","classification":"\u003cstring>","error":{}}]},"response":{},"binding":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"lacyai","siteName":"Lacyai Support Docs","title":"Create automation - Lacyai Support Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T21:07:34.311Z","originalFileLocation":"api-reference/automations/create-automation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an automation from a definition, activate it and prove it with a real test run\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lacyai Support Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create automation - Lacyai Support Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an automation from a definition, activate it and prove it with a real test run\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lacyai Support Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lacy.ai/api-reference/automations/create-automation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lacyai.mintlify.site/_mintlify/api/og/v2?division=Automations\u0026amp;title=Create+automation\u0026amp;description=Create+an+automation+from+a+definition%2C+activate+it+and+prove+it+with+a+real+test+run\u0026amp;theme=78ed505bd9068575b2a3cd03\u0026amp;signature=c8fd9cfd64fd78d66dbcd0129e14b76797f65c2ba5c8e4149ce7a2f5f8283026\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create automation - Lacyai Support Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an automation from a definition, activate it and prove it with a real test run\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lacyai.mintlify.site/_mintlify/api/og/v2?division=Automations\u0026amp;title=Create+automation\u0026amp;description=Create+an+automation+from+a+definition%2C+activate+it+and+prove+it+with+a+real+test+run\u0026amp;theme=78ed505bd9068575b2a3cd03\u0026amp;signature=c8fd9cfd64fd78d66dbcd0129e14b76797f65c2ba5c8e4149ce7a2f5f8283026\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lacyai/CfGrFf5mfoTZaovQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lacyai Support Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007BFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lacy.ai/api-reference/automations/create-automation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/automations/create-automation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lacy.ai/#organization\",\"name\":\"Lacyai Support Docs\",\"url\":\"https://docs.lacy.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lacyai/XShP4J2TcCKez9X5/logo.png?fit=max\u0026auto=format\u0026n=XShP4J2TcCKez9X5\u0026q=85\u0026s=09c7e2269ffc3d1d20220997a5184179\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lacy.ai#website\",\"name\":\"Lacyai Support Docs\",\"url\":\"https://docs.lacy.ai\",\"publisher\":{\"@id\":\"https://docs.lacy.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lacy.ai/api-reference/automations/create-automation#webpage\",\"url\":\"https://docs.lacy.ai/api-reference/automations/create-automation\",\"name\":\"Create automation\",\"description\":\"Create an automation from a definition, activate it and prove it with a real test run\",\"dateModified\":\"2026-11-11T21:07:34.311Z\",\"isPartOf\":{\"@id\":\"https://docs.lacy.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lacy.ai/api-reference/automations/create-automation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lacy.ai/api-reference/automations/create-automation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.lacy.ai/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automations\",\"item\":\"https://docs.lacy.ai/api-reference/automations/list-automations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create automation\",\"item\":\"https://docs.lacy.ai/api-reference/automations/create-automation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lacy.ai/api-reference/automations/create-automation#apireference\",\"headline\":\"Create automation\",\"name\":\"Create automation\",\"description\":\"Create an automation from a definition, activate it and prove it with a real test run\",\"url\":\"https://docs.lacy.ai/api-reference/automations/create-automation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lacy.ai/api-reference/automations/create-automation#webpage\"},\"dateModified\":\"2026-11-11T21:07:34.311Z\",\"publisher\":{\"@id\":\"https://docs.lacy.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lacy.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lacyai Support Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lacyai Support Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/automations/create-automation.md","siteName":"Lacyai Support Docs","nav":{"global":null,"groups":[{"group":"Platform Guide","pages":[{"title":"Platform guide","href":"/index"},{"title":"What is Lacy.ai?","icon":"circle-question","href":"/introduction/what-is-lacy"},{"title":"How It Works (Quick Overview)","icon":"diagram-project","href":"/introduction/how-it-works"},{"title":"Key Terminology","icon":"book","href":"/introduction/key-terminology"},{"group":"Platform Basics","pages":[{"title":"Introduction","icon":"book-open-cover","href":"/platform-guide/introduction"},{"title":"Lacy.ai Basics","href":"/platform-guide/basics"},{"title":"Inbound calls","icon":"phone-arrow-down-left","href":"/platform-guide/call-types/inbound"},{"title":"Outbound calls","icon":"phone-arrow-up-right","href":"/platform-guide/call-types/outbound"},{"title":"Costs","href":"/platform-guide/costs"},{"title":"Calendar booking with Cal.com","href":"/platform-guide/tools/cal-com"},{"title":"End call","href":"/platform-guide/tools/end-call"},{"title":"Transfer call","href":"/platform-guide/tools/transfer-call"}]}]},{"group":"Getting Started","pages":[{"title":"Core Concepts","icon":"lightbulb","href":"/getting-started/core-concepts"},{"title":"Understanding Call Minutes \u0026 Billing","icon":"credit-card","href":"/getting-started/understanding-billing"}]},{"group":"AI Assistants Overview","pages":[{"title":"What is an AI Assistant?","icon":"robot","href":"/ai-assistants/what-is-ai-assistant"},{"title":"System Prompts","icon":"brain","href":"/ai-assistants/system-prompt"},{"title":"Initial Message \u0026 Audio","icon":"message-dots","href":"/ai-assistants/initial-message"},{"title":"Creating and Editing an AI Assistant","icon":"pen-to-square","href":"/ai-assistants/creating-and-editing"},{"title":"Tools \u0026 Functions","icon":"screwdriver-wrench","href":"/ai-assistants/tools-and-functions"},{"title":"Voice Selection \u0026 Voice Cloning","icon":"microphone","href":"/ai-assistants/voice-selection"},{"title":"Filler Audio","icon":"volume","href":"/ai-assistants/filler-audio"},{"title":"Cal.com Appointment Scheduling","icon":"calendar-days","href":"/ai-assistants/cal-com-scheduling"},{"title":"Testing Your Assistant","icon":"vial","href":"/ai-assistants/testing"},{"title":"Assistant best practices","icon":"sliders","href":"/ai-assistants/assistant-configuration"},{"title":"Assistant Modes","icon":"wave-pulse","href":"/ai-assistants/assistant-modes"},{"title":"AI Prompt Editor","icon":"sparkles","href":"/ai-assistants/ai-prompt-editor"},{"title":"Custom Mid-Call Tools","icon":"code-branch","href":"/ai-assistants/custom-tools"},{"title":"MCP Servers","icon":"share-nodes","href":"/ai-assistants/mcp-servers"},{"title":"Flow Builder","icon":"share-nodes","href":"/ai-assistants/flow-builder"},{"title":"Test Chat Interface","icon":"comment-dots","href":"/ai-assistants/test-chat"},{"title":"Web Widget","icon":"code","href":"/ai-assistants/web-widget"},{"group":"Scheduling","pages":[{"title":"Calendly Appointment Scheduling","icon":"calendar-days","href":"/ai-assistants/calendly-scheduling"},{"title":"GoHighLevel Appointment Scheduling","icon":"calendar-plus","href":"/ai-assistants/gohighlevel-scheduling"}]},{"group":"Assistant Settings","pages":[{"title":"General Settings","icon":"gear","href":"/ai-assistants/settings/general"},{"title":"Prompt \u0026 Tools","icon":"wrench","href":"/ai-assistants/settings/prompt-and-tools"},{"title":"Post-call Actions","icon":"webhook","href":"/ai-assistants/settings/post-call-actions"}]}]},{"group":"Phone Numbers","pages":[{"title":"Types of Phone Numbers","icon":"phone","href":"/phone-numbers/types"},{"title":"Purchasing \u0026 Managing Numbers","icon":"phone-plus","href":"/phone-numbers/purchasing-and-managing"},{"title":"Pricing \u0026 Regions","icon":"money-bill","href":"/phone-numbers/pricing-and-regions"},{"title":"SMS Capabilities","icon":"message-sms","href":"/phone-numbers/sms-capabilities"},{"title":"Assigning Numbers to Assistants","icon":"link","href":"/phone-numbers/assigning-to-assistants"}]},{"group":"Inbound Calls","pages":[{"title":"Inbound Calls Overview","icon":"phone-arrow-down-left","href":"/inbound-calls/overview"},{"title":"Provisioning \u0026 Managing Phone Numbers","icon":"phone-plus","href":"/inbound-calls/provisioning"},{"title":"Configuring the Inbound Assistant","icon":"sliders","href":"/inbound-calls/configuring"},{"title":"Inbound Call Insights","icon":"chart-line","href":"/inbound-calls/insights"}]},{"group":"Outbound Calls","pages":[{"title":"Outbound Calls Overview","icon":"phone-arrow-up-right","href":"/outbound-calls/overview"},{"title":"Creating \u0026 Managing Campaigns","icon":"bullhorn","href":"/outbound-calls/campaigns"},{"title":"Caller ID \u0026 Handling","icon":"id-card","href":"/outbound-calls/caller-id"},{"title":"Voicemail Handling","icon":"voicemail","href":"/outbound-calls/voicemail-handling"},{"title":"Scripts \u0026 Prompts for Sales or Collections","icon":"file-lines","href":"/outbound-calls/scripts-and-prompts"},{"title":"Mass/Parallel Dialing","icon":"phone-volume","href":"/outbound-calls/mass-dialing"}]},{"group":"Campaigns","pages":[{"title":"Campaigns Overview","icon":"bullhorn","href":"/campaigns/index"},{"title":"Creating a Campaign","icon":"plus","href":"/campaigns/creating-campaigns"}]},{"group":"Conversations","pages":[{"title":"Conversations Overview","icon":"messages","href":"/conversations/overview"},{"title":"Viewing \u0026 Managing Conversations","icon":"list-check","href":"/conversations/viewing-and-managing"}]},{"group":"Leads","pages":[{"title":"Leads Overview","icon":"users","href":"/leads/index"},{"title":"Importing Leads","icon":"file-import","href":"/leads/importing-leads"},{"title":"Managing Leads","icon":"user-gear","href":"/leads/managing-leads"}]},{"group":"AI Prompting \u0026 Conversation Design","pages":[{"title":"Prompt Writing Basics","icon":"pen-nib","href":"/conversation-design/prompt-basics"},{"title":"Inserting Knowledge Bases","icon":"database","href":"/conversation-design/knowledge-bases"},{"title":"Handling Interruptions \u0026 Speech Sensitivity","icon":"hand","href":"/conversation-design/interruptions"},{"title":"Language \u0026 Accent Support","icon":"language","href":"/conversation-design/language-support"}]},{"group":"Automation \u0026 Integrations","pages":[{"title":"Claude \u0026 ChatGPT Connector (MCP)","icon":"plug","href":"/automation/connect-ai"},{"title":"Introduction","href":"/automation-platform/introduction"},{"title":"Overview of No-Code Automation","icon":"wand-magic-sparkles","href":"/automation/overview"},{"title":"Webhook \u0026 API","icon":"code","href":"/automation/webhook-api"},{"title":"Phone System Integrations","icon":"phone-office","href":"/automation/phone-system"},{"group":"Building and Managing Flows","pages":[{"title":"Building Flows","icon":"hammer","href":"/automation-platform/building-flows"},{"title":"Passing Data","icon":"wand-sparkles","href":"/automation-platform/passing-data"},{"title":"Publishing Flows","icon":"bolt","href":"/automation-platform/publishing-flows"},{"title":"Debugging Runs","icon":"bug","href":"/automation-platform/debugging-runs"},{"title":"Version History","icon":"clock","href":"/automation-platform/versioning"},{"title":"Technical limits","icon":"ban","href":"/automation-platform/known-limits"}]},{"group":"Calling and Messaging","pages":[{"title":"Lacy.ai Tool","icon":"phone","href":"/automation-platform/calls-related/lacy-tool"},{"title":"Sending SMS","icon":"message-sms","href":"/automation-platform/calls-related/sms-capabilities"},{"title":"Common Integrations","icon":"puzzle-piece","href":"/automation-platform/calls-related/common-integrations"}]},{"group":"Tutorials","pages":[{"title":"Inbound Call Context Injection","icon":"arrow-right","href":"/automation-platform/tutorials/inbound-context-injection"},{"title":"Outbound Call on Form Submission","icon":"wpforms","href":"/automation-platform/tutorials/outbound-form-call"}]}]},{"group":"Custom Dashboards","pages":[{"title":"Custom Dashboards","icon":"chart-line","href":"/custom-dashboards/overview"},{"title":"Widget Configuration","icon":"sliders","href":"/custom-dashboards/widget-types"}]},{"group":"WhatsApp","pages":[{"title":"WhatsApp Business Integration","icon":"whatsapp","href":"/whatsapp/overview"},{"title":"WhatsApp Senders","icon":"phone","href":"/whatsapp/senders"},{"title":"WhatsApp Calling","icon":"phone","href":"/whatsapp/calling"},{"title":"Message Templates","icon":"file-lines","href":"/whatsapp/templates"},{"title":"WhatsApp Conversations","icon":"messages","href":"/whatsapp/conversations"},{"title":"WhatsApp Automation","icon":"bolt","href":"/whatsapp/automation"}]},{"group":"Costs \u0026 Pricing","pages":[{"title":"Cost Overview","icon":"dollar-sign","href":"/pricing/overview"},{"title":"Pricing Breakdown","icon":"calculator","href":"/pricing/usage-based"},{"title":"Number Rentals \u0026 International Rates","icon":"globe","href":"/pricing/number-rentals"},{"title":"Inbound vs. Outbound Costs","icon":"arrows-up-down","href":"/pricing/inbound-vs-outbound"},{"title":"Extra Fees \u0026 How They're Calculated","icon":"receipt","href":"/pricing/extra-fees"}]},{"group":"Number Provisioning","pages":[{"title":"Supported Countries","icon":"globe","href":"/provisioning/supported-countries"},{"title":"Managing Your Numbers","icon":"list-check","href":"/provisioning/managing-numbers"},{"title":"SIP Integration","icon":"phone-volume","href":"/provisioning/sip-integration"},{"title":"DIDLogic Integration","href":"/provisioning/sip-trunking/didlogic"},{"title":"Twilio Integration","href":"/provisioning/sip-trunking/twilio"},{"title":"Telnyx Integration","href":"/provisioning/sip-trunking/telnyx"},{"title":"Zadarma Integration","href":"/provisioning/sip-trunking/zadarma"},{"title":"Handling Compliance","icon":"shield-check","href":"/provisioning/compliance"},{"title":"Phone System Integrations","icon":"phone-office","href":"/provisioning/phone-system-integrations"},{"title":"Overview","href":"/provisioning/sip-trunking/sip-integration"}]},{"group":"Settings","pages":[{"title":"Data Retention","icon":"clock-rotate-left","href":"/settings/data-retention"}]},{"group":"Troubleshooting \u0026 FAQs","pages":[{"title":"Voice \u0026 Response Issues","icon":"microphone","href":"/troubleshooting/voice-problems"},{"title":"Billing \u0026 Credits","icon":"money-bill","href":"/troubleshooting/billing"},{"title":"Call Quality Issues","icon":"phone","href":"/troubleshooting/call-quality"},{"title":"AI Behavior Issues","icon":"robot","href":"/troubleshooting/ai-behavior"},{"title":"Cal.com Issues","icon":"calendar-days","href":"/troubleshooting/cal-com"},{"title":"Calendly Issues","icon":"calendar-days","href":"/troubleshooting/calendly"},{"title":"Campaign Issues","icon":"wrench","href":"/troubleshooting/campaigns"},{"title":"GoHighLevel Issues","icon":"calendar-days","href":"/troubleshooting/gohighlevel"},{"title":"Leads Issues","icon":"user-gear","href":"/troubleshooting/leads"},{"title":"SIP Integration Issues","icon":"phone-volume","href":"/troubleshooting/sip-integration"},{"title":"Web Widget Issues","icon":"code","href":"/troubleshooting/web-widget"},{"title":"WhatsApp Troubleshooting","icon":"circle-question","href":"/troubleshooting/whatsapp"},{"title":"General Setup Issues","icon":"wrench","href":"/troubleshooting/setup-issues"},{"title":"Can I Bring My Own Phone Number / Twilio?","icon":"phone-arrow-right","href":"/troubleshooting/byop"}]},{"group":"Release Notes","pages":[{"title":"Product Updates","icon":"scroll","href":"/releases/index"}]},{"group":"API Reference","pages":[{"title":"Introduction","icon":"book-open","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"},{"group":"API Keys","pages":[{"title":"List API keys","api":"GET /user/api-keys","href":"/api-reference/authentication/list-api-keys"},{"title":"Create API key","api":"POST /user/api-keys","href":"/api-reference/authentication/create-api-key"},{"title":"Delete API key","api":"DELETE /user/api-keys/{id}","href":"/api-reference/authentication/delete-api-key"}]},{"group":"Assistants","pages":[{"title":"List assistants","api":"GET /user/assistants/get","href":"/api-reference/assistants/get-assistants"},{"title":"Get outbound assistants","api":"GET /user/assistants/outbound","href":"/api-reference/assistants/get-outbound-assistants"},{"title":"Create assistant","api":"POST /user/assistant","href":"/api-reference/assistants/create-assistant"},{"title":"Update assistant","api":"PUT /user/assistant/{id}","href":"/api-reference/assistants/update-assistant"},{"title":"Delete assistant","api":"DELETE /user/assistant/{id}","href":"/api-reference/assistants/delete-assistant"},{"title":"Get available languages","api":"GET /user/assistants/languages","href":"/api-reference/assistants/get-languages"},{"title":"Get available models","api":"GET /user/assistants/models","href":"/api-reference/assistants/get-models"},{"title":"Get available voices","api":"GET /user/assistants/voices","href":"/api-reference/assistants/get-voices"},{"title":"Get transcriber providers","api":"GET /user/assistants/transcriber-providers","href":"/api-reference/assistants/get-transcriber-providers"},{"title":"Get synthesizer providers","api":"GET /user/assistants/synthesizer-providers","href":"/api-reference/assistants/get-synthesizer-providers"},{"title":"Get available phone numbers","api":"GET /user/assistants/phone-numbers","href":"/api-reference/assistants/get-phone-numbers"},{"title":"Enable assistant inbound webhook","api":"POST /user/assistants/enable-inbound-webhook","href":"/api-reference/assistants/enable-inbound-webhook"},{"title":"Disable assistant inbound webhook","api":"POST /user/assistants/disable-inbound-webhook","href":"/api-reference/assistants/disable-inbound-webhook"},{"title":"Enable conversation ended webhook","api":"POST /user/assistants/enable-conversation-ended-webhook","href":"/api-reference/assistants/enable-conversation-ended-webhook"},{"title":"Disable conversation ended webhook","api":"POST /user/assistants/disable-conversation-ended-webhook","href":"/api-reference/assistants/disable-conversation-ended-webhook"},{"title":"Disable assistant webhook","api":"POST /user/assistants/disable-webhook","href":"/api-reference/assistants/disable-webhook"}]},{"group":"Calls","pages":[{"title":"List calls","api":"GET /user/calls","href":"/api-reference/calls/get-calls"},{"title":"Get call","api":"GET /user/calls/{id}","href":"/api-reference/calls/get-call"},{"title":"Make a phone call","api":"POST /user/make_call","href":"/api-reference/calls/make-phone-call"},{"title":"Delete call","api":"DELETE /user/calls/{call}","href":"/api-reference/calls/delete-call"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","api":"GET /user/campaigns","icon":"list","href":"/api-reference/campaigns/index"},{"title":"List campaigns","api":"GET /user/campaigns","href":"/api-reference/campaigns/get-campaigns"},{"title":"Create campaign","api":"POST /user/campaign","href":"/api-reference/campaigns/create-campaign"},{"title":"Update campaign status","api":"POST /user/campaigns/update-status","href":"/api-reference/campaigns/update-status"},{"title":"Get campaign","api":"GET /user/campaign/{id}","href":"/api-reference/campaigns/get-campaign"},{"title":"Delete campaign","api":"DELETE /user/campaign/{id}","href":"/api-reference/campaigns/delete-campaign"}]},{"group":"Conversations","pages":[{"title":"List Conversations","api":"GET /user/conversations","href":"/api-reference/conversations/list-conversations"},{"title":"Create Conversation","api":"POST /conversations","href":"/api-reference/conversations/create-conversation"},{"title":"Get Conversation","api":"GET /conversations/{uuid}","href":"/api-reference/conversations/get-conversation"},{"title":"Send Message","api":"POST /conversations/{uuid}/messages","href":"/api-reference/conversations/send-message"},{"title":"Disable AI","api":"POST /user/conversations/{uuid}/disable-ai","href":"/api-reference/conversations/disable-ai"},{"title":"Enable AI","api":"POST /user/conversations/{uuid}/enable-ai","href":"/api-reference/conversations/enable-ai"}]},{"group":"Knowledge Bases","pages":[{"title":"Get knowledgebases","api":"GET /user/knowledgebases","href":"/api-reference/knowledgebases/get-knowledgebases"},{"title":"Get knowledgebase","api":"GET /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/get-knowledgebase"},{"title":"Create knowledgebase","api":"POST /user/knowledgebases","href":"/api-reference/knowledgebases/create-knowledgebase"},{"title":"Update knowledgebase","api":"PUT /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/update-knowledgebase"},{"title":"Delete knowledgebase","api":"DELETE /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/delete-knowledgebase"},{"title":"Get documents","api":"GET /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/get-documents"},{"title":"Get document","api":"GET /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/get-document"},{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/create-document"},{"title":"Update document","api":"PUT /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/update-document"},{"title":"Delete document","api":"DELETE /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/delete-document"}]},{"group":"Leads","pages":[{"title":"List leads","api":"GET /user/leads","href":"/api-reference/leads/get-lead"},{"title":"Create lead","api":"POST /user/lead","icon":"user-plus","href":"/api-reference/leads/create"},{"title":"Update Lead","api":"PUT /user/leads/{id}","href":"/api-reference/leads/update-lead"},{"title":"Delete lead","api":"DELETE /user/leads/{id}","href":"/api-reference/leads/delete"}]},{"group":"Mid-Call Tools","pages":[{"title":"List mid call tools","api":"GET /user/tools","href":"/api-reference/mid-call-tools/get-tools"},{"title":"Get mid call tool","api":"GET /user/tools/{id}","href":"/api-reference/mid-call-tools/get-tool"},{"title":"Create mid call tool","api":"POST /user/tools","href":"/api-reference/mid-call-tools/create-tool"},{"title":"Update mid call tool","api":"PUT /user/tools/{id}","href":"/api-reference/mid-call-tools/update-tool"},{"title":"Delete mid call tool","api":"DELETE /user/tools/{id}","href":"/api-reference/mid-call-tools/delete-tool"}]},{"group":"Phone Numbers","pages":[{"title":"Get all phone numbers","api":"GET /user/phone-numbers/all","href":"/api-reference/phone-numbers/get-phone-numbers"},{"title":"Search available phone numbers","api":"GET /user/phone-numbers/search","href":"/api-reference/phone-numbers/search-phone-numbers"},{"title":"Purchase phone number","api":"POST /user/phone-numbers/purchase","href":"/api-reference/phone-numbers/purchase-phone-number"},{"title":"Release phone number","api":"DELETE /user/phone-numbers/{id}","href":"/api-reference/phone-numbers/release-phone-number"},{"title":"Update phone number","api":"PUT /user/phone-numbers/{id}","href":"/api-reference/phone-numbers/update-phone-number"}]},{"group":"Messaging","pages":[{"title":"Send SMS","api":"POST /user/sms","href":"/api-reference/sms/send-sms"},{"title":"Get WhatsApp Senders","api":"GET /user/whatsapp/senders","href":"/api-reference/whatsapp/get-senders"},{"title":"Get Templates","api":"GET /user/whatsapp/senders/{senderId}/templates","href":"/api-reference/whatsapp/get-templates"},{"title":"Send Template Message","api":"POST /user/whatsapp/send","href":"/api-reference/whatsapp/send-template"},{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","href":"/api-reference/whatsapp/send-freeform"},{"title":"Get Session Status","api":"GET /user/whatsapp/session-status","href":"/api-reference/whatsapp/session-status"},{"title":"Get call permission","api":"GET /user/whatsapp/voice/permission","href":"/api-reference/whatsapp/get-call-permission"},{"title":"Request call permission","api":"POST /user/whatsapp/voice/request","href":"/api-reference/whatsapp/request-call-permission"},{"title":"Place a WhatsApp call","api":"POST /user/whatsapp/voice/call","href":"/api-reference/whatsapp/place-whatsapp-call"}]},{"group":"Webhooks","pages":[{"title":"Post-Call Webhook","icon":"webhook","href":"/api-reference/webhooks/post-call-webhook"},{"title":"Conversation Ended Webhook","icon":"webhook","href":"/api-reference/webhooks/conversation-ended-webhook"},{"title":"Read Receipts Webhook","icon":"webhook","href":"/api-reference/webhooks/read-receipts-webhook"},{"title":"WhatsApp Voice Webhook","icon":"webhook","href":"/api-reference/webhooks/whatsapp-voice-webhook"}]},{"group":"Automations","pages":[{"title":"List automations","api":"GET /user/automate/flows","href":"/api-reference/automations/list-automations"},{"title":"Get automation","api":"GET /user/automate/flows/{id}","href":"/api-reference/automations/get-automation"},{"title":"List automation templates","api":"GET /user/automate/templates","href":"/api-reference/automations/list-automation-templates"},{"title":"Apply automation template","api":"POST /user/automate/templates/{key}","description":"Create an automation from a ready-made template and prove it with a real test run","href":"/api-reference/automations/apply-automation-template"},{"title":"Create automation","api":"POST /user/automate/flows","href":"/api-reference/automations/create-automation"},{"title":"Update automation","api":"PUT /user/automate/flows/{id}","description":"Rename an automation, turn it on or off, or repair it with a corrected definition","href":"/api-reference/automations/update-automation"},{"title":"Delete automation","api":"DELETE /user/automate/flows/{id}","href":"/api-reference/automations/delete-automation"},{"title":"List automation runs","api":"GET /user/automate/flows/{id}/runs","href":"/api-reference/automations/list-automation-runs"},{"title":"Retry automation run","api":"POST /user/automate/flows/{id}/runs/{run_id}/retry","href":"/api-reference/automations/retry-automation-run"},{"title":"Restore previous version","api":"POST /user/automate/flows/{id}/restore","href":"/api-reference/automations/restore-automation"}]},{"group":"Folders","pages":[{"title":"List folders","api":"GET /user/folders","href":"/api-reference/folders/get-folders"},{"title":"Create folder","api":"POST /user/folder","href":"/api-reference/folders/create-folder"},{"title":"Update folder","api":"PUT /user/folder/{id}","href":"/api-reference/folders/update-folder"},{"title":"Delete folder","api":"DELETE /user/folder/{id}","href":"/api-reference/folders/delete-folder"}]},{"group":"Labels","pages":[{"title":"List labels","api":"GET /user/labels","href":"/api-reference/labels/get-labels"},{"title":"Create label","api":"POST /user/label","href":"/api-reference/labels/create-label"},{"title":"Update label","api":"PUT /user/label/{id}","href":"/api-reference/labels/update-label"},{"title":"Delete label","api":"DELETE /user/label/{id}","href":"/api-reference/labels/delete-label"}]},{"group":"SIP Trunks","pages":[{"title":"List SIP trunks","api":"GET /user/phone-numbers/sip-trunks","href":"/api-reference/sip-trunks/list-sip-trunks"},{"title":"Get SIP trunk","api":"GET /user/phone-numbers/sip-trunks/{id}","href":"/api-reference/sip-trunks/get-sip-trunk"},{"title":"Create SIP trunk","api":"POST /user/phone-numbers/sip-trunks","href":"/api-reference/sip-trunks/create-sip-trunk"},{"title":"Update SIP trunk","api":"PUT /user/phone-numbers/sip-trunks/{id}","href":"/api-reference/sip-trunks/update-sip-trunk"},{"title":"Delete SIP trunk","api":"DELETE /user/phone-numbers/{id}","href":"/api-reference/sip-trunks/delete-sip-trunk"}]},{"group":"AI and Account","pages":[{"title":"Generate AI Reply","api":"POST /user/ai/generate-reply","href":"/api-reference/ai/generate-reply"},{"title":"Get current user","api":"GET /user/me","href":"/api-reference/user/me"}]}]}]},"basePath":"","title":"Create automation - Lacyai Support Docs","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js"]}