Skip to content
Last updated December 3, 2026

Management API: actions

Changes, each a POST with a JSON object of arguments, for keys with control: write. They go through the same checked path as the web UI — validated, backed up, reloaded — and into the audit trail as api:<key>. Send If-Match with the ETag of an earlier GET to refuse the change if someone else changed the configuration meanwhile (412).

Generated from the tools the API serves (go run ./tools/genapiref). Keys, pages and errors: Management API. The same description as OpenAPI 3.1: GET /control/v1/openapi.json.

POST /control/v1/api-delete — Remove an API Gateway API.

argument type
name string required
answer type
deleted boolean always
name string always

POST /control/v1/api-set — Create an API Gateway API or change one; fields left out stay. Credentials (headers.set, oauth) and private: true are set by people only, and an API carrying credentials keeps its url.

argument type
block list of strings
disabled boolean
forward list of strings
forwarded boolean
methods list of strings
name string required
query keep, drop
retries integer (0–5)
timeout string e.g. 30s
url string absolute http(s) base URL
answer type
changed list of strings always
created boolean always
name string always

POST /control/v1/budget-set — Set budget caps; fields left out stay, 0 removes one. Scope total has no name.

argument type
daily_tokens integer (0–)
daily_usd number (0–)
monthly_tokens integer (0–)
monthly_usd number (0–)
name string
scope total, keys, providers, users, endpoints required
answer type
budgets any always · as the config file has it

POST /control/v1/endpoint-disable — Disable an AI Gateway endpoint: it answers 404 until enabled.

argument type
name string required · the endpoint’s name
answer type
disabled boolean always
name string always

POST /control/v1/endpoint-enable — Enable a disabled AI Gateway endpoint.

argument type
name string required · the endpoint’s name
answer type
disabled boolean always
name string always

POST /control/v1/endpoint-update — Change an endpoint’s model, description, system prompt or template; fields left out stay as they are.

argument type
description string
model string
name string required · the endpoint’s name
system string
template string
answer type
changed list of strings always
name string always

POST /control/v1/key-create — Create a pg_ key and return it once. Restrictions are optional; empty means everything.

argument type
access object what the key may do per “*”, “mcp:server”, “mcp:server/tool” or “api:name”; unset is full
apis list of strings API Gateway APIs
approve off, write, delete hold MCP tool calls that write or delete until a person says yes
control none, read, write
endpoints list of strings
mcp list of strings MCP servers or server/tool
name string required · the key’s name
providers list of strings
users optional, required, ignore
answer type
key string always · the pg_ key, shown once
name string always
note string always

POST /control/v1/key-disable — Revoke a pg_ key; it can be enabled again.

argument type
name string required · the key’s name
answer type
disabled boolean always
name string always

POST /control/v1/key-enable — Enable a revoked pg_ key.

argument type
name string required · the key’s name
answer type
disabled boolean always
name string always

POST /control/v1/key-rotate — Give a pg_ key a new secret, returned once; the old one stops working.

argument type
name string required · the key’s name
answer type
key string always · the new pg_ key, shown once
name string always
note string always

POST /control/v1/limit-remove — Remove a rate limit.

argument type
name string required
scope keys, users, endpoints, models, providers, mcp, apis required
answer type
removed string always

POST /control/v1/limit-set — Set a rate limit, e.g. scope keys, name “*”, requests 60/m.

argument type
burst integer (1–)
name string required · the key, user, endpoint, alias, provider or MCP server (or server/tool); * for all
requests string required · N/period, e.g. 60/m, 1000/h
scope keys, users, endpoints, models, providers, mcp, apis required
answer type
burst integer always
name string always
requests string always
scope string always

POST /control/v1/webhook-redeliver — Queue finished deliveries again, attempts reset: the ids given, or every failed one of a webhook.

argument type
failed_of string a webhook: all its failed deliveries
ids list of integers
answer type
queued integer always

POST /control/v1/webhook-test — Send a signed webhook.test event to a webhook now, outside the queue, and return its answer.

argument type
name string required
answer type
delivered boolean always
error string always
event_id string always
name string always
response string always
status integer always
took_ms integer always
Was this page helpful?