Common Route Patterns
Production-ready examples of common route configurations. Copy, adapt, and deploy.Payment APIs
Stripe Payment Processing
Use case: Process payments securely without exposing Stripe API key Configuration:- Client never sees Stripe key
- Environment-specific keys (test/live)
- Full Stripe API access through proxy
PayPal Payments
Use case: PayPal checkout integration Configuration:Email Services
SendGrid Transactional Email
Use case: Send emails without exposing SendGrid API key Configuration:Dynamic placeholders in body and header templates use the
{{var:NAME}} form, where NAME is read from the request’s query-string parameters. Pass these values as query params (as shown above), not in the request body.Mailgun Email
Use case: Alternative email service Configuration:api:YOUR_KEY)
SMS/Communication
Twilio SMS
Use case: Send SMS messages Configuration:Webhooks
Receiving Stripe Webhooks
Use case: Receive webhook events from Stripe Configuration:There is no
{{client_ip}} template helper. The proxy strips reverse-proxy headers such as X-Forwarded-For from the request before forwarding it upstream, so the client IP is not passed through to your backend.Receiving Shopify Webhooks
Use case: E-commerce webhook notifications Configuration:There is no
{{header:...}} template helper. Incoming request headers that aren’t KnoxCall- or proxy-specific (such as X-Shopify-Hmac-SHA256, X-Shopify-Topic, and X-Shopify-Shop-Domain) are forwarded to your upstream automatically — you don’t need to re-declare them here.Sending Webhooks to Partners
Use case: Notify partner systems of events Configuration:KnoxCall does not generate timestamps or HMAC signatures for you. Compute these values on the client and pass them as query-string parameters (
?timestamp=...&hmac_signature=...); the {{var:NAME}} placeholders read directly from the request query string.Database / Data APIs
PostgreSQL REST API
Use case: Query database through HTTP API Configuration:GraphQL API
Use case: GraphQL backend proxy Configuration:Cloud Storage
AWS S3 Signed URLs
Use case: Generate pre-signed URLs for S3 uploads Configuration:- Generates signed URL using AWS credentials
- Returns URL to client
- Client uploads directly to S3
Google Cloud Storage
Use case: Upload files to Google Cloud Configuration:Printing Services
PrintNode Cloud Printing
Use case: Send print jobs to remote printers Configuration:Authentication / OAuth
Auth0 Authentication
Use case: User authentication proxy Configuration:Google OAuth Token Exchange
Use case: Exchange authorization code for tokens Configuration:Microservices Architecture
Service-to-Service Communication
Use case: Multiple internal services Routes:- Centralized authentication
- Unified logging
- Rate limiting across services
- Easy service discovery
Third-Party Integrations
HubSpot CRM
Use case: Sync customer data Configuration:Salesforce API
Use case: CRM integration Configuration:Slack Webhooks
Use case: Send notifications to Slack Configuration:Testing & Development
Mock API for Development
Use case: Test against mock data Configuration:Webhook Testing
Use case: Test webhooks with webhook.site Configuration:Multi-Environment Patterns
Pattern: Development → Staging → Production
Route:api-proxy
Base (Production):
Security Patterns
API Key Rotation Without Downtime
Setup two routes:- Create api-v2 with new key
- Update clients gradually to use api-v2
- Monitor api-v1 traffic
- When api-v1 traffic = 0, delete it
Multi-Layer Security
Route:sensitive-api
Security layers:
- IP whitelist - Only production servers
- API key - KnoxCall authentication
- Request signing - HMAC signatures
- Rate limiting - 100 req/min
- Secret injection - Backend API key
Best Practices
✅ Do
-
Use environment-specific secrets
-
Document route purpose
-
Start simple, add complexity
-
Test in staging first
-
Use descriptive names
❌ Don’t
-
Don’t hardcode secrets
-
Don’t use production keys in dev
-
Don’t skip IP authorization for prod
Quick Reference
Next Steps
What are Routes?
Route basics and concepts
Creating Routes
Step-by-step route creation
Using Secrets
Secret injection in routes
Advanced Configuration
Advanced route features
Pro Tip: Copy these examples as starting points, then customize for your specific needs. Test in staging before deploying to production!