from fastapi import APIRouter, Depends, HTTPException router = APIRouter() @router.post("/new-endpoint") async def new_endpoint_handler(text: str): """Echo text parameter""" return { "message": "Text received successfully", "data": { "text": text } }