API Management

Set up a basic gateway - Editor

API Gateway tutorialLocal with an editorStep 1 of 5

Create a project and test a request through Zuplo to a sample backend. This is the starting point for the API Gateway tutorial.

In this tutorial we'll set up a simple gateway using Zuplo's local development, powered by the Zuplo CLI. We'll use the default project template, which ships with a working todo API.

Requirements

Create and test your gateway

  1. Create your project

    Create a new project with create-zuplo-api:

    TerminalCode
    npx create-zuplo-api@latest

    The CLI walks you through a few prompts. First, name your project:

    TerminalCode
    ✔ What is your project named? … example-project

    Next, the CLI offers to create a matching project on the Zuplo Portal. Answer Yes — this opens your browser to sign in (or create a free account) and creates a Zuplo project to pair with your local one. If you already have an account, you'll be asked which one to use.

    TerminalCode
    ? Create a matching project on portal.zuplo.com? › No / Yes

    Creating the matching project automatically links your local project to Zuplo, so features like API keys work in later steps without any extra setup.

    Finally, select any AI coding agents you'd like to configure, or choose None:

    TerminalCode
    ? Which AI coding agents would you like to configure? › - Space to select. Return to submit ◯ Claude Code - CLAUDE.md, .claude/, .mcp.json ◯ GitHub Copilot ◯ Cursor ◯ Windsurf ◯ OpenAI Codex ◯ None
  2. Start your local gateway

    Change into your new project directory and start the development server:

    TerminalCode
    cd example-project npm run dev

    The terminal prints links to your local gateway, Route Designer, and a local Docs Server:

    TerminalCode
    Started local development setup Ctrl+C to exit 🚀 Zuplo Gateway: http://localhost:9000 📘 Route Designer: http://localhost:9100 📄 Docs Server: http://localhost:9200 ⚙️ Loaded env files: - .env.zuplo
  3. Explore your API

    The default template ships with a working todo API — four routes (GET /todos, POST /todos, PUT /todos/{id}, DELETE /todos/{id}) defined in config/routes.oas.json.

    Open the local Route Designer at http://localhost:9100 — you can also click the link printed in the terminal — to see the routes. Select Get all todos to inspect how it's configured; you can change the path, method, request handler, and add policies from here.

  4. Test the API

    Test the Get all todos route by clicking the Test button next to the Path field in the Route Designer.

    You can also call it directly with your favorite HTTP client (for example Postman, HTTPie, or curl):

    TerminalCode
    curl http://localhost:9000/todos

    You should receive a 200 OK response with a JSON list of todos. Your gateway is now serving traffic locally.