> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whatabot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Session

> Create a new conversation session for a flow.

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.

<ParamField header="X-Api-Key" type="string" required>
  Your API key (prefixed with `wh_`).
</ParamField>

<ParamField path="flowId" type="string" required>
  The UUID of the flow to start.
</ParamField>

### Body

<ParamField body="variables" type="object">
  Initial values for flow variables. Keys must match variable names created in the editor.

  <Expandable title="Example">
    <ParamField body="variables.{name}" type="any">
      Each key is the variable name and the value can be a string, number, boolean, or object.
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash Without variables theme={null}
  curl -X POST https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create \
    -H "X-Api-Key: wh_your_api_key"
  ```

  ```bash With variables theme={null}
  curl -X POST https://api.whatabot.app/api/v1/sessions/flows/{flowId}/create \
    -H "X-Api-Key: wh_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{"variables": {"userName": "Claudio", "plan": "premium"}}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "status": "active",
    "expiresAt": "2025-01-15T10:30:00.000Z"
  }
  ```
</ResponseExample>

<Warning>
  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](/en/api-reference/webhooks).
</Warning>
