Create a new conversation session for the specified flow. The flow engine begins processing from the Start node and delivers the initial response to the callback URL configured on the API key.
string
required
Your API key (prefixed with wh_).
string
required
The UUID of the flow to start.
Body
object
Initial values for flow variables. Keys must match variable names created in the editor.
Show Example
any
Each key is the variable name and the value can be a string, number, boolean, or object.
curl -X POST https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create \ -H "X-Api-Key: wh_your_api_key"
The flow response is not returned in the HTTP response body. It is delivered asynchronously to the callbackUrl configured on your API key via Webhook.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"whatabot","colors":{"primary":"#00a884","light":"#00d6a3","dark":"#008069"},"logo":{"light":"https://mintcdn.com/whatabot/t6ahHF1XDdOZ2zCX/logo/logo-full.svg?fit=max\u0026auto=format\u0026n=t6ahHF1XDdOZ2zCX\u0026q=85\u0026s=5a7c0e3a1eb3f787c49ca501f731490e","dark":"https://mintcdn.com/whatabot/t6ahHF1XDdOZ2zCX/logo/logo-full.svg?fit=max\u0026auto=format\u0026n=t6ahHF1XDdOZ2zCX\u0026q=85\u0026s=5a7c0e3a1eb3f787c49ca501f731490e"},"favicon":"https://mintcdn.com/whatabot/F0JbbHOI3DWfo3gJ/logo/fav.png?fit=max\u0026auto=format\u0026n=F0JbbHOI3DWfo3gJ\u0026q=85\u0026s=35b03f1a5c3c091ca98c77db697a2d9e","api":{"playground":{},"mdx":{"server":"https://api.whatabot.app/api"}},"background":{},"footer":{"socials":{"website":"https://whatabot.app"}},"search":{"prompt":"Search documentation..."},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/get-started/introduction"},{"language":"pt-BR","href":"get-started/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"whatabot","hasAudioNarration":false,"actualSubdomain":"whatabot","customDomains":["docs.whatabot.app"],"gitSource":{"type":"github","owner":"whatabot-app","repo":"whatabot-doc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94b13e968ff68fad409a0:success","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"pt-BR","tag":"Referência da API","count":27},{"language":"en","tag":"API Reference","count":27},{"language":"pt-BR","tag":"Documentação","count":9},{"language":"en","tag":"Documentation","count":9},{"language":"pt-BR","tag":"Clientes OAuth","count":5},{"language":"en","tag":"OAuth Clients","count":5},{"language":"pt-BR","tag":"Kanban","count":4},{"language":"pt-BR","tag":"Setores","count":4},{"language":"pt-BR","tag":"Sessões","count":4},{"language":"pt-BR","tag":"Espaços de Trabalho","count":4},{"language":"en","tag":"Kanban","count":4},{"language":"en","tag":"Sectors","count":4},{"language":"en","tag":"Sessions","count":4},{"language":"en","tag":"Workspaces","count":4},{"language":"pt-BR","tag":"Visão Geral","count":3},{"language":"pt-BR","tag":"Início","count":3},{"language":"en","tag":"Overview","count":3},{"language":"en","tag":"Get Started","count":3},{"language":"pt-BR","tag":"Fluxos","count":2},{"language":"en","tag":"Flows","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"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},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":":root{--font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace}h1{letter-spacing:-0.02em}h2{letter-spacing:-0.01em}pre{border-radius:8px!important;font-size:13px!important;line-height:1.6!important}code{font-family:var(--font-mono)!important;font-size:0.875em}table{border-collapse:separate;border-spacing:0}th{font-weight:600;text-transform:uppercase;font-size:0.75rem;letter-spacing:0.05em}[role=\"tabpanel\"] table,[role=\"tabpanel\"] p,[role=\"tabpanel\"] code{font-size:0.8125rem!important}[role=\"tabpanel\"] th{font-size:0.6875rem!important}[role=\"tabpanel\"] td{font-size:0.8125rem!important}[role=\"tabpanel\"] pre{font-size:12px!important}"}]}
{"page":{"pagePath":"en/api-reference/sessions/create-session","slug":"/en/api-reference/sessions/create-session","pageMetadata":{"title":"Create Session","api":"POST /v1/sessions/flows/{flowId}/create","description":"Create a new conversation session for a flow.","href":"/en/api-reference/sessions/create-session"},"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 a new conversation session for a flow.\"\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`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,Warning}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a new conversation session for the specified flow. The flow engine begins processing from the `,_jsx(_components.strong,{children:`Start node`}),` and delivers the initial response to the callback URL configured on the API key.`]}),`\n`,_jsx(ParamField,{header:`X-Api-Key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key (prefixed with `,_jsx(_components.code,{children:`wh_`}),`).`]})}),`\n`,_jsx(ParamField,{path:`flowId`,type:`string`,required:true,id:`param-flow-id`,children:_jsx(_components.p,{children:`The UUID of the flow to start.`})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsxs(ParamField,{body:`variables`,type:`object`,id:`param-variables`,children:[_jsx(_components.p,{children:`Initial values for flow variables. Keys must match variable names created in the editor.`}),_jsx(Expandable,{title:`Example`,children:_jsx(ParamField,{body:`variables.{name}`,type:`any`,id:`param-variables-name`,children:_jsx(_components.p,{children:`Each key is the variable name and the value can be a string, number, boolean, or object.`})})})]}),`\n`,`\n`,`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The flow response is not returned in the HTTP response body. It is delivered asynchronously to the `,_jsx(_components.code,{children:`callbackUrl`}),` configured on your API key via `,_jsx(_components.a,{href:`/en/api-reference/webhooks`,children:`Webhook`}),`.`]})})]})}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 Session","api":"POST /v1/sessions/flows/{flowId}/create","description":"Create a new conversation session for a flow.","href":"/en/api-reference/sessions/create-session"}}},"mdxSourceWithNoJs":{"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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a new conversation session for the specified flow. The flow engine begins processing from the `,_jsx(_components.strong,{children:`Start node`}),` and delivers the initial response to the callback URL configured on the API key.`]}),`\n`,_jsx(ParamField,{header:`X-Api-Key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key (prefixed with `,_jsx(_components.code,{children:`wh_`}),`).`]})}),`\n`,_jsx(ParamField,{path:`flowId`,type:`string`,required:true,id:`param-flow-id`,children:_jsx(_components.p,{children:`The UUID of the flow to start.`})}),`\n`,_jsx(Heading,{level:`3`,id:`body`,children:`Body`}),`\n`,_jsxs(ParamField,{body:`variables`,type:`object`,id:`param-variables`,children:[_jsx(_components.p,{children:`Initial values for flow variables. Keys must match variable names created in the editor.`}),_jsx(Expandable,{title:`Example`,children:_jsx(ParamField,{body:`variables.{name}`,type:`any`,id:`param-variables-name`,children:_jsx(_components.p,{children:`Each key is the variable name and the value can be a string, number, boolean, or object.`})})})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Without variables`,numberOfLines:`2`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Api-Key: wh_your_api_key\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`With variables`,numberOfLines:`4`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Api-Key: wh_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"variables\": {\"userName\": \"Claudio\", \"plan\": \"premium\"}}'`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`201`,numberOfLines:`5`,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:`5`,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:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440000\"`}),_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:` \"expiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-01-15T10:30:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The flow response is not returned in the HTTP response body. It is delivered asynchronously to the `,_jsx(_components.code,{children:`callbackUrl`}),` configured on your API key via `,_jsx(_components.a,{href:`/en/api-reference/webhooks`,children:`Webhook`}),`.`]})})]})}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 Session","api":"POST /v1/sessions/flows/{flowId}/create","description":"Create a new conversation session for a flow.","href":"/en/api-reference/sessions/create-session"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Body","slug":"body","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Without variables","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=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-Api-Key: wh_your_api_key\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"With variables","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=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-Api-Key: wh_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\"variables\": {\"userName\": \"Claudio\", \"plan\": \"premium\"}}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201","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=\"5\">\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\"> \"sessionId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"550e8400-e29b-41d4-a716-446655440000\"\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\"> \"expiresAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2025-01-15T10:30:00.000Z\"\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 Session","path":"/v1/sessions/flows/{flowId}/create","method":"post","request":{"security":[],"parameters":{"query":{},"header":{"X-Api-Key":{"schema":[{"type":"string","description":"Your API key (prefixed with `wh_` ).","required":true}]}},"cookie":{},"path":{"flowId":{"schema":[{"type":"string","description":"The UUID of the flow to start.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"variables":[{"type":"object","properties":{"variables.{name}":[{"type":"any","description":"Each key is the variable name and the value can be a string, number, boolean, or object."}]},"description":"Initial values for flow variables. Keys must match variable names created in the editor."}]}}],"examples":{"example":{"value":{"variables":{"variables.{name}":"\u003cany>"}}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"whatabot","siteName":"whatabot","title":"Create Session - whatabot","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/api-reference/sessions/create-session","matchLevel":0},"pt-BR":{"href":"/api-reference/sessions/create-session","matchLevel":1}}},"lastModified":"2026-04-14T22:40:51.229Z","originalFileLocation":"en/api-reference/sessions/create-session.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=\"Create a new conversation session for a flow.\">\u003cmeta data-mint-head name=\"application-name\" content=\"whatabot\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_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/whatabot/kV3XBDF4Fw-Ws-2R/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Session - whatabot\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new conversation session for a flow.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"whatabot\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.whatabot.app/en/api-reference/sessions/create-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://whatabot.mintlify.site/_mintlify/api/og/v2?division=Sessions\u0026amp;title=Create+Session\u0026amp;description=Create+a+new+conversation+session+for+a+flow.\u0026amp;theme=24012fa078ed70c98e03d585\u0026amp;signature=75c043149078090bab4077df5859e48e5e2ea41cac92db1993ef72d66a8e750a\">\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 Session - whatabot\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new conversation session for a flow.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://whatabot.mintlify.site/_mintlify/api/og/v2?division=Sessions\u0026amp;title=Create+Session\u0026amp;description=Create+a+new+conversation+session+for+a+flow.\u0026amp;theme=24012fa078ed70c98e03d585\u0026amp;signature=75c043149078090bab4077df5859e48e5e2ea41cac92db1993ef72d66a8e750a\">\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/whatabot/kV3XBDF4Fw-Ws-2R/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"whatabot\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00a884\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.whatabot.app/en/api-reference/sessions/create-session\">\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/sessions/create-session.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.whatabot.app/en/api-reference/sessions/create-session\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.whatabot.app/api-reference/sessions/create-session\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.whatabot.app/en/api-reference/sessions/create-session\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.whatabot.app/#organization\",\"name\":\"whatabot\",\"url\":\"https://docs.whatabot.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/whatabot/t6ahHF1XDdOZ2zCX/logo/logo-full.svg?fit=max\u0026auto=format\u0026n=t6ahHF1XDdOZ2zCX\u0026q=85\u0026s=5a7c0e3a1eb3f787c49ca501f731490e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.whatabot.app#website\",\"name\":\"whatabot\",\"url\":\"https://docs.whatabot.app\",\"publisher\":{\"@id\":\"https://docs.whatabot.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session#webpage\",\"url\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session\",\"name\":\"Create Session\",\"description\":\"Create a new conversation session for a flow.\",\"dateModified\":\"2026-04-14T22:40:51.229Z\",\"isPartOf\":{\"@id\":\"https://docs.whatabot.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"whatabot\",\"item\":\"https://docs.whatabot.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Session\",\"item\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session#apireference\",\"headline\":\"Create Session\",\"name\":\"Create Session\",\"description\":\"Create a new conversation session for a flow.\",\"url\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.whatabot.app/en/api-reference/sessions/create-session#webpage\"},\"dateModified\":\"2026-04-14T22:40:51.229Z\",\"publisher\":{\"@id\":\"https://docs.whatabot.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.whatabot.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"whatabot\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"whatabot\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/api-reference/sessions/create-session.md","siteName":"whatabot","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/en/get-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Overview","href":"/en/api-reference/overview"},{"title":"Authentication","href":"/en/api-reference/authentication"},{"title":"Webhooks","description":"Receive real-time notifications when your flow sends messages or performs actions.","href":"/en/api-reference/webhooks"}]},{"group":"Sessions","pages":[{"title":"Create Session","api":"POST /v1/sessions/flows/{flowId}/create","href":"/en/api-reference/sessions/create-session"},{"title":"Send Message","api":"POST /v1/sessions/{sessionId}/message","description":"Send a message into an active session.","href":"/en/api-reference/sessions/send-message"},{"title":"List Session Logs","api":"GET /v1/sessions/logs","href":"/en/api-reference/sessions/list-session-logs"},{"title":"Get Session Events","api":"GET /v1/sessions/logs/{sessionId}/events","href":"/en/api-reference/sessions/get-session-events"}]},{"group":"Flows","pages":[{"title":"Create Flow","api":"POST /v1/flows","href":"/en/api-reference/flows/create-flow"},{"title":"List Flows","api":"GET /v1/flows","href":"/en/api-reference/flows/list-flows"}]},{"group":"Workspaces","pages":[{"title":"Create Workspace","api":"POST /v1/workspaces","href":"/en/api-reference/workspaces/create-workspace"},{"title":"List Workspaces","api":"GET /v1/workspaces","href":"/en/api-reference/workspaces/list-workspaces"},{"title":"Update Workspace","api":"PATCH /v1/workspaces/{workspaceId}","href":"/en/api-reference/workspaces/update-workspace"},{"title":"Delete Workspace","api":"DELETE /v1/workspaces/{workspaceId}","href":"/en/api-reference/workspaces/delete-workspace"}]},{"group":"Sectors","pages":[{"title":"Create Sector","api":"POST /v1/sectors","href":"/en/api-reference/sectors/create-sector"},{"title":"List Sectors","api":"GET /v1/sectors","href":"/en/api-reference/sectors/list-sectors"},{"title":"Update Sector","api":"PATCH /v1/sectors/{id}","href":"/en/api-reference/sectors/update-sector"},{"title":"Delete Sector","api":"DELETE /v1/sectors/{id}","href":"/en/api-reference/sectors/delete-sector"}]},{"group":"OAuth Clients","pages":[{"title":"Create Client","api":"POST /v1/clients","href":"/en/api-reference/clients/create-client"},{"title":"List Clients","api":"GET /v1/clients","href":"/en/api-reference/clients/list-clients"},{"title":"Get Client","api":"GET /v1/clients/{id}","href":"/en/api-reference/clients/get-client"},{"title":"Update Client","api":"PATCH /v1/clients/{id}","href":"/en/api-reference/clients/update-client"},{"title":"Delete Client","api":"DELETE /v1/clients/{id}","href":"/en/api-reference/clients/delete-client"}]},{"group":"Kanban","pages":[{"title":"List Pipelines","api":"GET /v1/kanban/pipelines","href":"/en/api-reference/kanban/list-pipelines"},{"title":"List Cards","api":"GET /v1/kanban/pipelines/{pipelineId}/cards","href":"/en/api-reference/kanban/list-cards"},{"title":"Create Card","api":"POST /v1/kanban/pipelines/{pipelineId}/cards","href":"/en/api-reference/kanban/create-card"},{"title":"Update Card","api":"PATCH /v1/kanban/cards/{id}","href":"/en/api-reference/kanban/update-card"}]},{"group":"Iframe","pages":[{"title":"Generate Iframe Token","api":"POST /v1/auth/iframe-token","href":"/en/api-reference/auth/generate-iframe-token"}]}]}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/api-reference/sessions/create-session"}]}]},"basePath":"","title":"Create Session - whatabot","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-B8kPdtB2.js","snippetPresets-C-p1aFQ1.js","utils-B9NnUZSZ.js","style-to-object-BY3JEAdk.js","utils-DFxl7cW2.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-bSr9h7OB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bw4Gcy_r.js","_Uint8Array-C68x8Gny.js","isObject-FP1Yky1u.js","ApiExamples-BXsp8PHs.js","usePlaygroundInputsStore-BlAOLmIF.js","shallow-C2F02mqa.js","isEqual-C8iG4q2G.js","CodeSnippets-45lHR04X.js","CodeSnippet-6Cemznl-.js","use-playground-group-access-Cyy8SXp5.js","Page-CeZ_ZB5X.js","api-description-markdown-DiOdv5rp.js","DynamicMarkdown-B_9ywLDq.js","SectionHeading-Cc2r-uqU.js","MethodPill-Df3Tcu4c.js","getPastedJson-B3vrV0wE.js","Check2Icon-YQhSFafd.js","axios-CsQoIw0U.js"]}