Next

How to solve async params TypeScript errors in Next.js 16 API routes?

November 28, 2025

download ready
Thank You
Your submission has been received.
We will be in touch and contact you soon!

Dynamic params are now Promises; type as { params: Promise<{ id: string }> } and await params to resolve TS complaints.

Example:

Code

// app/api/[id]/route.ts
export async function GET(
  _req: Request,
  { params }: { params: Promise<{ id: string }> }
) {
  const { id } = await params;
  return Response.json({ id });
}
      
Hire Now!

Need Help with Next Development ?

Work with our skilled next developers to accelerate your project and boost its performance.
**Hire now**Hire Now**Hire Now**Hire now**Hire now

How to solve async params TypeScript errors in Next.js 16 API routes?

Dynamic params are now Promises; type as { params: Promise<{ id: string }> } and await params to resolve TS complaints.

Example:

Code

// app/api/[id]/route.ts
export async function GET(
  _req: Request,
  { params }: { params: Promise<{ id: string }> }
) {
  const { id } = await params;
  return Response.json({ id });
}