PayWithLocus Workspace members API
Invite-only human workspace membership and role administration
Invite-only human workspace membership and role administration
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-workspace-members-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 Workspace members 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: Workspace members
description: Invite-only human workspace membership and role administration
paths:
/credits/member-invitations/validate:
post:
tags:
- Workspace members
summary: Validate a workspace invitation
operationId: postCreditsMemberInvitationsValidate
description: Returns a masked-email preview for a single-use invitation token. The token is read from the email URL fragment and submitted in JSON so it does not enter normal access logs or referrers.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- token
properties:
token:
type: string
pattern: ^lpmi_
maxLength: 128
responses:
'200':
description: Safe invitation preview
content:
application/json:
schema:
type: object
required:
- success
- data
properties:
success:
const: true
data:
type: object
required:
- invitation
properties:
invitation:
$ref: '#/components/schemas/WorkspaceInvitationPreview'
'404':
description: Invitation is invalid, expired, revoked, or already consumed
/credits/member-invitations/accept:
post:
tags:
- Workspace members
summary: Create the invited identity and join its workspace
operationId: postCreditsMemberInvitationsAccept
description: Creates an account only for the exact invited email and joins the existing workspace. This is not a public account-creation surface. Existing identities must use the authenticated acceptance route.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- token
- name
- password
properties:
token:
type: string
pattern: ^lpmi_
maxLength: 128
name:
type: string
minLength: 1
maxLength: 100
password:
type: string
minLength: 8
maxLength: 256
format: password
writeOnly: true
responses:
'201':
description: Account created and workspace membership activated
'409':
description: Existing identity must sign in, or provisioning is already active
/credits/member-invitations/accept-existing:
post:
tags:
- Workspace members
summary: Join a workspace as the matching signed-in identity
operationId: postCreditsMemberInvitationsAcceptExisting
description: The live Cognito email must exactly match the invited email. The response identifies the workspace to select with X-Locus-Tenant-Id.
security:
- dashboardSession: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- token
properties:
token:
type: string
pattern: ^lpmi_
maxLength: 128
responses:
'200':
description: Previously completed invitation selected idempotently
'201':
description: Workspace membership activated
'403':
description: Signed-in email does not match the invitation
'409':
description: Invitation is invalid, expired, already in progress for another identity, or the signed-in identity is already a member
/credits/tenants:
get:
tags:
- Workspace members
summary: List the signed-in person's workspace memberships
operationId: getCreditsTenants
description: This discovery route does not require X-Locus-Tenant-Id. Use the selected tenantId as that header on subsequent dashboard management calls when the person belongs to multiple workspaces.
security:
- dashboardSession: []
responses:
'200':
description: Memberships visible to the signed-in identity
content:
application/json:
schema:
type: object
required:
- success
- memberships
properties:
success:
const: true
memberships:
type: array
items:
$ref: '#/components/schemas/WorkspaceMembership'
/credits/members:
get:
tags:
- Workspace members
summary: List workspace members and pending invitations
operationId: getCreditsMembers
description: Human Cognito sessions only. Tenant API keys cannot enumerate workspace member email addresses.
security:
- dashboardSession: []
responses:
'200':
description: Workspace members and active invitations
content:
application/json:
schema:
type: object
required:
- success
- members
- invitations
properties:
success:
const: true
members:
type: array
items:
$ref: '#/components/schemas/WorkspaceMember'
invitations:
type: array
items:
$ref: '#/components/schemas/WorkspaceInvitation'
'403':
description: A non-human credential attempted to enumerate workspace membership
/credits/member-invitations:
post:
tags:
- Workspace members
summary: Invite people to a workspace
operationId: postCreditsMemberInvitations
description: Requires owner or admin membership, members:manage, and MFA or passkey step-up within the last ten minutes. Accepts at most 20 unique normalized email addresses.
security:
- dashboardSession: []
parameters:
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- emails
- role
properties:
emails:
type: array
minItems: 1
maxItems: 20
uniqueItems: true
items:
type: string
format: email
maxLength: 254
role:
$ref: '#/components/schemas/InvitableWorkspaceRole'
responses:
'201':
description: Invitation records persisted and immediate delivery attempted
'403':
description: Missing owner/admin role, scope, or recent step-up
/credits/member-invitations/{invitationId}/resend:
post:
tags:
- Workspace members
summary: Rotate and resend a pending workspace invitation
operationId: postCreditsMemberInvitationsByInvitationIdResend
description: Requires owner or admin membership, members:manage, and recent MFA or passkey step-up. Rotating the token invalidates the previous email link.
security:
- dashboardSession: []
parameters:
- name: invitationId
in: path
required: true
schema:
type: string
format: uuid
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
responses:
'200':
description: Invitation token rotated and delivery attempted
'403':
description: Missing authorization or step-up
'404':
description: Invitation not found
/credits/member-invitations/{invitationId}:
delete:
tags:
- Workspace members
summary: Revoke a workspace invitation
operationId: deleteCreditsMemberInvitationsByInvitationId
description: Requires owner or admin membership, members:manage, and recent MFA or passkey step-up.
security:
- dashboardSession: []
parameters:
- name: invitationId
in: path
required: true
schema:
type: string
format: uuid
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
responses:
'204':
description: Invitation revoked
'403':
description: Missing authorization or step-up
'404':
description: Invitation not found
/credits/members/{memberId}:
patch:
tags:
- Workspace members
summary: Change a workspace member role
operationId: patchCreditsMembersByMemberId
description: Requires owner or admin membership, members:manage, and recent MFA or passkey step-up. The owner's role cannot be changed here (use the transfer-ownership operation) and a member cannot change their own role.
security:
- dashboardSession: []
parameters:
- name: memberId
in: path
required: true
schema:
type: string
format: uuid
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- role
properties:
role:
$ref: '#/components/schemas/InvitableWorkspaceRole'
responses:
'200':
description: Role updated
'403':
description: Missing authorization or step-up
'404':
description: Member not found
'409':
description: The owner cannot be reassigned here, or the acting member tried to change their own role, or the member changed (for example became the owner) before this request completed
delete:
tags:
- Workspace members
summary: Remove a workspace member
operationId: deleteCreditsMembersByMemberId
description: Requires owner or admin membership, members:manage, and recent MFA or passkey step-up. The current owner cannot be removed and a member cannot remove their own current membership.
security:
- dashboardSession: []
parameters:
- name: memberId
in: path
required: true
schema:
type: string
format: uuid
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
responses:
'204':
description: Member removed
'403':
description: Missing authorization or step-up
'404':
description: Member not found
'409':
description: The current owner or acting member cannot be removed, or the member changed (for example became the owner) before this request completed
/credits/members/{memberId}/transfer-ownership:
post:
tags:
- Workspace members
summary: Transfer workspace ownership
operationId: postCreditsMembersByMemberIdTransferOwnership
description: Requires the current owner's dashboard session, members:manage, and recent MFA or passkey step-up. Admins and secret keys are refused. The target becomes the owner and the acting owner becomes an admin; only the new owner can transfer ownership again.
security:
- dashboardSession: []
parameters:
- name: memberId
in: path
required: true
schema:
type: string
format: uuid
- $ref: '#/components/parameters/WorkspaceStepUpHeader'
responses:
'200':
description: Ownership transferred; returns the new owner membership
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- success
- member
properties:
success:
const: true
member:
$ref: '#/components/schemas/WorkspaceMember'
'403':
description: Caller is not the owner, lacks members:manage, or has no recent step-up
'404':
description: Member not found in this workspace
'409':
description: The acting member is not the owner, already owns the workspace, or ownership moved concurrently
components:
parameters:
WorkspaceStepUpHeader:
name: X-Locus-Step-Up
in: header
required: false
schema:
type: string
format: password
description: Short-lived raw MFA/passkey step-up token bound to the authenticated Cognito subject. Send it alongside the dashboard Bearer token for workspace-administrator mutations when the base session does not itself prove MFA within the last ten minutes. Never send it with a tenant secret key.
schemas:
WorkspaceMember:
type: object
additionalProperties: false
required:
- id
- email
- role
- cognitoSub
- createdAt
properties:
id:
type: string
format: uuid
email:
type: string
format: email
role:
$ref: '#/components/schemas/WorkspaceRole'
cognitoSub:
type: string
description: Cognito subject usage is attributed to; the identity analytics keys member spend by.
createdAt:
type: string
format: date-time
InvitableWorkspaceRole:
type: string
enum:
- admin
- developer
- billing
- viewer
WorkspaceInvitation:
type: object
additionalProperties: false
required:
- id
- email
- role
- status
- deliveryStatus
- expiresAt
- deliveryAttempts
- lastDeliveryError
- lastSentAt
- createdAt
properties:
id:
type: string
format: uuid
email:
type: string
format: email
role:
$ref: '#/components/schemas/InvitableWorkspaceRole'
status:
type: string
enum:
- PENDING
- PROVISIONING
deliveryStatus:
type: string
enum:
- QUEUED
- SENT
- FAILED
expiresAt:
type: string
format: date-time
deliveryAttempts:
type: integer
minimum: 0
lastDeliveryError:
type:
- string
- 'null'
lastSentAt:
type:
- string
- 'null'
format: date-time
createdAt:
type: string
format: date-time
WorkspaceMembership:
type: object
additionalProperties: false
required:
- tenantId
- tenantName
- tenantStatus
- role
properties:
tenantId:
type: string
format: uuid
tenantName:
type: string
tenantStatus:
type: string
enum:
- active
- suspended
role:
$ref: '#/components/schemas/WorkspaceRole'
WorkspaceInvitationPreview:
type: object
additionalProperties: false
required:
- id
- emailMasked
- workspaceName
- role
- status
- expiresAt
properties:
id:
type: string
format: uuid
emailMasked:
type: string
workspaceName:
type: string
role:
$ref: '#/components/schemas/InvitableWorkspaceRole'
status:
type: string
expiresAt:
type: string
format: date-time
WorkspaceRole:
type: string
description: Owner and admin are workspace-administrator roles. Exactly one member holds owner; it moves only through the transfer-ownership operation, never through role updates or invitations.
enum:
- owner
- admin
- developer
- billing
- viewer
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.