API Overview
Introduction
The KnoxCall REST API gives you full programmatic control over your API gateway configuration. You can manage routes, secrets, clients, environments, webhooks, and API keys — everything available in the dashboard, accessible through a clean, predictable interface. All API endpoints return JSON and follow consistent conventions for authentication, pagination, error handling, and response structure.This API is for managing your KnoxCall configuration. To call the routes you’ve configured, send traffic to your tenant proxy URL (e.g.,
https://{your-slug}.knoxcall.com/{your-route}, or https://sandbox-{your-slug}.knoxcall.com/{your-route} in sandbox).Base URLs
Production
kc_live_ OAuth token, or a production API key (tk_ / AKE prefixed).Sandbox
kc_test_ tokens or tk_test_ keys) only. Data is isolated from production.Authentication
Every request to the KnoxCall API must be authenticated. For new integrations we recommend one of the first-party SDKs — they handle OAuth 2.1 token minting, caching, refresh, and DPoP for you:$TOKEN from this mint:
API keys are scoped per tenant and can be created in the KnoxCall Dashboard or via the API Keys endpoint.
For OAuth grant types, CLI login (
knoxcall login), workload identity federation, key types, and security best practices, see the Authentication guide.
Response Format
Every response from the KnoxCall API follows a consistent JSON structure.Successful Response (Single Resource)
Successful Response (List)
Error Response
Every error on/v1 returns the same canonical envelope — a single error object with a machine-readable type, a human-readable message, and a bare-UUID request_id:
The
request_id is a bare UUID (for example 550e8400-e29b-41d4-a716-446655440000) — it is not prefixed with req_. The same value is returned on every response (success or error) in the X-Request-Id header, so you can correlate a log line even when you never parsed the body. Quote it when contacting support and we can trace the exact request through our systems.error.type, and correlation guidance, see the Errors reference.
Pagination
List endpoints support pagination via query parameters:meta object contains the total count and page information so you can build pagination controls:
Depth limit
Pagination is offset-based, and the server will not skip more than 100,000 rows.page is clamped to floor(100000 / per_page) + 1 — 1,001 pages at the
maximum per_page of 100 — and total_pages is capped at the same value, so a
loop that walks until page >= total_pages always terminates.
meta.page is the effective page and always matches the rows you got back;
if you ask for a deeper one you receive the last reachable page, not an error.
meta.total keeps reporting the true row count, so when total is larger than
total_pages × per_page you are past the depth limit. Narrow the result set with
a filter — a date range, a status, a resource id — rather than paging further.
Rate Limiting
API requests are rate-limited per API key, enforced consistently across all API workers. When you exceed the limit you receive a429 response with the rate_limit_exceeded error type.
Rate-limit headers are returned on every response for which a limit is configured — not only on 429s — so you can track your remaining budget as you go:
See the Rate limits reference for backoff guidance and worked examples.
Error Types
All errors return a consistent structure with atype field that you can use for programmatic error handling.
For
validation_error responses, the message field contains a human-readable description of which field failed validation and why. Validation failures are always 400 — the only 422 on the API is idempotency_key_reuse (see Idempotency).invalid_idempotency_key (400), request_in_progress (409), and idempotency_key_reuse (422). The complete type→status table, including these, lives in the Errors reference.
Quick Examples
List all routes
Create a secret
Delete a client
What’s Next?
Authentication
OAuth 2.1 + DPoP, CLI login, API key types, and security best practices.
Routes
Create and manage your API proxy routes.
Secrets
Store and inject sensitive credentials into your routes.
Clients
Control who can access your routes with API clients.