Update Gateway
Partially update an AI Gateway — every field is optional.
curl --request PATCH \
--url https://api.knoxcall.com/v1/ai-gateway/gateways/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"budget_monthly_usd": 1000,
"geo_velocity_action": "block"
}
'import requests
url = "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}"
payload = {
"budget_monthly_usd": 1000,
"geo_velocity_action": "block"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({budget_monthly_usd: 1000, geo_velocity_action: 'block'})
};
fetch('https://api.knoxcall.com/v1/ai-gateway/gateways/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'budget_monthly_usd' => 1000,
'geo_velocity_action' => 'block'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}"
payload := strings.NewReader("{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.knoxcall.com/v1/ai-gateway/gateways/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.knoxcall.com/v1/ai-gateway/gateways/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}"
response = http.request(request)
puts response.read_bodystatus to paused stops the gateway’s traffic: an agent under a paused
gateway is refused with 503 gateway_not_active on /v1/ai, and with JSON-RPC
-32603 on /v1/mcp. That has been true on both planes since 2026-08-27 — the
MCP plane previously kept serving.
PATCH /admin/ai-gateway/{gatewayId}, session-authenticated with an X-Tenant-ID header and an
owner/admin role. That is what the dashboard itself calls. Prefer the /v1
operation above for anything you write: it is the surface the five SDKs, the
Postman collection and this spec cover.Authorizations
OAuth 2.1 authentication — recommended for new integrations. Access tokens
(kc_ prefix) are minted at the root-host token endpoint
https://api.knoxcall.com/oauth/token and passed as Authorization: Bearer <access_token>.
Public clients must use PKCE with the authorization_code grant; confidential
clients may use client_credentials. The first-party SDKs and the
knoxcall login CLI handle token minting, caching, refresh, and DPoP for you.
Path Parameters
The AI gateway UUID.
Body
Only the provided fields are changed.
What happens when the gateway's cap is spent (AIGW-150). Defaults to block. No fallback — that action swaps an agent's route and model, which a gateway does not have.
block, warn off, warn, block Model aliases shared by every agent under this gateway (AIGW-42): {alias: real_model_id}. Name fast once here rather than in every call site of every service.
Resolved BEFORE the per-agent model policy, so an alias target is still subject to that agent's allow/deny list and model_rewrite — an alias is a naming convenience, never a way around a control. A chain resolves with a hop limit; a cycle degrades to the original model rather than looping. Max 100 entries.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.knoxcall.com/v1/ai-gateway/gateways/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"budget_monthly_usd": 1000,
"geo_velocity_action": "block"
}
'import requests
url = "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}"
payload = {
"budget_monthly_usd": 1000,
"geo_velocity_action": "block"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({budget_monthly_usd: 1000, geo_velocity_action: 'block'})
};
fetch('https://api.knoxcall.com/v1/ai-gateway/gateways/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'budget_monthly_usd' => 1000,
'geo_velocity_action' => 'block'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.knoxcall.com/v1/ai-gateway/gateways/{id}"
payload := strings.NewReader("{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.knoxcall.com/v1/ai-gateway/gateways/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.knoxcall.com/v1/ai-gateway/gateways/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"budget_monthly_usd\": 1000,\n \"geo_velocity_action\": \"block\"\n}"
response = http.request(request)
puts response.read_body