{
"error": {
"type": "permission_denied",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}
Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.
{
"error": {
"type": "permission_denied",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}
Link to the flow in the Bevits editor, for review.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Bevits","colors":{"primary":"#F97316","light":"#FB923C","dark":"#EA580C"},"logo":{"light":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/light.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=e3888ae21616d4de0a83364106aade8c","dark":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/dark.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=a4cb0c23c9b869db5134b256820f2dce"},"favicon":"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/favicon.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=0860c45a6d0cf16a9e741cd3ef465c1b","styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","default":true,"navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Suporte"}],"primary":{"type":"button","label":"Painel","href":"https://app.bevits.com"}},"href":"pt-BR/overview"},{"language":"en","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.bevits.com"}},"href":"en/overview"},{"language":"es","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://app.bevits.com"}},"href":"es/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bevits","hasAudioNarration":false,"actualSubdomain":"bevits","customDomains":["docs.bevits.com"],"gitSource":{"type":"github","owner":"zenvios","repo":"zenvios-monorepo","deployBranch":"main","contentDirectory":"bevits-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae9fa5198ee2cfbfea8f486","collectionId":"40c93bf2-9175-4652-81e0-359af0a48aae","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae9fa5198ee2cfbfea8f486"},"entitlements":{},"buildId":"6ae9fa5198ee2cfbfea8f486","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"API","count":30},{"language":"es","tag":"API","count":30},{"language":"pt-BR","tag":"API","count":30},{"language":"en","tag":"Reference","count":25},{"language":"es","tag":"Referencia","count":25},{"language":"pt-BR","tag":"Referência","count":25},{"language":"en","tag":"Documentation","count":17},{"language":"es","tag":"Documentación","count":17},{"language":"pt-BR","tag":"Documentação","count":17},{"language":"en","tag":"Features","count":8},{"language":"es","tag":"Funcionalidades","count":8},{"language":"pt-BR","tag":"Funcionalidades","count":8},{"language":"en","tag":"Sending methods","count":5},{"language":"es","tag":"Primeros pasos","count":5},{"language":"es","tag":"Métodos de envío","count":5},{"language":"pt-BR","tag":"Primeiros passos","count":5},{"language":"pt-BR","tag":"Métodos de envio","count":5},{"language":"en","tag":"Getting started","count":4},{"language":"en","tag":"Integrations","count":3},{"language":"es","tag":"Integraciones","count":3},{"language":"pt-BR","tag":"Integrações","count":3},{"language":"en","tag":"Fundamentals","count":1},{"language":"en","tag":"Changelog","count":1},{"language":"en","tag":"Updates","count":1},{"language":"es","tag":"Fundamentos","count":1},{"language":"es","tag":"Changelog","count":1},{"language":"es","tag":"Actualizaciones","count":1},{"language":"pt-BR","tag":"Fundamentos","count":1},{"language":"pt-BR","tag":"Changelog","count":1},{"language":"pt-BR","tag":"Atualizações","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-reference/automations/create-flow-as-a-draft","slug":"/en/api-reference/automations/create-flow-as-a-draft","pageMetadata":{"title":"Create flow as a draft","description":"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows","href":"/en/api-reference/automations/create-flow-as-a-draft","autogeneratedByOpenApi":true},"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: \"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\"\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create flow as a draft","description":"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows","href":"/en/api-reference/automations/create-flow-as-a-draft","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create flow as a draft","description":"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.","operationId":"createFlowDraft","tags":["Automations"],"parameters":["744b308c-1b2f-4a7c-ab4f-2b7c29426706"],"requestBody":"07ae0923-9984-4d20-9623-aa5760bb1f74","responses":{"200":"52029c1c-6647-46f9-8484-60c23b762649","400":"5762fa57-4b9c-476f-a111-2a3b6fa783a5","401":"bfdb135a-a53f-4fc6-ae62-a6e565774720","403":"6a37129f-224c-42d0-958d-a9ce7073c3e2","409":"5bfcc0fd-a256-4bb3-aae9-77b1fd8e78c9","422":"b2556acb-f13f-4a3a-a396-40aaa663029f","429":"46a16ab5-ac3b-4079-989b-cc29439258d2","500":"024c5c90-88c2-47bb-8ef1-9228dd3e28be"},"method":"post","type":"path","servers":["a6ce2384-29d3-47f5-b341-bef8f0319791"],"security":["1aea7643-c618-42c2-8b79-6923147b244b"],"path":"/v1/flows","baseUrlOptions":["https://api.bevits.com"],"title":"Create flow as a draft","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"744b308c-1b2f-4a7c-ab4f-2b7c29426706":{"name":"Idempotency-Key","in":"header","description":"Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.","schema":{"type":"string","description":"Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","trigger","start","nodes"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":256,"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"trigger":{"type":"object","description":"Flow trigger, as listed in the catalog.","required":["platform","event"],"additionalProperties":false,"properties":{"platform":{"type":"string","example":"nuvemshop","isRequired":true,"uniqueKey":"trigger.platform","typeLabel":"string"},"event":{"type":"string","example":"order_created","isRequired":true,"uniqueKey":"trigger.event","typeLabel":"string"}},"isRequired":true,"uniqueKey":"trigger","typeLabel":"object"},"start":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"start","typeLabel":"string"},"nodes":{"type":"array","minItems":1,"maxItems":50,"items":{"oneOf":[{"type":"object","description":"Branches on a field of the trigger's data.","required":["key","type","field","operator"],"properties":{"key":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.0.key","typeLabel":"string"},"type":{"type":"string","const":"condition","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.0.type","typeLabel":"string"},"field":{"type":"string","example":"order.paymentStatus","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.0.field","typeLabel":"string"},"operator":{"type":"string","enum":["equals","not_equals","greater_than","less_than","greater_than_or_equal","less_than_or_equal","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty","includes","not_includes"],"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.0.operator","typeLabel":"enum\u003cstring>"},"value":{"oneOf":[{"description":"Omit for is_empty and is_not_empty.","type":"string","uniqueKey":"nodes.items.[INDEX].oneOf.0.value.oneOf.0","typeLabel":"string"},{"description":"Omit for is_empty and is_not_empty.","type":"number","uniqueKey":"nodes.items.[INDEX].oneOf.0.value.oneOf.1","typeLabel":"number"},{"description":"Omit for is_empty and is_not_empty.","type":"boolean","uniqueKey":"nodes.items.[INDEX].oneOf.0.value.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"nodes.items.[INDEX].oneOf.0.value","typeLabel":"string | number | boolean"},"if_true":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.0.if_true.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.0.if_true.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.0.if_true","typeLabel":"string | null"},"if_false":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.0.if_false.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.0.if_false.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.0.if_false","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"nodes.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Pauses the flow.","required":["key","type","amount","unit"],"properties":{"key":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.1.key","typeLabel":"string"},"type":{"type":"string","const":"wait","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.1.type","typeLabel":"string"},"amount":{"type":"integer","minimum":1,"maximum":10000,"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.1.amount","typeLabel":"integer"},"unit":{"type":"string","enum":["minutes","hours","days"],"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.1.unit","typeLabel":"enum\u003cstring>"},"next":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.1.next.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.1.next.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.1.next","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"nodes.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Sends a template: send_whatsapp and send_whatsapp_unofficial use wtp_, send_email uses etp_, and send_sms uses stp_.","required":["key","type","template_id"],"properties":{"key":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.2.key","typeLabel":"string"},"type":{"type":"string","enum":["send_whatsapp","send_whatsapp_unofficial","send_email","send_sms"],"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"template_id":{"type":"string","description":"ID returned by the message template listing.","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.2.template_id","typeLabel":"string"},"next":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.2.next.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.2.next.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.2.next","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"nodes.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Adds or removes customer tags.","required":["key","type","action","tag_ids"],"properties":{"key":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.3.key","typeLabel":"string"},"type":{"type":"string","const":"update_tags","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.3.type","typeLabel":"string"},"action":{"type":"string","enum":["add","remove"],"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.3.action","typeLabel":"enum\u003cstring>"},"tag_ids":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","pattern":"^tag_[A-Za-z0-9_-]+$","uniqueKey":"nodes.items.[INDEX].oneOf.3.tag_ids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.3.tag_ids","typeLabel":"string[]"},"next":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.3.next.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.3.next.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.3.next","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"nodes.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"Creates a unique coupon for the customer, available to later messages. Enables coupon.* conditions after it.","required":["key","type","discount_type","discount_value","valid_for_days"],"properties":{"key":{"type":"string","description":"Block key: lowercase letters, digits, and underscores, starting with a letter.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.4.key","typeLabel":"string"},"type":{"type":"string","const":"create_coupon","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.4.type","typeLabel":"string"},"discount_type":{"type":"string","enum":["percentage","fixed"],"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.4.discount_type","typeLabel":"enum\u003cstring>"},"discount_value":{"type":"number","exclusiveMinimum":0,"description":"Discount percentage (up to 100) or fixed amount.","isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.4.discount_value","typeLabel":"number"},"valid_for_days":{"type":"integer","minimum":1,"maximum":365,"isRequired":true,"uniqueKey":"nodes.items.[INDEX].oneOf.4.valid_for_days","typeLabel":"integer"},"code_prefix":{"type":"string","pattern":"^[A-Z0-9]{1,12}$","description":"Code prefix, up to 12 uppercase letters or digits.","uniqueKey":"nodes.items.[INDEX].oneOf.4.code_prefix","typeLabel":"string"},"next":{"oneOf":[{"type":"string","description":"Key of the next block. Omit it to end the path.","pattern":"^[a-z][a-z0-9_]{0,63}$","example":"wait_1_day","uniqueKey":"nodes.items.[INDEX].oneOf.4.next.oneOf.0","typeLabel":"string"},{"type":"null","description":"Key of the next block. Omit it to end the path.","uniqueKey":"nodes.items.[INDEX].oneOf.4.next.oneOf.1","typeLabel":"null"}],"uniqueKey":"nodes.items.[INDEX].oneOf.4.next","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"nodes.items.[INDEX].oneOf.4","typeLabel":"object"}],"uniqueKey":"nodes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"nodes","typeLabel":"object[]"},"description":{"type":"string","maxLength":2000,"uniqueKey":"description","typeLabel":"string"},"validate_only":{"type":"boolean","default":false,"description":"When true, only validates the flow and returns the outline, saving nothing.","uniqueKey":"validate_only","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"example":{"name":"Boleto a pagar","trigger":{"platform":"nuvemshop","event":"order_created"},"start":"is_boleto","nodes":[{"key":"is_boleto","type":"condition","field":"order.paymentMethod","operator":"equals","value":"boleto","if_true":"wait_1_day"},{"key":"wait_1_day","type":"wait","amount":1,"unit":"days","next":"still_pending"},{"key":"still_pending","type":"condition","field":"order.paymentStatus","operator":"equals","value":"pending","if_true":"remind"},{"key":"remind","type":"send_whatsapp","template_id":"wtp_..."}]},"examples":{"Example":{"title":"Example","value":{"name":"Boleto a pagar","trigger":{"platform":"nuvemshop","event":"order_created"},"start":"is_boleto","nodes":[{"key":"is_boleto","type":"condition","field":"order.paymentMethod","operator":"equals","value":"boleto","if_true":"wait_1_day"},{"key":"wait_1_day","type":"wait","amount":1,"unit":"days","next":"still_pending"},{"key":"still_pending","type":"condition","field":"order.paymentStatus","operator":"equals","value":"pending","if_true":"remind"},{"key":"remind","type":"send_whatsapp","template_id":"wtp_..."}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"52029c1c-6647-46f9-8484-60c23b762649":{"description":"Flow validated or saved as a draft.","content":{"application/json":{"schema":{"type":"object","required":["object","validate_only","status","trigger","outline","warnings","next_step"],"properties":{"object":{"type":"string","const":"flow_draft","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"validate_only":{"type":"boolean","description":"true when the flow was only validated; nothing was saved.","isRequired":true,"uniqueKey":"validate_only","typeLabel":"boolean"},"status":{"type":"string","const":"draft","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"trigger":{"type":"object","required":["platform","event"],"properties":{"platform":{"type":"string","isRequired":true,"uniqueKey":"trigger.platform","typeLabel":"string"},"event":{"type":"string","isRequired":true,"uniqueKey":"trigger.event","typeLabel":"string"}},"isRequired":true,"uniqueKey":"trigger","typeLabel":"object"},"outline":{"type":"array","description":"Flow steps in plain language.","items":{"type":"string","uniqueKey":"outline.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"outline","typeLabel":"string[]"},"warnings":{"type":"array","description":"Non-blocking warnings, such as a WhatsApp template still under review by Meta.","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"Path in the flow description, such as nodes[2].field.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"node_key":{"type":"string","uniqueKey":"warnings.items.[INDEX].node_key","typeLabel":"string"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"warnings","typeLabel":"object[]"},"next_step":{"type":"string","isRequired":true,"uniqueKey":"next_step","typeLabel":"string"},"id":{"type":"string","pattern":"^flw_[A-Za-z0-9_-]+$","uniqueKey":"id","typeLabel":"string"},"revision":{"type":"string","description":"Revision of the saved draft. Send it when activating the flow after review.","uniqueKey":"revision","typeLabel":"string"},"html_url":{"type":"string","format":"uri","description":"Link to the flow in the Bevits editor, for review.","uniqueKey":"html_url","typeLabel":"string\u003curi>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"flow_draft","validate_only":true,"status":"draft","trigger":{"platform":"\u003cstring>","event":"\u003cstring>"},"outline":["\u003cstring>"],"warnings":[{"code":"\u003cstring>","path":"\u003cstring>","message":"\u003cstring>","node_key":"\u003cstring>"}],"next_step":"\u003cstring>","id":"\u003cstring>","revision":"\u003cstring>","html_url":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"5762fa57-4b9c-476f-a111-2a3b6fa783a5":{"description":"Missing request body, a body that is not a JSON object, or an invalid route parameter.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"bfdb135a-a53f-4fc6-ae62-a6e565774720":{"description":"Missing, invalid, expired, or revoked API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"authentication_error","message":"Invalid API key.","request_id":"req_07f6cdc3c20249d6afcd90b4"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"Invalid API key.","request_id":"req_07f6cdc3c20249d6afcd90b4"}}}},"exampleType":"examples"}},"exampleType":"examples"},"6a37129f-224c-42d0-958d-a9ce7073c3e2":{"description":"The API key does not have the write scope.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"type":"permission_denied","message":"This API key does not have the required \"write\" scope.","param":"scope","request_id":"req_07f6cdc3c20249d6afcd90b4"}},"examples":{"Example":{"title":"Example","value":{"error":{"type":"permission_denied","message":"This API key does not have the required \"write\" scope.","param":"scope","request_id":"req_07f6cdc3c20249d6afcd90b4"}}}},"exampleType":"examples"}},"exampleType":"examples"},"5bfcc0fd-a256-4bb3-aae9-77b1fd8e78c9":{"description":"The Idempotency-Key was already used with a different request body.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"b2556acb-f13f-4a3a-a396-40aaa663029f":{"description":"The flow can't be created or activated. The message lists every problem, each with its path, block key, and valid options.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"46a16ab5-ac3b-4079-989b-cc29439258d2":{"description":"Request limit exceeded.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer","minimum":1}},"X-RateLimit-Limit":{"description":"Total limit for the current window.","schema":{"type":"integer","example":600}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":599}},"X-RateLimit-Reset":{"description":"UTC instant when the current window ends.","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"object","required":["retry_after","error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"retry_after":{"type":"integer","minimum":1,"description":"Seconds before retrying.","isRequired":true,"uniqueKey":"retry_after","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"},"retry_after":2}}},"exampleType":"generated"}},"exampleType":"generated"},"024c5c90-88c2-47bb-8ef1-9228dd3e28be":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message","request_id"],"properties":{"type":{"type":"string","enum":["authentication_error","conflict","internal_error","invalid_request","not_found","permission_denied","rate_limited","validation_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","pattern":"^req_[a-f0-9]{24}$","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"authentication_error","message":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1aea7643-c618-42c2-8b79-6923147b244b":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"bvt_live_...","description":"API key created in the organization settings.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"a6ce2384-29d3-47f5-b341-bef8f0319791":{"url":"https://api.bevits.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"bvt_live_...","description":"API key created in the organization settings.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key created in the organization settings.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.en.json"},"subdomain":"bevits","siteName":"Bevits","title":"Create flow as a draft - Bevits","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/pt-BR/overview","matchLevel":4},"en":{"href":"/en/api-reference/automations/create-flow-as-a-draft","matchLevel":0},"es":{"href":"/es/overview","matchLevel":4}}},"lastModified":"2026-11-03T15:14:33.510Z","originalFileLocation":"en/api-reference/automations/create-flow-as-a-draft.mdx","locale":"en"},"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=\"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bevits\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create flow as a draft - Bevits\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bevits\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bevits.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Create+flow+as+a+draft\u0026amp;description=Creates+an+automation+flow+from+a+declarative+description.+The+flow+is+always+saved+as+a+draft+and+sends+nothing+until+it+is+activated.+With+validate_only%2C+it+o\u0026amp;theme=450683dc407bc2b861cf68ca\u0026amp;signature=416ea83e1042a3524b7709a3499cf1d47d8a20ad8483e0c24aa05c61d2cb3b28\">\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 flow as a draft - Bevits\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bevits.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Create+flow+as+a+draft\u0026amp;description=Creates+an+automation+flow+from+a+declarative+description.+The+flow+is+always+saved+as+a+draft+and+sends+nothing+until+it+is+activated.+With+validate_only%2C+it+o\u0026amp;theme=450683dc407bc2b861cf68ca\u0026amp;signature=416ea83e1042a3524b7709a3499cf1d47d8a20ad8483e0c24aa05c61d2cb3b28\">\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/bevits/rUFhj4NY5eY9LDUb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bevits\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F97316\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/automations/create-flow-as-a-draft.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.bevits.com/#organization\",\"name\":\"Bevits\",\"url\":\"https://docs.bevits.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bevits/1nYG20dqbMUuey8F/logo/light.svg?fit=max\u0026auto=format\u0026n=1nYG20dqbMUuey8F\u0026q=85\u0026s=e3888ae21616d4de0a83364106aade8c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.bevits.com#website\",\"name\":\"Bevits\",\"url\":\"https://docs.bevits.com\",\"publisher\":{\"@id\":\"https://docs.bevits.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft#webpage\",\"url\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft\",\"name\":\"Create flow as a draft\",\"description\":\"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\",\"dateModified\":\"2026-11-03T15:14:33.510Z\",\"isPartOf\":{\"@id\":\"https://docs.bevits.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.bevits.com/en/api-reference/system/check-availability\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create flow as a draft\",\"item\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft#apireference\",\"headline\":\"Create flow as a draft\",\"name\":\"Create flow as a draft\",\"description\":\"Creates an automation flow from a declarative description. The flow is always saved as a draft and sends nothing until it is activated. With validate_only, it only validates and returns the outline, saving nothing. Requires an API key with the write scope.\",\"url\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft\",\"mainEntityOfPage\":{\"@id\":\"https://docs.bevits.com/en/api-reference/automations/create-flow-as-a-draft#webpage\"},\"dateModified\":\"2026-11-03T15:14:33.510Z\",\"publisher\":{\"@id\":\"https://docs.bevits.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.bevits.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bevits\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Bevits","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Suporte"}],"primary":{"type":"button","label":"Painel","href":"https://app.bevits.com"}},"pages":[{"title":"pt-BR","href":"/pt-BR/overview"}]},{"language":"en","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.bevits.com"}},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/en/overview"}]},{"tab":"API","groups":[{"group":"Getting started","pages":[{"title":"API overview","icon":"brackets-curly","href":"/en/api-reference/overview"},{"title":"Authentication","icon":"key","href":"/en/api-reference/authentication"},{"title":"MCP server","icon":"plug","href":"/en/api-reference/mcp"},{"title":"AI agents","icon":"sparkles","href":"/en/api-reference/ai-agents"}]},{"group":"Fundamentals","pages":[{"title":"Fundamentals","icon":"code","href":"/en/api-reference/fundamentals"}]},{"group":"Reference","pages":[{"title":"Check availability","deprecated":null,"version":null,"openapi":"/openapi.en.json get /health","href":"/en/api-reference/system/check-availability"},{"title":"Get identity","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/me","href":"/en/api-reference/identity/get-identity"},{"title":"List customers","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers","href":"/en/api-reference/customers/list-customers"},{"title":"Get customer","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers/{customer_id}","href":"/en/api-reference/customers/get-customer"},{"title":"List customer purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/customers/{customer_id}/purchases","href":"/en/api-reference/customers/list-customer-purchases"},{"title":"List segments","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments","href":"/en/api-reference/segments/list-segments"},{"title":"Get segment","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments/{segment_id}","href":"/en/api-reference/segments/get-segment"},{"title":"List segment customers","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/segments/{segment_id}/customers","href":"/en/api-reference/segments/list-segment-customers"},{"title":"List purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases","href":"/en/api-reference/purchases/list-purchases"},{"title":"Aggregate purchases","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases/stats","href":"/en/api-reference/purchases/aggregate-purchases"},{"title":"Get purchase","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/purchases/{purchase_id}","href":"/en/api-reference/purchases/get-purchase"},{"title":"List tags","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/tags","href":"/en/api-reference/crm-data/list-tags"},{"title":"Get tag","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/tags/{tag_id}","href":"/en/api-reference/crm-data/get-tag"},{"title":"List attributes","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/attributes","href":"/en/api-reference/crm-data/list-attributes"},{"title":"List flows","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows","href":"/en/api-reference/automations/list-flows"},{"title":"Get flow","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows/{flow_id}","href":"/en/api-reference/automations/get-flow"},{"title":"Get flow metrics","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flows/{flow_id}/metrics","href":"/en/api-reference/automations/get-flow-metrics"},{"title":"Get flow builder catalog","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/flow-builder/catalog","href":"/en/api-reference/automations/get-flow-builder-catalog"},{"title":"List message templates","description":"Lists the WhatsApp (official and unofficial), email, and SMS templates a flow can send, with a text preview, WhatsApp approval status, and the customer data each variable renders. Use the id as template_id when creating the flow.","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/message-templates","href":"/en/api-reference/automations/list-message-templates"},{"title":"Create flow as a draft","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows","href":"/en/api-reference/automations/create-flow-as-a-draft"},{"title":"Activate flow","description":"Activates a reviewed flow so it starts sending real messages. Requires the revision the person reviewed; if the flow changed after it, the call fails with 409 and returns the current revision. Runs the same checks as the Activate button in the editor. Requires an API key with the write scope.","deprecated":null,"version":null,"openapi":"/openapi.en.json post /v1/flows/{flow_id}/activate","href":"/en/api-reference/automations/activate-flow"},{"title":"List email campaigns","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/email-campaigns","href":"/en/api-reference/campaigns/list-email-campaigns"},{"title":"Get email campaign","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/email-campaigns/{email_campaign_id}","href":"/en/api-reference/campaigns/get-email-campaign"},{"title":"List WhatsApp and SMS campaigns","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/template-campaigns","href":"/en/api-reference/campaigns/list-whatsapp-and-sms-campaigns"},{"title":"Get WhatsApp or SMS campaign","deprecated":null,"version":null,"openapi":"/openapi.en.json get /v1/template-campaigns/{template_campaign_id}","href":"/en/api-reference/campaigns/get-whatsapp-or-sms-campaign"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en/changelog"}]}]},{"language":"es","navbar":{"links":[{"href":"mailto:hey@bevits.com","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://app.bevits.com"}},"pages":[{"title":"es","href":"/es/overview"}]}]},"basePath":"","title":"Create flow as a draft - Bevits","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}