Swop Runtime Accounts API
Managed accounts, linked wallets, and custody flows
Managed accounts, linked wallets, and custody flows
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/swopme-co:swopme-co-runtime-accounts-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: Swivy Runtime Accounts API
version: 1.0.0
description: Swivy control-plane and runtime API. This contract documents the primary headers and payloads used by the current platform. Legacy migration headers such as x-env-id and x-api-key are still accepted in code, but they are intentionally not the primary documented contract here.
servers:
- url: /
description: Current Swivy deployment
tags:
- name: runtime-accounts
description: Managed accounts, linked wallets, and custody flows
paths:
/v1/runtime/accounts/managed:
post:
tags:
- runtime-accounts
summary: Create or fetch a managed embedded account
operationId: createManagedAccount
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
requestBody:
required: true
description: Managed account payload
content:
application/json:
schema:
$ref: '#/components/schemas/ManagedAccountCreateRequest'
responses:
'200':
description: Managed account resolution
content:
application/json:
schema:
$ref: '#/components/schemas/ManagedAccountCreateResponse'
'400':
description: Invalid custody or browser provisioning payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Managed account creation not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/mcp/{appId}/accounts:
get:
tags:
- runtime-accounts
operationId: listMcpWallets
summary: List the signed-in MCP subject's wallets
parameters:
- name: appId
in: path
required: true
description: Pinned issuer app identifier
schema:
type: string
minLength: 1
security:
- McpAccessToken: []
description: Requires wallets.read and owner-approved OAuth consent; returns public account fields only.
responses:
'200':
description: Wallets
content:
application/json:
schema:
type: object
additionalProperties: true
'401':
description: Invalid or revoked session/token
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Insufficient scope or consent
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
tags:
- runtime-accounts
operationId: createMcpWallet
summary: Create or reuse the signed-in MCP subject's agent wallet
parameters:
- name: appId
in: path
required: true
description: Pinned issuer app identifier
schema:
type: string
minLength: 1
security:
- McpAccessToken: []
description: Requires wallets.read plus wallets.create approved through OAuth consent. Honors chain/custody policy; grants no signing or export access.
requestBody:
required: true
description: Permitted wallet chain
content:
application/json:
schema:
type: object
required:
- chain
additionalProperties: false
properties:
chain:
type: string
enum:
- evm
- solana
responses:
'200':
description: Created or existing public wallet
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid or revoked session/token
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Insufficient permission or policy
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Provisioning in progress; retry after the indicated delay
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts:
get:
tags:
- runtime-accounts
summary: List managed accounts and linked wallets
operationId: listAccounts
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
responses:
'200':
description: Managed accounts and linked wallets
content:
application/json:
schema:
$ref: '#/components/schemas/ListAccountsResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/custody:
get:
tags:
- runtime-accounts
summary: Get custody metadata for an account
operationId: getAccountCustody
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
responses:
'200':
description: Account custody metadata
content:
application/json:
schema:
$ref: '#/components/schemas/AccountCustodyResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Client reconstruction required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/custody/server-share:
post:
tags:
- runtime-accounts
summary: Fetch the server share for a browser-split wallet
operationId: getAccountServerShare
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Verified MFA challenge used to unlock local reconstruction
content:
application/json:
schema:
$ref: '#/components/schemas/ServerShareAccessRequest'
responses:
'200':
description: Server share payload
content:
application/json:
schema:
$ref: '#/components/schemas/ServerShareResponse'
'400':
description: Missing challenge identifier
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid runtime session or unverified MFA challenge
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account or server share not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Server share not applicable
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/custody/split:
post:
tags:
- runtime-accounts
summary: Enable split custody metadata for an existing account
operationId: enableSplitCustody
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Split custody metadata
content:
application/json:
schema:
$ref: '#/components/schemas/EnableSplitCustodyRequest'
responses:
'200':
description: Split custody enabled
content:
application/json:
schema:
$ref: '#/components/schemas/AccountCustodyResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Split custody not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account or owner not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/local-signing-events:
post:
tags:
- runtime-accounts
summary: Record a client-reported browser-local signing event
operationId: reportLocalSigningEvent
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Client-reported metadata for a browser-local signing flow
content:
application/json:
schema:
$ref: '#/components/schemas/LocalSigningAuditRequest'
responses:
'200':
description: Local signing audit event recorded
content:
application/json:
schema:
$ref: '#/components/schemas/LocalSigningAuditResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Local signing audit not applicable
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/linked:
post:
tags:
- runtime-accounts
summary: Link an external wallet
operationId: linkWallet
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
requestBody:
required: true
description: Linked wallet payload
content:
application/json:
schema:
$ref: '#/components/schemas/LinkedWalletCreateRequest'
responses:
'200':
description: Linked wallet created
content:
application/json:
schema:
$ref: '#/components/schemas/LinkedWalletResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Wallet linking not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/export:
post:
tags:
- runtime-accounts
summary: Export a managed account private key
operationId: exportManagedAccount
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Account export payload
content:
application/json:
schema:
$ref: '#/components/schemas/ExportRequest'
responses:
'200':
description: Exported private key
content:
application/json:
schema:
$ref: '#/components/schemas/ExportedAccountResponse'
'401':
description: Invalid MFA challenge or runtime session
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Account export not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account or owner not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Client reconstruction required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/accounts/{accountId}/raw-sign:
post:
tags:
- runtime-accounts
summary: Execute a raw signing payload immediately
operationId: rawSignManagedAccount
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: accountId
in: path
required: true
description: Managed account identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Raw signing payload
content:
application/json:
schema:
$ref: '#/components/schemas/RawSignRequest'
responses:
'200':
description: Raw signing result
content:
application/json:
schema:
$ref: '#/components/schemas/RawSignResponse'
'400':
description: Unsupported raw-sign payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid MFA challenge or runtime session
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Raw signing not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Managed account or owner not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Client reconstruction required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ServerShareAccessRequest:
type: object
required:
- challengeId
properties:
challengeId:
type: string
minLength: 1
ManagedKeyShare:
type: object
required:
- id
- ownerId
- identityId
- kind
- commitment
- encryptedPayload
- active
- metadata
- createdAt
properties:
id:
type: string
ownerId:
type: string
identityId:
type: string
kind:
$ref: '#/components/schemas/ManagedKeyShareKind'
commitment:
type: string
encryptedPayload:
anyOf:
- type: string
- type: 'null'
active:
type: boolean
metadata:
type: object
additionalProperties: true
createdAt:
type: string
format: date-time
LinkedWalletResponse:
type: object
required:
- linkedWallet
properties:
linkedWallet:
$ref: '#/components/schemas/LinkedWallet'
IntentPayload:
type: object
properties:
network:
anyOf:
- type: string
- type: 'null'
sponsorshipRequested:
anyOf:
- type: boolean
- type: 'null'
message:
type: string
messageHex:
type: string
pattern: ^0x[0-9a-fA-F]*$
messageBase64:
type: string
digestHex:
type: string
pattern: ^0x[0-9a-fA-F]{64}$
typedData:
$ref: '#/components/schemas/TypedData'
transaction:
type: object
additionalProperties: true
serializedTransactionBase64:
type: string
requestedValueUsd:
anyOf:
- type: number
- type: 'null'
ExportedAccountResponse:
type: object
required:
- accountId
- chain
- privateKey
- attestation
properties:
accountId:
type: string
chain:
$ref: '#/components/schemas/Chain'
privateKey:
type: string
attestation: {}
TypedDataField:
type: object
required:
- name
- type
properties:
name:
type: string
type:
type: string
EnableSplitCustodyRequest:
type: object
required:
- deviceShare
properties:
deviceShare:
$ref: '#/components/schemas/ManagedKeyShareRegistration'
recoveryShare:
$ref: '#/components/schemas/ManagedKeyShareRegistration'
LinkedWalletCreateRequest:
type: object
required:
- chain
- address
- connectorType
properties:
chain:
$ref: '#/components/schemas/Chain'
address:
type: string
minLength: 1
connectorType:
type: string
minLength: 1
metadata:
type: object
additionalProperties: true
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
reasons:
type: array
items:
type: string
supportedActions:
type: array
items:
type: string
ManagedAccount:
type: object
required:
- id
- environmentId
- identityId
- ownerId
- chain
- purpose
- accountType
- custodyMode
- address
- publicKey
- label
- metadata
- createdAt
properties:
id:
type: string
environmentId:
type: string
identityId:
type: string
ownerId:
type: string
chain:
$ref: '#/components/schemas/Chain'
purpose:
$ref: '#/components/schemas/WalletPurpose'
accountType:
$ref: '#/components/schemas/ManagedAccountType'
custodyMode:
$ref: '#/components/schemas/CustodyMode'
address:
type: string
publicKey:
type: string
label:
anyOf:
- type: string
- type: 'null'
metadata:
type: object
additionalProperties: true
createdAt:
type: string
format: date-time
NitroPcrMap:
type: object
additionalProperties:
type: string
SecureSignerMode:
type: string
enum:
- software
- mock_tee
- nitro_tee
ServerShareResponse:
type: object
required:
- account
- serverShare
properties:
account:
$ref: '#/components/schemas/ManagedAccount'
serverShare:
$ref: '#/components/schemas/ManagedKeyShare'
ListAccountsResponse:
type: object
required:
- managedAccounts
- linkedWallets
properties:
managedAccounts:
type: array
items:
$ref: '#/components/schemas/ManagedAccount'
linkedWallets:
type: array
items:
$ref: '#/components/schemas/LinkedWallet'
LocalSigningAuditResponse:
type: object
required:
- ok
- eventType
properties:
ok:
type: boolean
eventType:
type: string
Chain:
type: string
enum:
- evm
- solana
AccountCustodyResponse:
type: object
required:
- account
- shares
properties:
account:
$ref: '#/components/schemas/ManagedAccount'
shares:
type: array
items:
$ref: '#/components/schemas/ManagedKeyShare'
TypedData:
type: object
required:
- types
- message
properties:
domain:
type: object
additionalProperties: true
types:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/TypedDataField'
primaryType:
anyOf:
- type: string
- type: 'null'
message:
type: object
additionalProperties: true
ManagedAccountType:
type: string
enum:
- smart
- managed
ManagedAccountCreateRequest:
type: object
required:
- chain
properties:
chain:
$ref: '#/components/schemas/Chain'
purpose:
$ref: '#/components/schemas/WalletPurpose'
label:
type: string
custodyMode:
$ref: '#/components/schemas/CustodyMode'
splitCustody:
type: object
required:
- deviceShare
properties:
deviceShare:
$ref: '#/components/schemas/ManagedKeyShareRegistration'
recoveryShare:
$ref: '#/components/schemas/ManagedKeyShareRegistration'
browserProvisioning:
$ref: '#/components/schemas/BrowserManagedAccountProvisioning'
BrowserManagedAccountProvisioning:
type: object
required:
- publicKey
- address
- serverShare
- deviceShare
properties:
publicKey:
type: string
minLength: 1
address:
type: string
minLength: 1
accountType:
$ref: '#/components/schemas/ManagedAccountType'
serverShare:
type: object
required:
- commitment
- encryptedPayload
properties:
commitment:
type: string
minLength: 1
encryptedPayload:
type: string
minLength: 1
metadata:
type: object
additionalProperties: true
deviceShare:
type: object
required:
- commitment
properties:
commitment:
type: string
minLength: 1
metadata:
type: object
additionalProperties: true
recoveryShare:
type: object
required:
- commitment
properties:
commitment:
type: string
minLength: 1
metadata:
type: object
additionalProperties: true
CustodyMode:
type: string
enum:
- managed_tee
- split_custody
RawSignRequest:
type: object
required:
- challengeId
- payload
properties:
challengeId:
type: string
minLength: 1
payload:
$ref: '#/components/schemas/IntentPayload'
RawSignResponse:
type: object
required:
- result
properties:
result:
$ref: '#/components/schemas/ExecutionResult'
ExportRequest:
type: object
required:
- challengeId
properties:
challengeId:
type: string
minLength: 1
WalletPurpose:
type: string
enum:
- agent
- personal
- recovery
- treasury
ManagedKeyShareKind:
type: string
enum:
- server
- device
- recovery
LocalSigningAuditRequest:
type: object
required:
- chain
- signingKind
properties:
chain:
$ref: '#/components/schemas/Chain'
signingKind:
type: string
enum:
- message
- typed_data
- transaction
challengeId:
type: string
minLength: 1
signerAddress:
type: string
minLength: 1
signerPublicKey:
type: string
minLength: 1
signedPayloadPresent:
type: boolean
metadata:
type: object
additionalProperties: true
SignerAttestation:
type: object
required:
- mode
- provider
- enclaveId
- measurement
- issuedAt
- document
- signatureAlgorithm
- signatureBase64
- publicKeyFingerprint
properties:
mode:
$ref: '#/components/schemas/SecureSignerMode'
provider:
type: string
enclaveId:
type: string
measurement:
type: string
issuedAt:
type: string
format: date-time
document:
type: string
signatureAlgorithm:
type: string
enum:
- ed25519
signatureBase64:
type: string
publicKeyFingerprint:
type: string
imageSha384:
type: string
pcrs:
$ref: '#/components/schemas/NitroPcrMap'
kmsKeyArn:
type: string
ManagedKeyShareRegistration:
type: object
required:
- commitment
properties:
commitment:
type: string
minLength: 1
encryptedPayload:
type: string
metadata:
type: object
additionalProperties: true
ExecutionResult:
type: object
required:
- status
properties:
status:
type: string
enum:
- completed
- failed
signature:
type: string
signedPayload:
type: string
transactionHash:
type: string
error:
type: string
attestation:
$ref: '#/components/schemas/SignerAttestation'
metadata:
type: object
additionalProperties: true
ManagedAccountCreateResponse:
type: object
required:
- account
- attestation
- existing
properties:
account:
$ref: '#/components/schemas/ManagedAccount'
attestation: {}
existing:
type: boolean
LinkedWallet:
type: object
required:
- id
- environmentId
- identityId
- chain
- address
- connectorType
- metadata
- createdAt
properties:
id:
type: string
environmentId:
type: string
identityId:
type: string
chain:
$ref: '#/components/schemas/Chain'
address:
type: string
connectorType:
type: string
metadata:
type: object
additionalProperties: true
createdAt:
type: string
format: date-time
securitySchemes:
McpAccessToken:
type: http
scheme: bearer
bearerFormat: JWT
description: Resource-bound MCP OAuth access token; live session, client and approved wallet scopes required.
AdminToken:
type: apiKey
in: header
name: x-admin-token
description: Deployment-level control-plane admin token.
SwivyAdminKey:
type: apiKey
in: header
name: x-swivy-admin-key
description: Organization-scoped control-plane admin credential. Supported on organization, project, and environment management routes.
SwivyAppId:
type: apiKey
in: header
name: x-swivy-app-id
description: Environment-scoped public app identifier.
SwivyPublishableKey:
type: apiKey
in: header
name: x-swivy-publishable-key
description: Environment-scoped browser or mobile credential.
SwivySecretKey:
type: apiKey
in: header
name: x-swivy-secret-key
description: Environment-scoped server credential.
BearerSession:
type: http
scheme: bearer
bearerFormat: opaque session token
description: Opaque runtime session token returned by email verification or OIDC token exchange.
OidcAccessToken:
type: http
scheme: bearer
bearerFormat: JWT
description: Swivy-issued OIDC access token.