Build a full REST-API with n8n webhooks

Go to Workflow
15 views
Built by Christian Knoflach Christian Knoflach
Created on June 19, 2026

Description

What is it?
A clean, extensible REST-style API routing template for n8n webhooks with up to 3 path levels.

How does it work?
Serves API routes via Webhooks with path variables

Normalizes incoming requests into "global" _REQUEST and _CFG nodes

Flexible routing with Switch-nodes based on path segments & request method

Key features
No setup required
Supports multiple HTTP methods
Global config via code node
Separation of concern between config/request and implementation data flow
Easy to extend

Use cases
Prototyping backend APIs via JSON-responses
Serving interactive websites via HTML-nodes + TEXT responses

Nodes Used (1)

Code
n8n-nodes-base.code