Swop Runtime Session Grants API
Delegated session keys for agents and backend workers
Delegated session keys for agents and backend workers
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-session-grants-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 Session Grants 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-session-grants
description: Delegated session keys for agents and backend workers
paths:
/v1/runtime/session-grants:
get:
tags:
- runtime-session-grants
summary: List delegated session grants
operationId: listSessionGrants
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
responses:
'200':
description: Delegated session grants
content:
application/json:
schema:
$ref: '#/components/schemas/SessionGrantsListResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
tags:
- runtime-session-grants
summary: Create a delegated session grant
operationId: createSessionGrant
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
requestBody:
required: true
description: Delegated session-grant payload
content:
application/json:
schema:
$ref: '#/components/schemas/SessionGrantCreateRequest'
responses:
'200':
description: Created session grant
content:
application/json:
schema:
$ref: '#/components/schemas/SessionGrantResponse'
'400':
description: Session grant payload is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: MFA required or invalid runtime session
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Session grant not allowed
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/session-grants/{grantId}/revoke:
post:
tags:
- runtime-session-grants
summary: Revoke a delegated session grant
operationId: revokeSessionGrant
security:
- SwivyAppId: []
SwivyPublishableKey: []
BearerSession: []
- SwivyAppId: []
SwivySecretKey: []
BearerSession: []
parameters:
- name: grantId
in: path
required: true
description: Session grant identifier
schema:
type: string
minLength: 1
responses:
'200':
description: Revoked session grant
content:
application/json:
schema:
$ref: '#/components/schemas/SessionGrantResponse'
'401':
description: Invalid runtime session or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Session grant not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/session-grants/{grantId}/intents/signing:
post:
tags:
- runtime-session-grants
summary: Create a signing intent with a delegated session grant
operationId: createSigningIntentWithSessionGrant
security:
- SwivyAppId: []
SwivyPublishableKey: []
- SwivyAppId: []
SwivySecretKey: []
parameters:
- name: grantId
in: path
required: true
description: Session grant identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Delegated signing intent payload
content:
application/json:
schema:
$ref: '#/components/schemas/SessionIntentRequest'
responses:
'200':
description: Queued or completed signing intent
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionIntentResponse'
'400':
description: Unsupported signing payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid session grant, authorization, or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Signing kind or network not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Session grant or managed account not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Client reconstruction required or nonce reused
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/runtime/session-grants/{grantId}/intents/transactions:
post:
tags:
- runtime-session-grants
summary: Create a transaction intent with a delegated session grant
operationId: createTransactionIntentWithSessionGrant
security:
- SwivyAppId: []
SwivyPublishableKey: []
- SwivyAppId: []
SwivySecretKey: []
parameters:
- name: grantId
in: path
required: true
description: Session grant identifier
schema:
type: string
minLength: 1
requestBody:
required: true
description: Delegated transaction intent payload
content:
application/json:
schema:
$ref: '#/components/schemas/SessionIntentRequest'
responses:
'200':
description: Queued or completed transaction intent
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionIntentResponse'
'400':
description: Unsupported transaction payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Invalid session grant, authorization, or environment credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Execution, network, or value not allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Session grant or managed account not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Client reconstruction required or nonce reused
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
SessionGrant:
type: object
required:
- id
- environmentId
- identityId
- accountId
- chain
- curve
- publicKey
- label
- scope
- uses
- expiresAt
- lastUsedAt
- revokedAt
- metadata
- createdAt
properties:
id:
type: string
environmentId:
type: string
identityId:
type: string
accountId:
type: string
chain:
$ref: '#/components/schemas/Chain'
curve:
$ref: '#/components/schemas/SessionKeyCurve'
publicKey:
type: string
label:
anyOf:
- type: string
- type: 'null'
scope:
$ref: '#/components/schemas/SessionGrantScope'
uses:
type: integer
minimum: 0
expiresAt:
type: string
format: date-time
lastUsedAt:
anyOf:
- type: string
format: date-time
- type: 'null'
revokedAt:
anyOf:
- type: string
format: date-time
- type: 'null'
metadata:
type: object
additionalProperties: true
createdAt:
type: string
format: date-time
TransactionIntentResponse:
type: object
required:
- intent
properties:
intent:
$ref: '#/components/schemas/TransactionIntent'
SigningIntentKind:
type: string
enum:
- sign_message
- sign_digest
- sign_typed_data
- sign_transaction
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'
SessionGrantsListResponse:
type: object
required:
- sessionGrants
properties:
sessionGrants:
type: array
items:
$ref: '#/components/schemas/SessionGrant'
TypedDataField:
type: object
required:
- name
- type
properties:
name:
type: string
type:
type: string
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
reasons:
type: array
items:
type: string
supportedActions:
type: array
items:
type: string
SessionIntentRequest:
type: object
required:
- payload
- authorization
properties:
payload:
$ref: '#/components/schemas/IntentPayload'
authorization:
$ref: '#/components/schemas/SessionGrantAuthorization'
NitroPcrMap:
type: object
additionalProperties:
type: string
SessionGrantResponse:
type: object
required:
- sessionGrant
properties:
sessionGrant:
$ref: '#/components/schemas/SessionGrant'
SecureSignerMode:
type: string
enum:
- software
- mock_tee
- nitro_tee
TransactionIntent:
type: object
required:
- id
- environmentId
- identityId
- accountId
- chain
- kind
- status
- requiresMfa
- challengeId
- payload
- result
- createdAt
- updatedAt
properties:
id:
type: string
environmentId:
type: string
identityId:
type: string
accountId:
type: string
chain:
$ref: '#/components/schemas/Chain'
kind:
$ref: '#/components/schemas/IntentKind'
status:
$ref: '#/components/schemas/IntentStatus'
requiresMfa:
type: boolean
challengeId:
anyOf:
- type: string
- type: 'null'
payload:
$ref: '#/components/schemas/IntentPayload'
result:
anyOf:
- $ref: '#/components/schemas/ExecutionResult'
- type: 'null'
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
IntentKind:
type: string
enum:
- sign_message
- sign_digest
- sign_typed_data
- sign_transaction
- execute_transaction
Chain:
type: string
enum:
- evm
- solana
SessionGrantAuthorization:
type: object
required:
- nonce
- expiresAt
- signatureBase64
properties:
nonce:
type: string
minLength: 16
maxLength: 200
expiresAt:
type: string
format: date-time
signatureBase64:
type: string
minLength: 1
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
SessionKeyCurve:
type: string
enum:
- ed25519
SessionGrantScope:
type: object
required:
- allowedSigningKinds
- allowTransactionExecution
- allowedNetworks
- maxTransactionValueUsd
- maxUses
properties:
allowedSigningKinds:
type: array
items:
$ref: '#/components/schemas/SigningIntentKind'
allowTransactionExecution:
type: boolean
allowedNetworks:
type: array
items:
type: string
maxTransactionValueUsd:
anyOf:
- type: number
- type: 'null'
maxUses:
anyOf:
- type: integer
minimum: 1
- type: 'null'
IntentStatus:
type: string
enum:
- pending_step_up
- queued
- processing
- completed
- failed
SessionGrantCreateRequest:
type: object
required:
- accountId
- publicKey
properties:
accountId:
type: string
minLength: 1
label:
type: string
challengeId:
type: string
publicKey:
type: string
expiresInSeconds:
type: integer
minimum: 1
scope:
type: object
properties:
allowedSigningKinds:
type: array
items:
$ref: '#/components/schemas/SigningIntentKind'
allowTransactionExecution:
type: boolean
allowedNetworks:
type: array
items:
type: string
maxTransactionValueUsd:
anyOf:
- type: number
- type: 'null'
maxUses:
anyOf:
- type: integer
minimum: 1
- type: 'null'
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
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
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.