PayWithLocus Tenant API
The Tenant API from PayWithLocus — 1 operation(s) for tenant.
The Tenant API from PayWithLocus — 1 operation(s) for tenant.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/paywithlocus-com:paywithlocus-com-tenant-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Locus Pro Tenant API
description: Production is live at https://api.paywithlocus.com/api. Stage remains available for evaluation and integration testing at https://api.stage.paywithlocus.com/api; credentials, balances, and tenant data are isolated by environment. Embedded prepaid credits over the Locus pay-per-use catalog. Money and top-up amounts use exact decimal strings (up to 6dp). Every burn requires an Idempotency-Key header. Management routes accept a tenant secret key or authorized dashboard session as shown per operation. High-risk operations protected by workspace-administrator step-up require an owner or admin dashboard session, the applicable scope, and MFA/passkey authentication completed in the last ten minutes; developer, billing, viewer, and secret-key principals remain ineligible even when a matching scope is present. Scoped secret keys retain only the explicitly documented Agent Connection lifecycle exception. Widget routes accept an end-user JWT alone; when a publishable key is present it must belong to the JWT's tenant. MCP uses OAuth 2.1 Authorization Code with PKCE by default and also accepts the explicitly documented tenant secret key, end-user JWT, or scoped agent connection compatibility credentials. Burns accept the execution credentials shown per operation. Publishable keys never authorize management or burns by themselves.
version: 0.7.0
servers:
- url: https://api.paywithlocus.com/api
description: Production
- url: https://api.stage.paywithlocus.com/api
description: Stage — evaluation and integration testing
security:
- secretKey: []
tags:
- name: Tenant
paths:
/credits/plans:
get:
tags:
- Tenant
summary: Read monthly plan and Enterprise trial status
operationId: getCreditsPlanStatus
description: Requires a human workspace session with tenant:read. Trial expiry pauses Enterprise features without erasing prepaid balances or changing the assigned usage rate. Complete paid Enterprise checkout to restore those features; a top-up does not extend the trial.
security:
- dashboardSession: []
parameters:
- name: refresh
in: query
schema:
type: boolean
default: false
description: Reconcile the current Stripe subscription before returning the plan.
responses:
'200':
description: Current subscription, trial deadline and checkout availability
content:
application/json:
schema:
type: object
properties:
success:
const: true
enterpriseTrial:
oneOf:
- type: 'null'
- type: object
required:
- status
- startedAt
- endsAt
properties:
status:
enum:
- active
- expired
startedAt:
type: string
format: date-time
endsAt:
type: string
format: date-time
description: 'A stored Enterprise trial: 7 days for an invited workspace, 14 for an operator upgrade. Paid conversion clears the visible trial, preserves its audit dates and keeps the assigned usage-pricing profile.'
enabled:
type: boolean
currentPlan:
enum:
- free
- plus
- enterprise
- enterprise_plus
legacy:
type: boolean
checkoutConfigured:
type: boolean
includedBalanceUsd:
type: string
includedExpiresAt:
type:
- string
- 'null'
format: date-time
'403':
description: Human workspace membership is required
components:
securitySchemes:
secretKey:
type: http
scheme: bearer
description: Tenant secret key (lcr_…). Server-side only.
sandboxKey:
type: http
scheme: bearer
description: 'Sandbox key (lcrsb_…). Metered calls are simulated: no credits move, no providers are called. No management access. Simulation is served from fixtures for the hosted provider catalog; external-rail providers are not registered with the sandbox interceptor and answer 404.'
endUserToken:
type: http
scheme: bearer
description: 60-3600 second end-user JWT minted via /credits/end-users/{id}/token. If the JWT has sid, send the original session value in X-Locus-Session-Id; sid contains only its SHA-256 fingerprint. Bearer tokens are replayable until expiry; use short TTLs, optional session binding, and Idempotency-Key on operations.
publishableKey:
type: apiKey
in: header
name: X-Locus-Publishable-Key
description: 'Widget calls: rides alongside the end-user token.'
dashboardSession:
type: http
scheme: bearer
description: Locus Pro dashboard session (Cognito). High-risk workspace administration requires an owner or admin role and fresh MFA/passkey step-up.
mcpOAuth:
type: oauth2
description: Primary authentication for the hosted MCP resource. Public clients use Authorization Code with PKCE S256. mcp:read covers discovery and resource reads; billed tools/call additionally requires mcp:execute; offline_access requests a rotating refresh token.
flows:
authorizationCode:
authorizationUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/authorize
tokenUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/token
refreshUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/token
scopes:
mcp:read: Discover and read the authenticated MCP catalog and resources.
mcp:execute: Execute billed MCP tools.
offline_access: Issue and rotate a persistent refresh token.
mcpRegistrationToken:
type: http
scheme: bearer
description: Dynamic-client registration access token returned once when the MCP OAuth client is created. It remains valid only for that client's registration management URI.
agentConnection:
type: http
scheme: bearer
description: Scoped lcac_ credential. Tenant-managed Agent Connections authorize only their bound MCP and wrapped execution surfaces. A bootstrap connection for a self-registered agent additionally authorizes the explicit /credits/agent/* self-service routes for its own account; neither form authorizes general tenant management.
okibiIdentity:
type: http
scheme: bearer
bearerFormat: Okibi capability
description: Short-lived capability injected only by an Identity-eligible signed Okibi CLI release. It is verified by @okibi/partner-kit for issuer, audience, installation, grant activity, and required route scopes. Never persist or copy it into native Locus configuration.