Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt

Use this file to discover all available pages before exploring further.

List Route Environments

GET /v1/routes/:id/environments
Returns all environment-specific configuration overrides for a route.

Path Parameters

ParameterTypeDescription
iduuidThe route ID

Response

{
  "data": [
    {
      "environment_name": "staging",
      "target_base_url": "https://api-staging.stripe.com/v1",
      "inject_headers_json": {},
      "inject_body_json": {},
      "require_signature": false,
      "signature_tolerance_sec": null,
      "rate_limit_enabled": false,
      "rate_limit_requests": null,
      "rate_limit_window_sec": null,
      "rate_limit_burst": null,
      "allowed_methods": null
    }
  ],
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}

Errors

StatusTypeDescription
404not_foundRoute not found

Set Route Environment Override

PUT /v1/routes/:id/environments/:env
Creates or replaces the environment-specific configuration for a route. This lets you point the same route at a different upstream URL, inject different headers, or apply different rate limits per environment.

Path Parameters

ParameterTypeDescription
iduuidThe route ID
envstringEnvironment name (e.g., staging, development)

Request Body

All fields are optional. Only provided fields will override the base route configuration for this environment.
FieldTypeDescription
target_base_urlstringOverride upstream URL
inject_headers_jsonobjectOverride injected headers
inject_body_jsonobjectOverride injected body fields
require_signaturebooleanOverride signature requirement
signature_tolerance_secnumberOverride signature tolerance
rate_limit_enabledbooleanOverride rate limiting
rate_limit_requestsnumberOverride max requests
rate_limit_window_secnumberOverride window duration
rate_limit_burstnumberOverride burst allowance
allowed_methodsstring[]Override allowed HTTP methods

Response

Returns the environment config object.

Errors

StatusTypeDescription
400validation_errorInvalid environment name
404not_foundRoute not found

Delete Route Environment Override

DELETE /v1/routes/:id/environments/:env
Removes the environment-specific override, reverting the route to its base configuration for that environment.

Path Parameters

ParameterTypeDescription
iduuidThe route ID
envstringEnvironment name

Response

{
  "data": { "deleted": true },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}

Errors

StatusTypeDescription
404not_foundRoute or environment config not found