langflow-ai/langflow · error · HTTPException

Request body is empty. You should provide a JSON payload con

Error message

Request body is empty. You should provide a JSON payload containing the flow ID.

What it means

Error "Request body is empty. You should provide a JSON payload containing the flow ID." thrown in langflow-ai/langflow.

Source

Thrown at src/backend/base/langflow/api/v1/endpoints.py:1041

    await ensure_flow_permission(
        webhook_user,
        FlowAction.EXECUTE,
        flow_id=flow.id,
        flow_user_id=flow.user_id,
        workspace_id=flow.workspace_id,
        folder_id=flow.folder_id,
    )

    try:
        data = await request.body()
    except Exception as exc:
        error_msg = str(exc)
        raise HTTPException(status_code=500, detail=error_msg) from exc

    if not data:
        error_msg = "Request body is empty. You should provide a JSON payload containing the flow ID."
        raise HTTPException(status_code=400, detail=error_msg)

    raise_if_hitl_unsupported(flow.data or {})

    try:
        # get all webhook components in the flow
        webhook_components = get_all_webhook_components_in_flow(flow.data)
        tweaks = {}

        for component in webhook_components:
            tweaks[component["id"]] = {"data": data.decode() if isinstance(data, bytes) else data}
        input_request = SimplifiedAPIRequest(
            input_value="",
            input_type="chat",
            output_type="chat",
            tweaks=tweaks,
            session_id=None,
        )

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Send a JSON request body containing the flow id, e.g. {"id": "<flow-uuid>"}.
  2. Ensure the Content-Type header is application/json.

When it happens

Trigger: Occurs when a POST request to the endpoint arrives with an empty body; a JSON payload containing the flow ID is required.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/57c20ac72b67c5c1. Report an issue: GitHub.