Environment URLs
Production is the default in public examples. Select QA when validating a release or partner
integration before Production. Local is for the development stack only.
Configure a client
Keep environment selection outside source code. SetAIRCTRL_API_URL, AIRCTRL_API_ORIGIN, and
AIRCTRL_WEB_URL from one row of the table above and store them in that environment’s deployment
configuration. Do not combine values from different rows.
Use AIRCTRL_API_URL for raw /v1 REST calls. createClient, gateway URL builders, OAuth discovery,
and OAuthPartnerClient use AIRCTRL_API_ORIGIN; the OAuth partner client also needs
AIRCTRL_WEB_URL for browser authorization.
OAuth registration per environment
Create a separate OAuth App in each environment. Register the callback URI independently and store the environment’s Client ID and one-time client secret in separate secret-manager entries. The partner may use the same callback route, but the authorization request, issuer validation, token endpoint, and stored tokens must all come from one discovery document. Never let a QA fallback silently call Production. Fail closed when the selected environment is missing its own base URLs or credentials.API Reference selector
The generated API Reference exposes Production first and QA second in Mintlify’s native server selector. The selection updates operation URLs and generated request examples from the OpenAPIservers contract. Local is intentionally absent because Mintlify’s hosted API playground cannot
reach a developer’s localhost. Authentication material must still belong to the selected environment.