pub struct AdminConfigApi { /* private fields */ }Expand description
Platform configuration: pricing, plans, feature flags, rate limits, runtime
Implementations§
Source§impl AdminConfigApi
impl AdminConfigApi
Sourcepub async fn create_admin_spec_package_stripe_price(
&self,
package_id: &str,
) -> Result<Map<String, Value>>
pub async fn create_admin_spec_package_stripe_price( &self, package_id: &str, ) -> Result<Map<String, Value>>
Create the Stripe product and price for a package
Creates the product and price in Stripe and persists the resulting price id onto the
package. Until this has run, the package cannot be bought: POST /api/v1/billing/spec-packages/{packageId}/checkout-session answers 400 and says so.
POST /api/v1/admin/config/spec-packages/{packageId}/stripe-price
Required scopes: admin.
Sourcepub async fn create_plan_stripe_price(
&self,
plan_id: &PlanLLMLimitsTierAccessItem,
body: &CreatePlanStripePriceRequest,
) -> Result<CreatePlanStripePriceResponse>
pub async fn create_plan_stripe_price( &self, plan_id: &PlanLLMLimitsTierAccessItem, body: &CreatePlanStripePriceRequest, ) -> Result<CreatePlanStripePriceResponse>
Create Stripe Product+Price for plan
POST /api/v1/admin/config/plans/{planId}/stripe-price
Required scopes: admin.
Sourcepub async fn delete_custom_plan(
&self,
plan_id: &str,
params: &DeleteCustomPlanParams,
) -> Result<DeleteCustomPlanResponse>
pub async fn delete_custom_plan( &self, plan_id: &str, params: &DeleteCustomPlanParams, ) -> Result<DeleteCustomPlanResponse>
Remove a custom plan
Refuses while tenants are assigned to the plan. The answer is 409 naming how many, and
the caller opts in with ?force=1 — an exact string match, so ?force=true does NOT force.
Deleting a plan out from under its tenants leaves them on an id that no longer resolves,
which is why the guard is there.
The count in the message is a floor, not a census: it is what the tenant scan saw at that moment.
DELETE /api/v1/admin/config/custom-plans/{planId}
Required scopes: admin.
Sourcepub async fn delete_model_pricing_override(
&self,
model_ref: &str,
) -> Result<DeleteModelPricingOverrideResponse>
pub async fn delete_model_pricing_override( &self, model_ref: &str, ) -> Result<DeleteModelPricingOverrideResponse>
Drop the price override for one model
Removes the override so the model bills at its catalogue rate again. The 404 is keyed on the OVERRIDE map, not the model catalogue: deleting an override that was never set is 404 even for a model that exists.
DELETE /api/v1/admin/config/model-pricing/{modelRef}
Required scopes: admin.
Sourcepub async fn delete_promo_code(
&self,
code: &str,
) -> Result<DeletePromoCodeResponse>
pub async fn delete_promo_code( &self, code: &str, ) -> Result<DeletePromoCodeResponse>
Remove a promo code
Removes the code only. Redemption and reward records already written against it are NOT cascaded — they remain, keyed by the code string, so a code deleted and later re-created inherits the history of its name.
DELETE /api/v1/admin/config/promo-codes/{code}
Required scopes: admin.
Sourcepub async fn export(&self) -> Result<ExportAdminConfigResponse>
pub async fn export(&self) -> Result<ExportAdminConfigResponse>
Bulk download of every admin-config KV override
GET /api/v1/admin/config/export
Required scopes: admin.
Sourcepub async fn get_admin_agent_memory_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_agent_memory_config(&self) -> Result<Map<String, Value>>
Get agent memory overrides (decay, models, embedding dims)
GET /api/v1/admin/config/agent-memory
Required scopes: admin.
Sourcepub async fn get_admin_auth_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_auth_config(&self) -> Result<Map<String, Value>>
Get auth runtime overrides (super-admin email, OTP/JWKS TTLs)
GET /api/v1/admin/config/auth
Required scopes: admin.
Sourcepub async fn get_admin_backpressure_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_backpressure_config(&self) -> Result<Map<String, Value>>
Get backpressure overrides (SSE buffers + tool queue watermarks)
GET /api/v1/admin/config/backpressure
Required scopes: admin.
Sourcepub async fn get_admin_code_interpreter_config(
&self,
) -> Result<Map<String, Value>>
pub async fn get_admin_code_interpreter_config( &self, ) -> Result<Map<String, Value>>
Get code-interpreter overrides (isolation, timeout, memory)
GET /api/v1/admin/config/code-interpreter
Required scopes: admin.
Sourcepub async fn get_admin_disabled_tools(
&self,
) -> Result<GetAdminDisabledToolsResponse>
pub async fn get_admin_disabled_tools( &self, ) -> Result<GetAdminDisabledToolsResponse>
Tool ids disabled platform-wide
GET /api/v1/admin/config/disabled-tools
Required scopes: admin.
Sourcepub async fn get_admin_evaluation_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_evaluation_config(&self) -> Result<Map<String, Value>>
Get evaluation overrides (timeouts, regression threshold, auto-rollback)
GET /api/v1/admin/config/evaluation
Required scopes: admin.
Sourcepub async fn get_admin_founder_config(
&self,
) -> Result<GetAdminFounderConfigResponse>
pub async fn get_admin_founder_config( &self, ) -> Result<GetAdminFounderConfigResponse>
Founder identity, stored and from the environment
Same three-layer read as SMTP, except the third key is effective rather than source: the
resolved values themselves, not a label saying where they came from. Resolution is per
FIELD, so a founder id from storage can sit beside a public key from the environment.
GET /api/v1/admin/config/founder
Required scopes: admin.
Sourcepub async fn get_admin_guardrails(&self) -> Result<GetAdminGuardrailsResponse>
pub async fn get_admin_guardrails(&self) -> Result<GetAdminGuardrailsResponse>
Get guardrail config
GET /api/v1/admin/config/guardrails
Required scopes: admin.
Sourcepub async fn get_admin_idempotency_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_idempotency_config(&self) -> Result<Map<String, Value>>
Get idempotency overrides (enabled, TTL hours, max cache bytes)
GET /api/v1/admin/config/idempotency
Required scopes: admin.
Sourcepub async fn get_admin_integrations(
&self,
) -> Result<GetAdminIntegrationsResponse>
pub async fn get_admin_integrations( &self, ) -> Result<GetAdminIntegrationsResponse>
Get integration toggles
GET /api/v1/admin/config/integrations
Required scopes: admin.
Sourcepub async fn get_admin_llm_adapters_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_llm_adapters_config(&self) -> Result<Map<String, Value>>
Get LLM adapter overrides (retries, circuit breaker, per-provider RPM)
GET /api/v1/admin/config/llm-adapters
Required scopes: admin.
Sourcepub async fn get_admin_logging_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_logging_config(&self) -> Result<Map<String, Value>>
Get logging overrides (PII mode, file level, activity verbosity)
GET /api/v1/admin/config/logging
Required scopes: admin.
Sourcepub async fn get_admin_long_running_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_long_running_config(&self) -> Result<Map<String, Value>>
Get long-running run overrides
GET /api/v1/admin/config/long-running
Required scopes: admin.
Sourcepub async fn get_admin_mcp_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_mcp_config(&self) -> Result<Map<String, Value>>
Get MCP overrides (session limits, idle timeout)
GET /api/v1/admin/config/mcp
Required scopes: admin.
Sourcepub async fn get_admin_multimodal_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_multimodal_config(&self) -> Result<Map<String, Value>>
Get multimodal overrides (size + duration caps + format allowlists)
GET /api/v1/admin/config/multimodal
Required scopes: admin.
Sourcepub async fn get_admin_o_auth_identity_config(
&self,
) -> Result<GetAdminOAuthIdentityConfigResponse>
pub async fn get_admin_o_auth_identity_config( &self, ) -> Result<GetAdminOAuthIdentityConfigResponse>
Apple native sign-in identifiers and the OAuth return-to allowlist
Three-layer read with effective, as with founder identity. The environment’s
oauth_return_to_hosts is a comma-separated variable, split, trimmed and lower-cased before
it appears here.
GET /api/v1/admin/config/oauth-identity
Required scopes: admin.
Sourcepub async fn get_admin_persistence_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_persistence_config(&self) -> Result<Map<String, Value>>
Get persistence overrides (snapshot interval, KV auto-cap)
GET /api/v1/admin/config/persistence
Required scopes: admin.
Sourcepub async fn get_admin_plans(&self) -> Result<GetAdminPlansResponse>
pub async fn get_admin_plans(&self) -> Result<GetAdminPlansResponse>
Get plan overrides
GET /api/v1/admin/config/plans
Required scopes: admin.
Sourcepub async fn get_admin_registration_config(
&self,
) -> Result<GetAdminRegistrationConfigResponse>
pub async fn get_admin_registration_config( &self, ) -> Result<GetAdminRegistrationConfigResponse>
Registration state, setup progress, and the waitlist
Answers three things at once because the admin screen needs all three to decide whether the doors CAN open: the effective registration config, how far platform setup has got, and who signed up while it was shut.
The waitlist is real registered tenants in status waitlisted, not leads — they activate
lazily on their first login after the doors open.
GET /api/v1/admin/config/registration
Required scopes: admin.
Sourcepub async fn get_admin_retention_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_retention_config(&self) -> Result<Map<String, Value>>
Get retention overrides (run / event / audit / feed / artifact TTLs)
GET /api/v1/admin/config/retention
Required scopes: admin.
Sourcepub async fn get_admin_run_command_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_run_command_config(&self) -> Result<Map<String, Value>>
Get run_command overrides (enabled, allowed commands, deno_allow)
GET /api/v1/admin/config/run-command
Required scopes: admin.
Sourcepub async fn get_admin_server_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_server_config(&self) -> Result<Map<String, Value>>
Get HTTP server overrides (trust_proxy, body cap, shutdown timeout)
GET /api/v1/admin/config/server
Required scopes: admin.
Sourcepub async fn get_admin_setup_state(&self) -> Result<SetupStateResponse>
pub async fn get_admin_setup_state(&self) -> Result<SetupStateResponse>
Platform setup progress
Answers the state plus the two vocabularies needed to read it — which steps exist and which are required — so a client does not hard-code either and drift when the list changes.
GET /api/v1/admin/config/setup-state
Required scopes: admin.
Sourcepub async fn get_admin_smtp_config(&self) -> Result<GetAdminSmtpConfigResponse>
pub async fn get_admin_smtp_config(&self) -> Result<GetAdminSmtpConfigResponse>
Get SMTP config, stored and from the environment
Three-layer read, the shape this whole config family uses: kv is what an operator saved,
env is what the process environment supplies, and source says which of them is actually
in force. The password is never in either — only has_password, so a UI can show that a
credential exists without ever holding it.
GET /api/v1/admin/config/smtp
Required scopes: admin.
Sourcepub async fn get_admin_spec_packages(
&self,
) -> Result<GetAdminSpecPackagesResponse>
pub async fn get_admin_spec_packages( &self, ) -> Result<GetAdminSpecPackagesResponse>
Every SPEC package, archived ones included
The operator’s view: unlike the tenant-facing /api/v1/billing/spec-packages, archived
packages are present and the Stripe price id is NOT redacted. Sorted by display_order,
then by name.
GET /api/v1/admin/config/spec-packages
Required scopes: admin.
Sourcepub async fn get_admin_sse_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_sse_config(&self) -> Result<Map<String, Value>>
Get SSE overrides (heartbeat, polling, reconnect hint)
GET /api/v1/admin/config/sse
Required scopes: admin.
Sourcepub async fn get_admin_stripe_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_stripe_config(&self) -> Result<Map<String, Value>>
Get Stripe runtime config (keys redacted)
GET /api/v1/admin/config/stripe
Required scopes: admin.
Sourcepub async fn get_admin_tool_overrides(
&self,
) -> Result<GetAdminToolOverridesResponse>
pub async fn get_admin_tool_overrides( &self, ) -> Result<GetAdminToolOverridesResponse>
Per-tool presentation overrides
A map keyed by tool id. Empty object when nothing is stored — never null.
GET /api/v1/admin/config/tool-overrides
Required scopes: admin.
Sourcepub async fn get_admin_tool_security_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_tool_security_config(&self) -> Result<Map<String, Value>>
Get tool security overrides (egress, SSRF, payload caps, concurrency)
GET /api/v1/admin/config/tool-security
Required scopes: admin.
Sourcepub async fn get_admin_webhooks_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_webhooks_config(&self) -> Result<Map<String, Value>>
Get webhook delivery overrides (separate from webhooks-policy)
GET /api/v1/admin/config/webhooks
Required scopes: admin.
Sourcepub async fn get_admin_worker_pool_config(&self) -> Result<Map<String, Value>>
pub async fn get_admin_worker_pool_config(&self) -> Result<Map<String, Value>>
Get worker pool overrides (max workers, mode, queue size)
GET /api/v1/admin/config/worker-pool
Required scopes: admin.
Sourcepub async fn get_feature_flags(&self) -> Result<GetFeatureFlagsResponse>
pub async fn get_feature_flags(&self) -> Result<GetFeatureFlagsResponse>
Get feature flags
GET /api/v1/admin/config/feature-flags
Required scopes: admin.
Sourcepub async fn get_markup_config(&self) -> Result<GetMarkupConfigResponse>
pub async fn get_markup_config(&self) -> Result<GetMarkupConfigResponse>
Get markup config
GET /api/v1/admin/config/markup
Required scopes: admin.
Sourcepub async fn get_platform_urls(&self) -> Result<GetPlatformURLSResponse>
pub async fn get_platform_urls(&self) -> Result<GetPlatformURLSResponse>
Get platform base URLs (public_base_url, webhook_base_url)
GET /api/v1/admin/config/platform-urls
Required scopes: admin.
Sourcepub async fn get_rate_limits(&self) -> Result<GetRateLimitsResponse>
pub async fn get_rate_limits(&self) -> Result<GetRateLimitsResponse>
Get rate limit config
GET /api/v1/admin/config/rate-limits
Required scopes: admin.
Sourcepub async fn get_reconciliation(&self) -> Result<Map<String, Value>>
pub async fn get_reconciliation(&self) -> Result<Map<String, Value>>
Get last reconciliation result
GET /api/v1/admin/config/reconciliation
Required scopes: admin.
Sourcepub async fn get_runtime_config(&self) -> Result<GetRuntimeConfigResponse>
pub async fn get_runtime_config(&self) -> Result<GetRuntimeConfigResponse>
Get runtime config
GET /api/v1/admin/config/runtime
Required scopes: admin.
Sourcepub async fn get_security_policies(&self) -> Result<Map<String, Value>>
pub async fn get_security_policies(&self) -> Result<Map<String, Value>>
Get CORS / SSRF / upload / admin-RBAC policies
GET /api/v1/admin/config/security-policies
Required scopes: admin.
Sourcepub async fn get_webhooks_policy(&self) -> Result<Map<String, Value>>
pub async fn get_webhooks_policy(&self) -> Result<Map<String, Value>>
Get webhook delivery + Stripe verification policy
GET /api/v1/admin/config/webhooks-policy
Required scopes: admin.
Sourcepub async fn import(
&self,
body: &ImportAdminConfigRequest,
) -> Result<Map<String, Value>>
pub async fn import( &self, body: &ImportAdminConfigRequest, ) -> Result<Map<String, Value>>
Bulk-apply a previously exported snapshot
POST /api/v1/admin/config/import
Required scopes: admin.
Sourcepub async fn list_custom_plans(&self) -> Result<ListCustomPlansResponse>
pub async fn list_custom_plans(&self) -> Result<ListCustomPlansResponse>
The admin-authored plan catalogue
Custom plans layer over the four built-in tiers. Ordered by program ascending — rows with
no program sort FIRST, because an absent program compares as the empty string — then by
id. count is plans.length, not a total across pages: there is no paging, the catalogue
is one stored record.
Optional fields are ABSENT rather than null throughout, so a client must test presence and not compare against null.
GET /api/v1/admin/config/custom-plans
Required scopes: admin.
Sourcepub async fn list_promo_codes(&self) -> Result<ListPromoCodesResponse>
pub async fn list_promo_codes(&self) -> Result<ListPromoCodesResponse>
Referral and promo codes
A promo code pays its owner tenant bonus tokens for every paid subscription redeemed with
it, and grants the subscriber a welcome balance. count is the array length; there is no
paging.
GET /api/v1/admin/config/promo-codes
Required scopes: admin.
Sourcepub async fn list_promo_rewards(
&self,
code: &str,
) -> Result<ListPromoRewardsResponse>
pub async fn list_promo_rewards( &self, code: &str, ) -> Result<ListPromoRewardsResponse>
What one promo code has paid out
One entry per reward actually granted — the audit trail behind a code’s uses. Matched
before the {code} route, so a code literally named rewards cannot shadow it.
GET /api/v1/admin/config/promo-codes/{code}/rewards
Required scopes: admin.
Sourcepub async fn run_reconciliation(&self) -> Result<Map<String, Value>>
pub async fn run_reconciliation(&self) -> Result<Map<String, Value>>
Run reconciliation
POST /api/v1/admin/config/reconciliation
Required scopes: admin.
Sourcepub async fn set_feature_flags(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn set_feature_flags( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Set feature flags
PUT /api/v1/admin/config/feature-flags
Required scopes: admin.
Sourcepub async fn set_model_pricing_override(
&self,
model_ref: &str,
body: &SetModelPricingOverrideRequest,
) -> Result<SetModelPricingOverrideResponse>
pub async fn set_model_pricing_override( &self, model_ref: &str, body: &SetModelPricingOverrideRequest, ) -> Result<SetModelPricingOverrideResponse>
Override the billed price of one model
Sets what the platform charges for a model, independent of the catalogue. Validated by hand
rather than by a schema, so the failures are worth stating: a body that is not JSON is 400;
input_per_million or output_per_million missing, negative, or not coercible to a finite
number is 400; cached_input_per_million, when present, must be a non-negative number or
400.
WRITE SEMANTICS: the entry replaces, the map merges. This overwrites the override for this
model only and leaves every other model’s override untouched. Omitting
cached_input_per_million removes it, and cached tokens then bill at the full input rate.
Note the response key is modelRef — camelCase, an outlier in a snake_case API, and
documented as sent.
PUT /api/v1/admin/config/model-pricing/{modelRef}
Required scopes: admin.
Sourcepub async fn set_rate_limits(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn set_rate_limits( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Set rate limits
PUT /api/v1/admin/config/rate-limits
Required scopes: admin.
Sourcepub async fn test_admin_smtp_config(
&self,
body: &TestAdminSmtpConfigRequest,
) -> Result<TestAdminSmtpConfigResponse>
pub async fn test_admin_smtp_config( &self, body: &TestAdminSmtpConfigRequest, ) -> Result<TestAdminSmtpConfigResponse>
Send a test email through the effective SMTP config
Sends for real, using whichever layer source reports — this is not a dry run. A delivery
failure is 500 carrying the SMTP error text, not a 200 with ok: false, so a client
must read the status rather than a field.
POST /api/v1/admin/config/smtp/test
Required scopes: admin.
Sourcepub async fn test_admin_stripe_config(&self) -> Result<Map<String, Value>>
pub async fn test_admin_stripe_config(&self) -> Result<Map<String, Value>>
Verify stored secret_key authenticates against Stripe (read-only)
POST /api/v1/admin/config/stripe/test
Required scopes: admin.
Sourcepub async fn update_admin_agent_memory_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_agent_memory_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update agent memory overrides
PUT /api/v1/admin/config/agent-memory
Required scopes: admin.
Sourcepub async fn update_admin_auth_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_auth_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update auth runtime overrides
PUT /api/v1/admin/config/auth
Required scopes: admin.
Sourcepub async fn update_admin_backpressure_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_backpressure_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update backpressure overrides
PUT /api/v1/admin/config/backpressure
Required scopes: admin.
Sourcepub async fn update_admin_code_interpreter_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_code_interpreter_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update code-interpreter overrides
PUT /api/v1/admin/config/code-interpreter
Required scopes: admin.
Sourcepub async fn update_admin_disabled_tools(
&self,
body: &Vec<String>,
) -> Result<UpdateAdminDisabledToolsResponse>
pub async fn update_admin_disabled_tools( &self, body: &Vec<String>, ) -> Result<UpdateAdminDisabledToolsResponse>
Replace the platform-wide disabled tool list
The body is a bare JSON ARRAY, not an object — an outlier on a surface where every other
write takes an object, and a client that wraps it in {disabled_tools: \[…\]} gets 400.
Gated on a FRESH MFA challenge.
WRITE SEMANTICS: replaces. The array given becomes the list. It must be NON-EMPTY and every element a non-empty string, so there is no way to disable nothing through this route — clearing the list is not expressible here.
PUT /api/v1/admin/config/disabled-tools
Required scopes: admin.
Sourcepub async fn update_admin_evaluation_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_evaluation_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update evaluation overrides
PUT /api/v1/admin/config/evaluation
Required scopes: admin.
Sourcepub async fn update_admin_founder_config(
&self,
body: &UpdateAdminFounderConfigRequest,
) -> Result<Map<String, Value>>
pub async fn update_admin_founder_config( &self, body: &UpdateAdminFounderConfigRequest, ) -> Result<Map<String, Value>>
Set the stored founder identity
Answers the same body the GET does.
WRITE SEMANTICS: merges. Omitted fields keep their stored values. Unlike SMTP, an empty string IS accepted on every field here and means “leave unset” — deliberately, because the admin UI echoes current values back and a no-op save of an unset identity must not 422.
PUT /api/v1/admin/config/founder
Required scopes: admin.
Sourcepub async fn update_admin_guardrails(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_guardrails( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update guardrail config
PUT /api/v1/admin/config/guardrails
Required scopes: admin.
Sourcepub async fn update_admin_idempotency_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_idempotency_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update idempotency overrides
PUT /api/v1/admin/config/idempotency
Required scopes: admin.
Sourcepub async fn update_admin_integrations(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_integrations( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update integrations
PUT /api/v1/admin/config/integrations
Required scopes: admin.
Sourcepub async fn update_admin_llm_adapters_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_llm_adapters_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update LLM adapter overrides
PUT /api/v1/admin/config/llm-adapters
Required scopes: admin.
Sourcepub async fn update_admin_logging_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_logging_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update logging overrides
PUT /api/v1/admin/config/logging
Required scopes: admin.
Sourcepub async fn update_admin_long_running_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_long_running_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update long-running overrides
PUT /api/v1/admin/config/long-running
Required scopes: admin.
Sourcepub async fn update_admin_mcp_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_mcp_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update MCP overrides
PUT /api/v1/admin/config/mcp
Required scopes: admin.
Sourcepub async fn update_admin_multimodal_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_multimodal_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update multimodal overrides
PUT /api/v1/admin/config/multimodal
Required scopes: admin.
Sourcepub async fn update_admin_o_auth_identity_config(
&self,
body: &UpdateAdminOAuthIdentityConfigRequest,
) -> Result<Map<String, Value>>
pub async fn update_admin_o_auth_identity_config( &self, body: &UpdateAdminOAuthIdentityConfigRequest, ) -> Result<Map<String, Value>>
Set Apple identifiers and the return-to allowlist
Answers the same body the GET does.
WRITE SEMANTICS: merges. Omitted fields keep their stored values; a present
oauth_return_to_hosts REPLACES the stored list rather than adding to it.
PUT /api/v1/admin/config/oauth-identity
Required scopes: admin.
Sourcepub async fn update_admin_persistence_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_persistence_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update persistence overrides
PUT /api/v1/admin/config/persistence
Required scopes: admin.
Sourcepub async fn update_admin_plans(
&self,
body: &UpdateAdminPlansRequest,
) -> Result<UpdateAdminPlansResponse>
pub async fn update_admin_plans( &self, body: &UpdateAdminPlansRequest, ) -> Result<UpdateAdminPlansResponse>
Update plans
PUT /api/v1/admin/config/plans
Required scopes: admin.
Sourcepub async fn update_admin_registration_config(
&self,
body: &UpdateAdminRegistrationConfigRequest,
) -> Result<Map<String, Value>>
pub async fn update_admin_registration_config( &self, body: &UpdateAdminRegistrationConfigRequest, ) -> Result<Map<String, Value>>
Open or close registration, and set signup defaults
Opening registration when it is currently CLOSED requires confirm_open: true. Without
it the answer is 400, and the message says so. This is not ceremony: on 2026-06-11 a
long-lived admin tab running a stale bundle re-submitted its whole form four times in one
day, each time carrying a stale registration_open: true, and silently re-opened doors an
operator had ordered shut. An explicit confirm is something no stale form can send by
accident. Closing, and a no-op re-save while already open, need no confirm.
A second 400 refuses opening while required setup steps are outstanding, and names them.
Answers the same body the GET does.
WRITE SEMANTICS: merges. Omitted fields keep their stored values. default_signup_plan and
allowed_email_domains are stored only when present; an empty default_signup_plan clears
it back to the free default.
PUT /api/v1/admin/config/registration
Required scopes: admin.
Sourcepub async fn update_admin_retention_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_retention_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update retention overrides
PUT /api/v1/admin/config/retention
Required scopes: admin.
Sourcepub async fn update_admin_run_command_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_run_command_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update run_command overrides
PUT /api/v1/admin/config/run-command
Required scopes: admin.
Sourcepub async fn update_admin_server_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_server_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update server overrides
PUT /api/v1/admin/config/server
Required scopes: admin.
Sourcepub async fn update_admin_setup_state(
&self,
body: &UpdateAdminSetupStateRequest,
) -> Result<SetupStateResponse>
pub async fn update_admin_setup_state( &self, body: &UpdateAdminSetupStateRequest, ) -> Result<SetupStateResponse>
Mark setup steps complete, or flip the registration gate
WRITE SEMANTICS: mixed, and the mixed half is the point. completed_steps is a UNION — the
steps given are ADDED to the stored list and never removed — so re-sending the same PATCH is
idempotent and there is no way to un-complete a step through this route. registration_open
is a plain overwrite.
Opening registration requires confirm_open: true when it is currently closed, exactly
as PUT /api/v1/admin/config/registration does. The guard lives in both places on purpose:
without it here, the lower-level endpoint was a way around the confirm that the launch-day
incident of 2026-06-11 put there.
Opening also refuses with 400 while any required step is outstanding, naming them.
status reaching live is a ONE-WAY latch. Once setup has completed, CLOSING registration
is an operational mode — a pre-registration wave — and does NOT return the platform to
in_progress. Before that was fixed, closing sent the super admin back into the setup
wizard on every page, and the wizard’s only exit was the very switch they had just turned
off.
The write is a compare-and-set retried up to six times; a persistently contended record answers 503 rather than overwriting a concurrent change.
PATCH /api/v1/admin/config/setup-state
Required scopes: admin.
Sourcepub async fn update_admin_smtp_config(
&self,
body: &UpdateAdminSmtpConfigRequest,
) -> Result<Map<String, Value>>
pub async fn update_admin_smtp_config( &self, body: &UpdateAdminSmtpConfigRequest, ) -> Result<Map<String, Value>>
Update stored SMTP config
Answers the same body the GET does, so a client does not re-read to see what took effect.
WRITE SEMANTICS: merges. A field the body omits keeps its stored value. An empty string
CLEARS, but only where the validator admits one: password and from_name accept "",
while host, user and from are rejected with 422 before the merge is reached — host
and user require at least one character and from must parse as an email. So a stored
host cannot be blanked through this route, only overwritten.
password: "" is the operator-initiated clear: it drops both the encrypted and plaintext
fields so the next read falls back to the environment. A password is stored
AES-GCM-encrypted when an encryption key is configured; without one it is stored in
plaintext and the server logs a warning rather than refusing.
PUT /api/v1/admin/config/smtp
Required scopes: admin.
Sourcepub async fn update_admin_spec_packages(
&self,
body: &UpdateAdminSpecPackagesRequest,
params: &UpdateAdminSpecPackagesParams,
) -> Result<Map<String, Value>>
pub async fn update_admin_spec_packages( &self, body: &UpdateAdminSpecPackagesRequest, params: &UpdateAdminSpecPackagesParams, ) -> Result<Map<String, Value>>
Replace the SPEC-package map
WRITE SEMANTICS: replaces. The map given becomes the whole map, so a package omitted from the body is DELETED. Two guards exist because of that.
A drop that would remove a package with a wired stripe_price_id is refused with 422
unless the caller opts in per id: ?confirm_drop=\<id\>\[,\<id\>\]. Tenants may be
subscribed against that price, so losing it silently is not a save, it is a billing
incident. The refusal names every id it is protecting.
Each map KEY must equal its record’s package_id, or 422. The map is keyed by id
everywhere downstream, so a key that disagrees with its record orphans the package at the
next read.
updated_at is stamped by the server on every record in the payload and is not read from
the body.
PUT /api/v1/admin/config/spec-packages
Required scopes: admin.
Sourcepub async fn update_admin_sse_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_sse_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update SSE overrides
PUT /api/v1/admin/config/sse
Required scopes: admin.
Sourcepub async fn update_admin_stripe_config(
&self,
body: &UpdateAdminStripeConfigRequest,
) -> Result<Map<String, Value>>
pub async fn update_admin_stripe_config( &self, body: &UpdateAdminStripeConfigRequest, ) -> Result<Map<String, Value>>
Update Stripe keys/mode/price IDs; rebuilds BillingManager
PUT /api/v1/admin/config/stripe
Required scopes: admin.
Sourcepub async fn update_admin_tool_overrides(
&self,
body: &UpdateAdminToolOverridesRequest,
) -> Result<UpdateAdminToolOverridesResponse>
pub async fn update_admin_tool_overrides( &self, body: &UpdateAdminToolOverridesRequest, ) -> Result<UpdateAdminToolOverridesResponse>
Replace the per-tool presentation overrides
These affect PRESENTATION only. The runtime tool catalogue is code-defined, so an override
changes what the catalogue page shows and nothing about what an agent can call — including
hidden, which hides the row by default while the runtime still serves the tool. An
operator reaching for hidden to switch a tool OFF wants disabled-tools instead.
Gated on a FRESH MFA challenge.
WRITE SEMANTICS: replaces. The map given becomes the whole map, so an id omitted from the
body is deleted. Two further rules follow from that: an entry whose fields are all empty is
DROPPED rather than stored — sending {} for an id is how the client deletes just that one
— and hidden is stored only when literally true, so hidden: false deletes the flag
rather than recording it.
Every key is checked against the runtime’s built-in tool ids: an unknown id is 422, distinct from the 400 a malformed body gets. The outer object is strict — an unexpected top-level key is rejected, not stripped.
PUT /api/v1/admin/config/tool-overrides
Required scopes: admin.
Sourcepub async fn update_admin_tool_security_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_tool_security_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update tool security overrides
PUT /api/v1/admin/config/tool-security
Required scopes: admin.
Sourcepub async fn update_admin_webhooks_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_webhooks_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update webhook delivery overrides
PUT /api/v1/admin/config/webhooks
Required scopes: admin.
Sourcepub async fn update_admin_worker_pool_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_admin_worker_pool_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update worker pool overrides
PUT /api/v1/admin/config/worker-pool
Required scopes: admin.
Sourcepub async fn update_markup_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_markup_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update markup
PUT /api/v1/admin/config/markup
Required scopes: admin.
Sourcepub async fn update_platform_urls(
&self,
body: &UpdatePlatformURLSRequest,
) -> Result<Map<String, Value>>
pub async fn update_platform_urls( &self, body: &UpdatePlatformURLSRequest, ) -> Result<Map<String, Value>>
Update public_base_url and webhook_base_url
PUT /api/v1/admin/config/platform-urls
Required scopes: admin.
Sourcepub async fn update_runtime_config(
&self,
body: &Map<String, Value>,
) -> Result<Map<String, Value>>
pub async fn update_runtime_config( &self, body: &Map<String, Value>, ) -> Result<Map<String, Value>>
Update runtime
PUT /api/v1/admin/config/runtime
Required scopes: admin.
Sourcepub async fn update_security_policies(
&self,
body: &UpdateSecurityPoliciesRequest,
) -> Result<Map<String, Value>>
pub async fn update_security_policies( &self, body: &UpdateSecurityPoliciesRequest, ) -> Result<Map<String, Value>>
Update security policies
PUT /api/v1/admin/config/security-policies
Required scopes: admin.
Sourcepub async fn update_webhooks_policy(
&self,
body: &UpdateWebhooksPolicyRequest,
) -> Result<Map<String, Value>>
pub async fn update_webhooks_policy( &self, body: &UpdateWebhooksPolicyRequest, ) -> Result<Map<String, Value>>
Update webhooks policy
PUT /api/v1/admin/config/webhooks-policy
Required scopes: admin.
Sourcepub async fn upsert_custom_plan(
&self,
plan_id: &str,
body: &CustomPlanInput,
) -> Result<UpsertCustomPlanResponse>
pub async fn upsert_custom_plan( &self, plan_id: &str, body: &CustomPlanInput, ) -> Result<UpsertCustomPlanResponse>
Create or replace one custom plan
WRITE SEMANTICS: replaces. The stored record is rebuilt from this body; only created_at
survives from the previous version. An omitted field does NOT keep its stored value — it
takes the schema’s default or disappears.
Two defaults make an omission destructive, and the dangerous one is active. It is
default(true), so re-saving a DEACTIVATED plan without sending active silently
reactivates it. visibility is default("hidden"), so re-saving a public plan without
sending it hides the plan from every tenant. Neither reports anything: the answer is 200 and
the record looks freshly written.
Unknown keys are stripped rather than rejected, so a typo’d field name is accepted and dropped with a 200.
A built-in plan id (free, starter, pro, enterprise) is 409, pointing at PUT /api/v1/admin/config/plans — the route that does own those.
PUT /api/v1/admin/config/custom-plans/{planId}
Required scopes: admin.
Sourcepub async fn upsert_promo_code(
&self,
code: &str,
body: &PromoCodeInput,
) -> Result<UpsertPromoCodeResponse>
pub async fn upsert_promo_code( &self, code: &str, body: &PromoCodeInput, ) -> Result<UpsertPromoCodeResponse>
Create or replace one promo code
WRITE SEMANTICS: replaces. Only uses and created_at survive from the previous version;
every other field comes from this body, and an omitted field is dropped.
target_plan_id is the omission that costs money. It scopes the code to one plan, and
the reward path returns early when it is set and does not match the plan being paid for.
Replace a scoped code without resending it and the code becomes redeemable on EVERY plan —
200, no warning, and the stored row looks the same size as before. active behaves the same
way as on custom plans: default(true), so omitting it reactivates a deactivated code.
PUT /api/v1/admin/config/promo-codes/{code}
Required scopes: admin.
Trait Implementations§
Source§impl Clone for AdminConfigApi
impl Clone for AdminConfigApi
Source§fn clone(&self) -> AdminConfigApi
fn clone(&self) -> AdminConfigApi
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more