Reference
Generated at build time from openapi.yaml. Production base URL: https://api.weirgate.com.
74 operations · contract 2026-07-18
/healthzOperations · getHealth
Read process health and runtime mode
Responses
200Healthy
/v1/chat/completionsData plane · createChatCompletion
Create a server-routed chat completion
OpenAI-compatible request/response envelope. Client-supplied model and token ceilings are ignored; X-Feature-Id owns routing and output limits. When stream is true the response is SSE and follows x-weirgate-sse.
Parameters
parameter· · optionalparameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200Completion or completion stream400401402403404422429500502
/v1/embeddingsData plane · createEmbedding
Create server-routed embeddings
Parameters
parameter· · optionalparameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200Embeddings400401402403404422429500502
/v1/featuresData plane · listFeatures
Read the authenticated app's enabled feature catalog
Parameters
parameter· · optionalIf-None-Match· header · optional
Responses
200Private app catalog304Catalog is unchanged400401404
/v1/balanceData plane · getBalance
Read balance, lazily provisioning the app/user row
The monthly allowance grant remains lazy until the first metered call.
Parameters
parameter· · optional
Responses
200Current balance400401404
/v1/telemetry/clientData plane · ingestClientTelemetry
Accept optional user-bound client timing
Created, duplicate, and cap-dropped events intentionally share the same 202 response.
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
202Accepted without disclosing deduplication or cap state400401404
/v1/stripe/webhookBilling · receiveStripeWebhook
Receive a signature-verified idempotent Stripe billing event
The exact raw body is verified before parsing. Durable event-id deduplication precedes audited tenant subscription state changes. This path never invokes app-user grant or reversal primitives.
Parameters
Stripe-Signature· header · required
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200Event received or already processed400500502
/v1/admin/whoamiKeys · getManagementIdentity
Inspect the authenticated management grant
Responses
200401
/v1/admin/sessionKeys · provisionDeveloperSession
Idempotently provision and read the Clerk organization tenant
Developer identity is distinct from every app's end-user auth configuration.
Responses
200201401403
/v1/admin/billingBilling · getTenantBilling
Read tenant tier, provisional usage, invoices, and append-only statements
Parameters
parameter· · optional
Responses
200Tenant billing summary401403404
/v1/admin/billing/checkoutBilling · createBillingCheckout
Create a Stripe-hosted subscription checkout session
Requires a tenant owner with a recent second factor. Tier state changes only from verified Stripe webhooks.
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Stripe Checkout redirect400401403502
/v1/admin/billing/portalBilling · createBillingPortal
Create a Stripe-hosted customer portal session
Requires a tenant owner with a recent second factor.
Responses
201Stripe Portal redirect401403502
/v1/admin/billing/catalog/setupBilling · setupStripeTestCatalog
Idempotently create the approved Stripe test-mode catalog
Responses
201Test-mode products, prices, coupons, and portal configuration401403500502
/v1/admin/billing/design-partnerBilling · enrollBillingDesignPartner
Enroll a tenant in the approved six-month design-partner schedule
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200Enrollment timestamp400401403404
/v1/admin/billing/statements/closeBilling · closeTenantBillingStatement
Close one UTC month and post paid-tier overage invoice items
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Append-only draft/final records and any Stripe invoice record400401403404500502
/v1/admin/billing/statements/correctBilling · correctFinalizedTenantBillingStatement
Append a closed-month correction and credit matching finalized Stripe lines
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Append-only correction and any same-line Stripe credit note record400401403404500502
/v1/admin/session-grantsKeys · authorizeSessionGrant
Authorize a bounded MCP or CLI grant from a developer session
Defaults to propose scope; apply requires a recent Clerk second factor.
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/membersTeam · listDeveloperMembers
List Weirgate-owned tenant memberships and roles
Responses
200401403
/v1/admin/members/{developerIdentityId}Team · updateDeveloperMemberRole
Change a Weirgate-owned tenant role
Owner-only. Requires a recent second factor and preserves at least one tenant owner.
Parameters
developerIdentityId· path · required
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/session-grants/exchangeKeys · exchangeSessionGrant
Exchange a single-use consent code for a reveal-once bounded key
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Bounded key metadata plus reveal-once value400401
/v1/admin/docs/searchDocs · searchAgentDocs
Search the authenticated canonical Markdown corpus
Parameters
query· query · requiredsection· query · optionalparameter· · optional
Responses
200400401403
/v1/admin/docs/{pageId}Docs · getAgentDoc
Read one canonical Markdown page
Parameters
pageId· path · required
Responses
200401403404
/v1/admin/auth-presetsConfiguration · listAuthPresets
List non-secret Firebase, Supabase, Clerk, and custom JWKS templates
Responses
200401403
/v1/admin/provider-policyOperations · getProviderPolicy
Read the platform-owned provider policy registry
Responses
200401403
/v1/admin/provider-policyOperations · replaceProviderPolicy
Replace the platform-owned policy registry
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403
/v1/admin/provider-keysKeys · listProviderKeys
List write-only provider-key slot metadata
Parameters
parameter· · optionalparameter· · optional
Responses
200400401403404
/v1/admin/provider-keys/{provider}Keys · putProviderKey
Create or replace a write-only provider key
Clerk developer sessions require a recent second factor.
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200201400401403404
/v1/admin/provider-keys/{provider}Keys · revokeProviderKey
Soft-revoke a provider key
Clerk developer sessions require a recent second factor.
Responses
200400401403404
/v1/admin/provider-keys/{provider}/rotateKeys · rotateProviderKey
Rotate a write-only provider key
Clerk developer sessions require a recent second factor.
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/admin/provider-keys/{provider}/healthKeys · probeProviderKey
Run a non-billable provider metadata probe
Responses
200400401403404500
/v1/admin/keysKeys · mintManagementKey
Mint and reveal a bounded management key once
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Key metadata plus reveal-once value400401403404
/v1/admin/keysKeys · listManagementKeys
List bounded management-key metadata
Parameters
parameter· · optional
Responses
200400401403404
/v1/admin/keys/{keyId}Keys · revokeManagementKey
Revoke a management key immediately
Parameters
parameter· · optionalparameter· · optional
Responses
200400401403404
/v1/admin/apps/{appId}/webhook-proposalsWebhooks · createWebhookProposal
Propose a durable webhook endpoint change without revealing a secret
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404409
/v1/admin/webhook-proposalsWebhooks · listWebhookProposals
List visible durable webhook proposals
Parameters
app_id· query · optionalstatus· query · optionalcursor· query · optionalparameter· · optional
Responses
200400401403
/v1/admin/webhook-proposals/{proposalId}Webhooks · getWebhookProposal
Preview a durable webhook proposal
Parameters
parameter· · optional
Responses
200401403404
/v1/admin/webhook-proposals/{proposalId}/applyWebhooks · applyWebhookProposal
Apply a webhook proposal by reference without returning signing material
Parameters
parameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404409
/v1/admin/webhook-proposals/{proposalId}/cancelWebhooks · cancelWebhookProposal
Cancel a pending webhook proposal
Parameters
parameter· · optional
Responses
200400401403404
/v1/admin/apps/{appId}/webhooksWebhooks · createWebhook
Register a webhook and reveal its signing secret once
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/webhooksWebhooks · listWebhooks
List webhook metadata without secrets
Responses
200401403404
/v1/admin/apps/{appId}/webhooks/deliveriesWebhooks · listWebhookDeliveries
List recent webhook delivery attempts
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/webhooks/deliveries/{deliveryId}/replayWebhooks · replayWebhookDelivery
Replay a delivery while retaining the event id
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/webhooks/{endpointId}Webhooks · updateWebhook
Update webhook URL, event registry, or enabled state
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/admin/apps/{appId}/webhooks/{endpointId}Webhooks · deleteWebhook
Delete a webhook endpoint
Responses
200401403404
/v1/admin/apps/{appId}/webhooks/{endpointId}/rotate-secretWebhooks · rotateWebhookSecret
Rotate and reveal a webhook signing secret once
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404500
/v1/admin/apps/{appId}/users/{externalId}/grantsMoney · createGrant
Grant units idempotently
X-Idempotency-Key is canonical; body idempotency_key is a deprecated compatibility alias.
Parameters
parameter· · optionalparameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/admin/apps/{appId}/grants/{grantId}/reverseMoney · reverseGrant
Reverse a grant idempotently
Parameters
parameter· · optionalparameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/usageMoney · getUsage
Query windowed usage rollups
Parameters
parameter· · optionalparameter· · optionalparameter· · optionalparameter· · optionalgroup_by· query · optional
Responses
200400401403404
/v1/admin/apps/{appId}/pricing-insightsMoney · getPricingInsights
Query closed-window per-user pricing distributions
Percentiles are null below 20 users with typed insufficient_samples evidence.
Parameters
parameter· · optionalparameter· · optionalparameter· · optional
Responses
200400401403404
/v1/admin/apps/{appId}/rulesRules · getRules
Read the current revisioned ruleset
Parameters
parameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/rules:previewRules · previewRules
Preview rules against recent traffic and bind a content hash
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/rules/proposalsRules · proposeRules
Create a preview-hash-bound rules proposal
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/usersPrivacy · listUsers
List active users for an app
Parameters
parameter· · optionalcursor· query · optionalparameter· · optional
Responses
200400401403404
/v1/admin/apps/{appId}/users/{externalId}Privacy · getUser
Read an existing user, balance, and recent usage
Responses
200401403404
/v1/admin/apps/{appId}/users/{externalId}Privacy · anonymizeUser
Anonymize identity while retaining money history
A Clerk developer session requires a recent second factor.
Responses
200401403404
/v1/admin/apps/{appId}/users/{externalId}/exportPrivacy · exportUser
Export retained user identity, money, usage, and timing data
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/configConfiguration · getConfig
Read visible tenant configuration and current revisions
Responses
200401403404
/v1/admin/configConfiguration · applyConfigDirect
Apply a config document directly with apply scope
Ruleset changes are rejected and must use preview-bound proposals.
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/admin/config/proposalsConfiguration · listConfigProposals
List visible durable proposals across config, rules, and webhooks
Parameters
app_id· query · optionalkind· query · optionalstatus· query · optionalcursor· query · optionalparameter· · optional
Responses
200400401403
/v1/admin/config/proposalsConfiguration · createConfigProposal
Propose a tenant config against its current base revision
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201Durable proposal400401403404
/v1/admin/config/proposals/{proposalId}Configuration · getConfigProposal
Preview proposal document, attribution, expiry, and status
Parameters
parameter· · optional
Responses
200Proposal preview401403404
/v1/admin/config/proposals/{proposalId}/applyConfiguration · applyConfigProposal
Apply a proposal by reference with base-revision CAS
A Clerk developer session requires a recent second factor.
Parameters
parameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200Applied revision or idempotent replay400401403404409
/v1/admin/config/proposals/{proposalId}/cancelConfiguration · cancelConfigProposal
Cancel a pending proposal as its creator or with apply scope
Parameters
parameter· · optional
Responses
200400401403404
/v1/admin/auditOperations · queryAudit
Query tenant-scoped actor-attributed management audit events
Parameters
parameter· · optionalparameter· · optionalaction· query · optionalresource_type· query · optionalactor· query · optionalsince· query · optionaluntil· query · optional
Responses
200Audit events, newest first400401403404
/v1/admin/apps/{appId}/doctorOperations · runDoctor
Run non-billable auth, provider, or webhook probes
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
200400401403404
/v1/admin/feature-templatesConfiguration · listFeatureTemplates
List built-in mock-first feature templates
Responses
200401403
/v1/admin/apps/{appId}/feature-templates/{templateId}/instantiateConfiguration · instantiateFeatureTemplate
Instantiate a template as an ordinary config revision
Parameters
parameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/sandbox/fixturesOperations · listSandboxFixtures
List deterministic success and typed-error fixtures
Parameters
parameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/sandbox/sessionsOperations · createSandboxSession
Create a named deterministic sandbox session
Clerk developer sessions require a recent second factor.
Parameters
parameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/sandbox/sessions/{sessionId}Operations · getSandboxSession
Read a sandbox session and its durable runs
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/sandbox/sessions/{sessionId}/runsOperations · runSandboxFixture
Run a named deterministic fixture
Clerk developer sessions require a recent second factor.
Parameters
parameter· · optionalparameter· · optional
Request body
See the OpenAPI schema for the accepted JSON body and required content type.
Responses
201400401403404
/v1/admin/apps/{appId}/readinessOperations · getReadiness
Read durable onboarding readiness evidence
Parameters
parameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/request-traces/{requestId}Operations · getRequestTrace
Join reservation, settlement, usage, and optional client timing by request id
Parameters
parameter· · optionalparameter· · optional
Responses
200401403404
/v1/admin/apps/{appId}/integration-snippetOperations · getIntegrationSnippet
Generate an HTTP/curl-only integration snippet
Parameters
parameter· · optionalmode· query · optionalfeature_id· query · optional
Responses
200400401403404