Skip to main content

What are Routes?

A route is a smart proxy that forwards API requests from your clients to your backend services. Think of it as a secure middleman that adds security, monitoring, and control.

The Basic Concept

Your Client → KnoxCall Route → Your Backend API
Instead of calling your backend directly, clients call KnoxCall. KnoxCall validates the request, applies security rules, injects secrets, logs everything, then forwards to your backend.

Why Use Routes?

Routes solve common API problems: Hide backend URLs - Clients don’t know your real backend URLs ✅ Centralize credentials - API keys stored securely, not in code ✅ Monitor everything - Log all requests and responses ✅ Add security - Rate limiting, IP whitelisting, signatures ✅ Manage environments - Different configs for dev/staging/prod

How It Works

Step 1: Client makes request
curl https://YOUR-SUBDOMAIN.knoxcall.com/api/users \
  -H "x-knoxcall-route: my-route" \
  -H "x-knoxcall-key: YOUR_API_KEY"
Step 2: KnoxCall processes
  • Validates API key or IP address
  • Checks permissions
  • Injects secrets (like API keys)
  • Applies rate limits
Step 3: Forwards to backend
GET https://your-backend.com/api/users
Authorization: Bearer SECRET_FROM_VAULT
Step 4: Returns response
  • Logs request and response
  • Triggers alerts if needed
  • Returns to client

Required Headers

Every request needs:
x-knoxcall-route: YOUR_ROUTE_NAME
And either:
x-knoxcall-key: YOUR_API_KEY    # API key auth
# OR
# Your IP whitelisted              # IP-based auth

URL Structure

https://SUBDOMAIN.TENANT.knoxcall.com/your/api/path
        ^^^^^^^^^ ^^^^^^
        hash      name
  • Subdomain: Identifies your tenant (shown in dashboard)
  • Path: Passed through to backend unchanged

Common Use Cases

Webhook Forwarding

Stripe Webhook → KnoxCall → Your Server
- Log every webhook
- Verify signatures
- Retry on failure

API Proxy

Mobile App → KnoxCall → Backend API
- Hide backend URL
- Manage API keys securely
- Monitor usage

Microservices

Frontend → KnoxCall → {
  /users → User Service
  /orders → Order Service
  /payments → Payment Service
}

Quick Example

1. Create a route:
  • Name: my-api
  • Target: https://api.example.com
2. Make a request:
curl https://a1b2c3d4.acme.knoxcall.com/users \
  -H "x-knoxcall-route: my-api" \
  -H "x-knoxcall-key: tk_abc123..."
3. KnoxCall forwards to:
https://api.example.com/users
That’s it! Your route is working.

What’s Next?


Keep it simple: Start with a basic route, then add advanced features as needed.