Next.js App Router API route returns 404 on Vercel despite being detected in resources

Problem

Next.js App Router API route returns 404 in production even though the function exists in Vercel.

Environment

  • Framework: Next.js (App Router)
  • Platform: Vercel
  • Branch: main
  • Deployment Status: Ready (successful build)

API Route Configuration

Location: app/api/mt5/webhook/route.ts

export async function POST(req: Request) {
  return Response.json({ success: true })
}

In Vercel → Deployment → Resources, I can see the function listed as /api/mt5/webhook, so Vercel detects it correctly.

Current Behavior

When I visit: https://vo-belly-swiss-warzone-4159.vercel.app/api/mt5/webhook

I get:

404: NOT_FOUND

Additional Details

  • No logs appear for this route in Vercel Logs
  • Other routes like /dashboard work correctly
  • Build command is default (Next.js preset)
  • Root directory is empty (project root)
  • Deployment status is Ready (Latest)

Questions

  1. Why would an App Router API route appear in Resources but still return 404?
  2. Could there be a routing conflict between app/api and pages/api?
  3. Could this be related to build output configuration?
  4. Is there something required in route.ts besides exporting POST?
  5. Could this be related to Edge vs Node runtime configuration?

I’ve double-checked everything and the deployment is marked as Ready.

Any help would be greatly appreciated.

Thank you.